Lines Matching refs:adap

62 #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__)  argument
794 struct adapter *adap; member
881 struct adapter *adap; member
891 struct adapter *adap; member
956 struct adapter *adap; /* Backpointer to adapter */ member
1477 static inline int is_offload(const struct adapter *adap) in is_offload() argument
1479 return adap->params.offload; in is_offload()
1482 static inline int is_hashfilter(const struct adapter *adap) in is_hashfilter() argument
1484 return adap->params.hash_filter; in is_hashfilter()
1487 static inline int is_pci_uld(const struct adapter *adap) in is_pci_uld() argument
1489 return adap->params.crypto; in is_pci_uld()
1492 static inline int is_uld(const struct adapter *adap) in is_uld() argument
1494 return (adap->params.offload || adap->params.crypto); in is_uld()
1497 static inline int is_ethofld(const struct adapter *adap) in is_ethofld() argument
1499 return adap->params.ethofld; in is_ethofld()
1502 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) in t4_read_reg() argument
1504 return readl(adap->regs + reg_addr); in t4_read_reg()
1507 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val) in t4_write_reg() argument
1509 writel(val, adap->regs + reg_addr); in t4_write_reg()
1525 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) in t4_read_reg64() argument
1527 return readq(adap->regs + reg_addr); in t4_read_reg64()
1530 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val) in t4_write_reg64() argument
1532 writeq(val, adap->regs + reg_addr); in t4_write_reg64()
1569 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) in adap2pinfo() argument
1571 return netdev_priv(adap->port[idx]); in adap2pinfo()
1597 static inline unsigned int qtimer_val(const struct adapter *adap, in qtimer_val() argument
1602 return idx < SGE_NTIMERS ? adap->sge.timer_val[idx] : 0; in qtimer_val()
1608 void t4_os_portmod_changed(struct adapter *adap, int port_id);
1609 void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat);
1611 void t4_free_sge_resources(struct adapter *adap);
1612 irq_handler_t t4_intr_handler(struct adapter *adap);
1617 int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb);
1618 int t4_ofld_send(struct adapter *adap, struct sk_buff *skb);
1619 int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
1623 int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
1626 int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,
1629 int t4_sge_mod_ctrl_txq(struct adapter *adap, unsigned int eqid,
1631 int t4_sge_alloc_uld_txq(struct adapter *adap, struct sge_uld_txq *txq,
1634 int t4_sge_alloc_ethofld_txq(struct adapter *adap, struct sge_eohw_txq *txq,
1636 void t4_sge_free_ethofld_txq(struct adapter *adap, struct sge_eohw_txq *txq);
1638 int t4_sge_init(struct adapter *adap);
1639 void t4_sge_start(struct adapter *adap);
1640 void t4_sge_stop(struct adapter *adap);
1641 int t4_sge_eth_txq_egress_update(struct adapter *adap, struct sge_eth_txq *q,
1651 static inline int is_bypass(struct adapter *adap) in is_bypass() argument
1653 return adap->params.bypass; in is_bypass()
1681 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec() argument
1683 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec()
1686 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks() argument
1689 return (us * adap->params.vpd.cclk) / 1000; in us_to_core_ticks()
1700 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap, in dack_ticks_to_usec() argument
1703 return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap); in dack_ticks_to_usec()
1706 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask,
1709 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
1711 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
1714 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, in t4_wr_mbox_timeout() argument
1718 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true, in t4_wr_mbox_timeout()
1722 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox() argument
1725 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); in t4_wr_mbox()
1728 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns() argument
1731 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); in t4_wr_mbox_ns()
1754 static inline void init_rspq(struct adapter *adap, struct sge_rspq *q, in init_rspq() argument
1758 q->adap = adap; in init_rspq()
1779 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1782 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1797 int t4_link_l1cfg_core(struct adapter *adap, unsigned int mbox,
1815 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
1817 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg);
1818 u32 t4_get_util_window(struct adapter *adap);
1819 void t4_setup_memwin(struct adapter *adap, u32 memwin_base, u32 window);
1821 int t4_memory_rw_init(struct adapter *adap, int win, int mtype, u32 *mem_off,
1823 void t4_memory_update_win(struct adapter *adap, int win, u32 addr);
1824 void t4_memory_rw_residual(struct adapter *adap, u32 off, u32 addr, u8 *buf,
1828 int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, u32 len,
1830 static inline int t4_memory_write(struct adapter *adap, int mtype, u32 addr, in t4_memory_write() argument
1833 return t4_memory_rw(adap, 0, mtype, addr, len, buf, 0); in t4_memory_write()
1837 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1847 int t4_load_phy_fw(struct adapter *adap, int win,
1850 int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver);
1851 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
1852 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
1854 int t4_fl_pkt_align(struct adapter *adap);
1856 int t4_check_fw_version(struct adapter *adap);
1866 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1880 unsigned int qtimer_val(const struct adapter *adap,
1885 int t4_init_tp_params(struct adapter *adap, bool sleep_ok);
1886 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
1887 int t4_init_rss_mode(struct adapter *adap, int mbox);
1890 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);
1903 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
1914 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1915 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
1916 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data,
1918 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data,
1920 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
1922 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
1924 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
1925 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
1928 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
1929 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
1931 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
1932 void t4_get_port_stats_offset(struct adapter *adap, int idx,
1935 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
1936 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
1937 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
1938 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
1940 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
1941 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
1943 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
1945 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
1947 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
1949 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
1951 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
1953 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
1956 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
1958 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
1961 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
1963 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
1964 int t4_early_init(struct adapter *adap, unsigned int mbox);
1965 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
1966 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
1968 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
1969 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1972 int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf,
1975 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
1978 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
1982 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1985 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
1990 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
1993 int t4_free_vi(struct adapter *adap, unsigned int mbox,
1996 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
1999 int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
2002 int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, int idx,
2004 int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
2008 int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
2011 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
2014 int t4_free_mac_filt(struct adapter *adap, unsigned int mbox,
2017 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
2019 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
2021 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
2023 int t4_enable_pi_params(struct adapter *adap, unsigned int mbox,
2026 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
2028 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
2030 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2032 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2034 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
2037 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2040 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2042 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2044 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2046 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type);
2047 int t4_read_sge_dbqtimers(struct adapter *adap, unsigned int ndbqtimers,
2053 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
2060 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,
2062 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
2063 void t4_get_tx_sched(struct adapter *adap, unsigned int sched,
2065 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
2067 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid,
2081 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2083 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2085 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
2088 void t4_uld_mem_free(struct adapter *adap);
2089 int t4_uld_mem_alloc(struct adapter *adap);
2090 void t4_uld_clean_up(struct adapter *adap);
2092 int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port,
2095 int t4_load_boot(struct adapter *adap, u8 *boot_data,
2097 int t4_load_bootcfg(struct adapter *adap,
2099 void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, struct sge_fl *fl);
2100 void free_tx_desc(struct adapter *adap, struct sge_txq *q,
2102 void cxgb4_eosw_txq_free_desc(struct adapter *adap, struct sge_eosw_txq *txq,
2108 void free_txq(struct adapter *adap, struct sge_txq *q);
2109 void cxgb4_reclaim_completed_tx(struct adapter *adap,
2121 void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n);
2122 int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
2126 int cxgb4_thermal_init(struct adapter *adap);
2127 int cxgb4_thermal_remove(struct adapter *adap);
2128 int cxgb4_set_msix_aff(struct adapter *adap, unsigned short vec,
2136 int cxgb4_alloc_mac_filt(struct adapter *adap, unsigned int viid,
2140 int cxgb4_free_mac_filt(struct adapter *adap, unsigned int viid,
2142 int cxgb4_init_mps_ref_entries(struct adapter *adap);
2143 void cxgb4_free_mps_ref_entries(struct adapter *adap);
2147 int cxgb4_get_msix_idx_from_bmap(struct adapter *adap);
2148 void cxgb4_free_msix_idx_in_bmap(struct adapter *adap, u32 msix_idx);
2149 void cxgb4_enable_rx(struct adapter *adap, struct sge_rspq *q);
2154 int cxgb4_set_ktls_feature(struct adapter *adap, bool enable);