Lines Matching defs:adap

61 #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__)
796 struct adapter *adap;
883 struct adapter *adap;
893 struct adapter *adap;
958 struct adapter *adap; /* Backpointer to adapter */
1480 static inline int is_offload(const struct adapter *adap)
1482 return adap->params.offload;
1485 static inline int is_hashfilter(const struct adapter *adap)
1487 return adap->params.hash_filter;
1490 static inline int is_pci_uld(const struct adapter *adap)
1492 return adap->params.crypto;
1495 static inline int is_uld(const struct adapter *adap)
1497 return (adap->params.offload || adap->params.crypto);
1500 static inline int is_ethofld(const struct adapter *adap)
1502 return adap->params.ethofld;
1505 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr)
1507 return readl(adap->regs + reg_addr);
1510 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val)
1512 writel(val, adap->regs + reg_addr);
1528 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr)
1530 return readq(adap->regs + reg_addr);
1533 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val)
1535 writeq(val, adap->regs + reg_addr);
1567 * @adap: the adapter
1572 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx)
1574 return netdev_priv(adap->port[idx]);
1600 static inline unsigned int qtimer_val(const struct adapter *adap,
1605 return idx < SGE_NTIMERS ? adap->sge.timer_val[idx] : 0;
1611 void t4_os_portmod_changed(struct adapter *adap, int port_id);
1612 void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat);
1614 void t4_free_sge_resources(struct adapter *adap);
1615 void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q);
1616 irq_handler_t t4_intr_handler(struct adapter *adap);
1621 int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb);
1622 int t4_ofld_send(struct adapter *adap, struct sk_buff *skb);
1623 int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
1627 int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
1630 int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,
1633 int t4_sge_mod_ctrl_txq(struct adapter *adap, unsigned int eqid,
1635 int t4_sge_alloc_uld_txq(struct adapter *adap, struct sge_uld_txq *txq,
1638 int t4_sge_alloc_ethofld_txq(struct adapter *adap, struct sge_eohw_txq *txq,
1640 void t4_sge_free_ethofld_txq(struct adapter *adap, struct sge_eohw_txq *txq);
1642 int t4_sge_init(struct adapter *adap);
1643 void t4_sge_start(struct adapter *adap);
1644 void t4_sge_stop(struct adapter *adap);
1645 int t4_sge_eth_txq_egress_update(struct adapter *adap, struct sge_eth_txq *q,
1655 static inline int is_bypass(struct adapter *adap)
1657 return adap->params.bypass;
1685 static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
1687 return adap->params.vpd.cclk / 1000;
1690 static inline unsigned int us_to_core_ticks(const struct adapter *adap,
1693 return (us * adap->params.vpd.cclk) / 1000;
1704 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap,
1707 return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap);
1710 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask,
1713 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
1715 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
1718 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox,
1722 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true,
1726 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd,
1729 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true);
1732 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd,
1735 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false);
1758 static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
1762 q->adap = adap;
1783 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1786 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1801 int t4_link_l1cfg_core(struct adapter *adap, unsigned int mbox,
1819 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
1821 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg);
1822 u32 t4_get_util_window(struct adapter *adap);
1823 void t4_setup_memwin(struct adapter *adap, u32 memwin_base, u32 window);
1825 int t4_memory_rw_init(struct adapter *adap, int win, int mtype, u32 *mem_off,
1827 void t4_memory_update_win(struct adapter *adap, int win, u32 addr);
1828 void t4_memory_rw_residual(struct adapter *adap, u32 off, u32 addr, u8 *buf,
1832 int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, u32 len,
1834 static inline int t4_memory_write(struct adapter *adap, int mtype, u32 addr,
1837 return t4_memory_rw(adap, 0, mtype, addr, len, buf, 0);
1841 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1851 int t4_load_phy_fw(struct adapter *adap, int win,
1854 int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver);
1855 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
1856 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
1858 int t4_fl_pkt_align(struct adapter *adap);
1860 int t4_check_fw_version(struct adapter *adap);
1870 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1884 unsigned int qtimer_val(const struct adapter *adap,
1889 int t4_init_tp_params(struct adapter *adap, bool sleep_ok);
1890 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
1891 int t4_init_rss_mode(struct adapter *adap, int mbox);
1894 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);
1907 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
1918 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1919 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1920 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data,
1922 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data,
1924 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
1926 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
1928 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
1929 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
1932 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
1933 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
1935 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
1936 void t4_get_port_stats_offset(struct adapter *adap, int idx,
1939 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
1940 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
1941 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
1942 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
1944 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
1945 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
1947 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
1949 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
1951 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
1953 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
1955 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
1957 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
1960 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
1962 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
1965 void t4_wol_magic_enable(struct adapter *adap, unsigned int port,
1967 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
1970 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
1972 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
1973 int t4_early_init(struct adapter *adap, unsigned int mbox);
1974 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
1975 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
1977 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
1978 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1981 int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf,
1984 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
1987 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
1991 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1994 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
1999 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
2002 int t4_free_vi(struct adapter *adap, unsigned int mbox,
2005 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
2008 int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
2011 int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, int idx,
2013 int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
2017 int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
2020 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
2023 int t4_free_mac_filt(struct adapter *adap, unsigned int mbox,
2026 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
2028 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
2030 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
2032 int t4_enable_pi_params(struct adapter *adap, unsigned int mbox,
2035 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
2037 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
2039 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2041 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2043 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
2046 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2049 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2051 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2053 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2055 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type);
2056 int t4_read_sge_dbqtimers(struct adapter *adap, unsigned int ndbqtimers,
2062 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
2069 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,
2071 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
2072 void t4_get_tx_sched(struct adapter *adap, unsigned int sched,
2074 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
2076 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid,
2090 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2092 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2094 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
2097 void t4_uld_mem_free(struct adapter *adap);
2098 int t4_uld_mem_alloc(struct adapter *adap);
2099 void t4_uld_clean_up(struct adapter *adap);
2101 int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port,
2104 int t4_load_boot(struct adapter *adap, u8 *boot_data,
2106 int t4_load_bootcfg(struct adapter *adap,
2108 void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, struct sge_fl *fl);
2109 void free_tx_desc(struct adapter *adap, struct sge_txq *q,
2111 void cxgb4_eosw_txq_free_desc(struct adapter *adap, struct sge_eosw_txq *txq,
2117 void free_txq(struct adapter *adap, struct sge_txq *q);
2118 void cxgb4_reclaim_completed_tx(struct adapter *adap,
2130 void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n);
2131 int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
2135 int cxgb4_thermal_init(struct adapter *adap);
2136 int cxgb4_thermal_remove(struct adapter *adap);
2137 int cxgb4_set_msix_aff(struct adapter *adap, unsigned short vec,
2145 int cxgb4_alloc_mac_filt(struct adapter *adap, unsigned int viid,
2149 int cxgb4_free_mac_filt(struct adapter *adap, unsigned int viid,
2151 int cxgb4_init_mps_ref_entries(struct adapter *adap);
2152 void cxgb4_free_mps_ref_entries(struct adapter *adap);
2153 int cxgb4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
2157 int cxgb4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
2159 int cxgb4_free_raw_mac_filt(struct adapter *adap,
2167 int cxgb4_alloc_raw_mac_filt(struct adapter *adap,
2178 int cxgb4_get_msix_idx_from_bmap(struct adapter *adap);
2179 void cxgb4_free_msix_idx_in_bmap(struct adapter *adap, u32 msix_idx);
2180 void cxgb4_enable_rx(struct adapter *adap, struct sge_rspq *q);
2185 int cxgb4_set_ktls_feature(struct adapter *adap, bool enable);