Lines Matching refs:adap
55 #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__) argument
529 struct adapter *adap; member
618 struct adapter *adap; member
627 struct adapter *adap; member
883 static inline int is_offload(const struct adapter *adap) in is_offload() argument
885 return adap->params.offload; in is_offload()
888 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) in t4_read_reg() argument
890 return readl(adap->regs + 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() argument
895 writel(val, adap->regs + reg_addr); in t4_write_reg()
911 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) in t4_read_reg64() argument
913 return readq(adap->regs + 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() argument
918 writeq(val, adap->regs + reg_addr); in t4_write_reg64()
955 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) in adap2pinfo() argument
957 return netdev_priv(adap->port[idx]); in adap2pinfo()
1079 static inline unsigned int qtimer_val(const struct adapter *adap, in qtimer_val() argument
1084 return idx < SGE_NTIMERS ? adap->sge.timer_val[idx] : 0; 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);
1129 static inline int is_bypass(struct adapter *adap) in is_bypass() argument
1131 return adap->params.bypass; in is_bypass()
1159 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec() argument
1161 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec()
1164 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks() argument
1167 return (us * adap->params.vpd.cclk) / 1000; in us_to_core_ticks()
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() argument
1190 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true, in t4_wr_mbox_timeout()
1194 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox() argument
1197 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); 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() argument
1203 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); 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,
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() argument
1236 return t4_memory_rw(adap, 0, mtype, addr, len, buf, 0); in t4_memory_write()
1240 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_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,
1257 int t4_check_fw_version(struct adapter *adap);
1261 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1274 unsigned int qtimer_val(const struct adapter *adap,
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);
1292 void t4_write_rss_key(struct adapter *adap, const u32 *key, 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);
1418 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,