Lines Matching refs:adapter
426 struct adapter;
436 struct adapter *adapter; member
529 struct adapter *adap;
618 struct adapter *adap;
627 struct adapter *adap;
701 struct adapter { struct
883 static inline int is_offload(const struct adapter *adap) in is_offload()
888 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) in t4_read_reg()
893 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val) in t4_write_reg()
911 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) in t4_read_reg64()
916 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val) in t4_write_reg64()
930 static inline void t4_set_hw_addr(struct adapter *adapter, int port_idx, in t4_set_hw_addr() argument
933 ether_addr_copy(adapter->port[port_idx]->dev_addr, hw_addr); in t4_set_hw_addr()
934 ether_addr_copy(adapter->port[port_idx]->perm_addr, hw_addr); in t4_set_hw_addr()
955 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) in adap2pinfo()
966 static inline struct adapter *netdev2adap(const struct net_device *dev) in netdev2adap()
968 return netdev2pinfo(dev)->adapter; in netdev2adap()
1072 static inline unsigned int mk_adap_vers(struct adapter *ap) in mk_adap_vers()
1079 static inline unsigned int qtimer_val(const struct adapter *adap, in qtimer_val()
1091 void t4_os_portmod_changed(const struct adapter *adap, int port_id);
1092 void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat);
1096 void t4_free_sge_resources(struct adapter *adap);
1097 void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q);
1098 irq_handler_t t4_intr_handler(struct adapter *adap);
1102 int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb);
1103 int t4_ofld_send(struct adapter *adap, struct sk_buff *skb);
1104 int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
1107 int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
1110 int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,
1113 int t4_sge_alloc_ofld_txq(struct adapter *adap, struct sge_ofld_txq *txq,
1116 int t4_sge_init(struct adapter *adap);
1117 void t4_sge_start(struct adapter *adap);
1118 void t4_sge_stop(struct adapter *adap);
1126 #define for_each_port(adapter, iter) \ argument
1127 for (iter = 0; iter < (adapter)->params.nports; ++iter)
1129 static inline int is_bypass(struct adapter *adap) in is_bypass()
1159 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec()
1164 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks()
1170 static inline unsigned int core_ticks_to_us(const struct adapter *adapter, in core_ticks_to_us() argument
1174 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us()
1175 adapter->params.vpd.cclk); in core_ticks_to_us()
1178 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask,
1181 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
1183 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
1186 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, in t4_wr_mbox_timeout()
1194 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox()
1200 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns()
1206 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1209 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1212 void t4_hw_pci_read_cfg4(struct adapter *adapter, int reg, u32 *val);
1216 void t4_intr_enable(struct adapter *adapter);
1217 void t4_intr_disable(struct adapter *adapter);
1218 int t4_slow_intr_handler(struct adapter *adapter);
1221 int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
1223 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
1225 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg);
1226 u32 t4_get_util_window(struct adapter *adap);
1227 void t4_setup_memwin(struct adapter *adap, u32 memwin_base, u32 window);
1231 int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, u32 len,
1233 static inline int t4_memory_write(struct adapter *adap, int mtype, u32 addr, in t4_memory_write()
1239 unsigned int t4_get_regs_len(struct adapter *adapter);
1240 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1242 int t4_seeprom_wp(struct adapter *adapter, bool enable);
1243 int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p);
1244 int t4_get_vpd_params(struct adapter *adapter, struct vpd_params *p);
1245 int t4_read_flash(struct adapter *adapter, unsigned int addr,
1247 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
1248 int t4_load_phy_fw(struct adapter *adap,
1252 int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver);
1253 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
1254 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
1256 unsigned int t4_flash_cfg_addr(struct adapter *adapter);
1257 int t4_check_fw_version(struct adapter *adap);
1258 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
1259 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
1260 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
1261 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1264 int t4_prep_adapter(struct adapter *adapter);
1267 int t4_bar2_sge_qregs(struct adapter *adapter,
1274 unsigned int qtimer_val(const struct adapter *adap,
1277 int t4_init_devlog_params(struct adapter *adapter);
1278 int t4_init_sge_params(struct adapter *adapter);
1279 int t4_init_tp_params(struct adapter *adap);
1280 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
1281 int t4_init_rss_mode(struct adapter *adap, int mbox);
1282 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);
1283 void t4_fatal_err(struct adapter *adapter);
1284 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
1286 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
1288 int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
1290 int t4_read_rss(struct adapter *adapter, u16 *entries);
1291 void t4_read_rss_key(struct adapter *adapter, u32 *key);
1292 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx);
1293 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
1295 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
1297 u32 t4_read_rss_pf_map(struct adapter *adapter);
1298 u32 t4_read_rss_pf_mask(struct adapter *adapter);
1300 unsigned int t4_get_mps_bg_map(struct adapter *adapter, int idx);
1301 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1302 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1303 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data,
1305 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data,
1307 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
1309 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
1311 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
1312 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
1315 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
1316 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
1318 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
1319 void t4_get_port_stats_offset(struct adapter *adap, int idx,
1322 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
1323 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
1324 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
1325 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
1327 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
1328 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st);
1329 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st);
1330 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st);
1331 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st);
1332 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
1334 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
1336 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
1339 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
1341 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
1344 void t4_wol_magic_enable(struct adapter *adap, unsigned int port,
1346 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
1349 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
1351 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
1352 int t4_early_init(struct adapter *adap, unsigned int mbox);
1353 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
1354 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
1356 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
1357 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1360 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
1363 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
1367 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1370 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
1375 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
1378 int t4_free_vi(struct adapter *adap, unsigned int mbox,
1381 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
1384 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
1387 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
1389 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
1391 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
1393 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
1395 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
1397 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
1399 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
1401 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1404 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1406 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1408 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
1410 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
1411 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
1412 void t4_db_full(struct adapter *adapter);
1413 void t4_db_dropped(struct adapter *adapter);
1414 int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
1416 void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
1418 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,
1420 void t4_sge_decode_idma_state(struct adapter *adapter, int state);
1422 void t4_idma_monitor_init(struct adapter *adapter,
1424 void t4_idma_monitor(struct adapter *adapter,