Lines Matching refs:adapter
399 struct adapter;
409 struct adapter *adapter; member
498 struct adapter *adap;
587 struct adapter *adap;
596 struct adapter *adap;
668 struct adapter { struct
856 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) in t4_read_reg()
861 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val) in t4_write_reg()
879 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) in t4_read_reg64()
884 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val) in t4_write_reg64()
907 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) in adap2pinfo()
918 static inline struct adapter *netdev2adap(const struct net_device *dev) in netdev2adap()
920 return netdev2pinfo(dev)->adapter; in netdev2adap()
1024 static inline unsigned int mk_adap_vers(struct adapter *ap) in mk_adap_vers()
1031 static inline unsigned int qtimer_val(const struct adapter *adap, in qtimer_val()
1043 void t4_os_portmod_changed(const struct adapter *adap, int port_id);
1044 void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat);
1048 void t4_free_sge_resources(struct adapter *adap);
1049 void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q);
1050 irq_handler_t t4_intr_handler(struct adapter *adap);
1054 int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb);
1055 int t4_ofld_send(struct adapter *adap, struct sk_buff *skb);
1056 int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
1059 int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
1062 int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,
1065 int t4_sge_alloc_ofld_txq(struct adapter *adap, struct sge_ofld_txq *txq,
1068 int t4_sge_init(struct adapter *adap);
1069 void t4_sge_start(struct adapter *adap);
1070 void t4_sge_stop(struct adapter *adap);
1078 #define for_each_port(adapter, iter) \ argument
1079 for (iter = 0; iter < (adapter)->params.nports; ++iter)
1081 static inline int is_bypass(struct adapter *adap) in is_bypass()
1098 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec()
1103 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks()
1109 static inline unsigned int core_ticks_to_us(const struct adapter *adapter, in core_ticks_to_us() argument
1113 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us()
1114 adapter->params.vpd.cclk); in core_ticks_to_us()
1117 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask,
1120 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
1123 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox()
1129 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns()
1135 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1138 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1141 void t4_hw_pci_read_cfg4(struct adapter *adapter, int reg, u32 *val);
1145 void t4_intr_enable(struct adapter *adapter);
1146 void t4_intr_disable(struct adapter *adapter);
1147 int t4_slow_intr_handler(struct adapter *adapter);
1150 int t4_link_start(struct adapter *adap, unsigned int mbox, unsigned int port,
1152 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
1156 int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, u32 len,
1158 static inline int t4_memory_write(struct adapter *adap, int mtype, u32 addr, in t4_memory_write()
1164 unsigned int t4_get_regs_len(struct adapter *adapter);
1165 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1167 int t4_seeprom_wp(struct adapter *adapter, bool enable);
1168 int get_vpd_params(struct adapter *adapter, struct vpd_params *p);
1169 int t4_read_flash(struct adapter *adapter, unsigned int addr,
1171 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
1172 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
1173 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
1175 unsigned int t4_flash_cfg_addr(struct adapter *adapter);
1176 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
1177 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
1178 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
1179 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1182 int t4_prep_adapter(struct adapter *adapter);
1185 int cxgb4_t4_bar2_sge_qregs(struct adapter *adapter,
1191 unsigned int qtimer_val(const struct adapter *adap,
1194 int t4_init_devlog_params(struct adapter *adapter);
1195 int t4_init_sge_params(struct adapter *adapter);
1196 int t4_init_tp_params(struct adapter *adap);
1197 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
1198 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);
1199 void t4_fatal_err(struct adapter *adapter);
1200 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
1202 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
1204 int t4_read_rss(struct adapter *adapter, u16 *entries);
1205 void t4_read_rss_key(struct adapter *adapter, u32 *key);
1206 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx);
1207 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
1209 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
1211 u32 t4_read_rss_pf_map(struct adapter *adapter);
1212 u32 t4_read_rss_pf_mask(struct adapter *adapter);
1214 int t4_mc_read(struct adapter *adap, int idx, u32 addr, __be32 *data,
1216 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data,
1218 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1219 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1220 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data,
1222 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data,
1224 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
1226 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
1228 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
1229 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
1231 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
1232 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
1233 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
1234 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
1236 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
1237 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
1239 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
1242 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
1246 void t4_wol_magic_enable(struct adapter *adap, unsigned int port,
1248 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
1251 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
1253 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
1254 int t4_early_init(struct adapter *adap, unsigned int mbox);
1255 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
1256 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
1258 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
1259 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1262 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1265 int t4_set_params_nosleep(struct adapter *adap, unsigned int mbox,
1269 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
1274 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
1277 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
1280 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
1283 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
1285 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
1287 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
1289 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
1291 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
1293 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
1295 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
1297 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1300 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1302 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1304 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1306 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
1307 void t4_db_full(struct adapter *adapter);
1308 void t4_db_dropped(struct adapter *adapter);
1309 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,
1311 void t4_sge_decode_idma_state(struct adapter *adapter, int state);