Lines Matching defs:adapter

480 	unsigned int max_ird_adapter;     /* Max read depth per adapter */
646 struct adapter;
656 struct adapter *adapter;
705 enum { /* adapter flags */
796 struct adapter *adap;
883 struct adapter *adap;
893 struct adapter *adap;
958 struct adapter *adap; /* Backpointer to adapter */
1108 struct adapter {
1480 static inline int is_offload(const struct adapter *adap)
1485 static inline int is_hashfilter(const struct adapter *adap)
1490 static inline int is_pci_uld(const struct adapter *adap)
1495 static inline int is_uld(const struct adapter *adap)
1500 static inline int is_ethofld(const struct adapter *adap)
1505 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr)
1510 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val)
1528 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr)
1533 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val)
1540 * @adapter: the adapter
1547 static inline void t4_set_hw_addr(struct adapter *adapter, int port_idx,
1550 ether_addr_copy(adapter->port[port_idx]->dev_addr, hw_addr);
1551 ether_addr_copy(adapter->port[port_idx]->perm_addr, hw_addr);
1567 * @adap: the adapter
1572 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx)
1578 * netdev2adap - return the adapter structure associated with a net_device
1581 * Return the struct adapter associated with a net_device
1583 static inline struct adapter *netdev2adap(const struct net_device *dev)
1585 return netdev2pinfo(dev)->adapter;
1588 /* Return a version number to identify the type of adapter. The scheme is:
1593 static inline unsigned int mk_adap_vers(struct adapter *ap)
1600 static inline unsigned int qtimer_val(const struct adapter *adap,
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,
1652 #define for_each_port(adapter, iter) \
1653 for (iter = 0; iter < (adapter)->params.nports; ++iter)
1655 static inline int is_bypass(struct adapter *adap)
1685 static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
1690 static inline unsigned int us_to_core_ticks(const struct adapter *adap,
1696 static inline unsigned int core_ticks_to_us(const struct adapter *adapter,
1700 return ((ticks * 1000 + adapter->params.vpd.cclk/2) /
1701 adapter->params.vpd.cclk);
1704 static inline unsigned int dack_ticks_to_usec(const struct adapter *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,
1726 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd,
1732 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd,
1758 static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
1783 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1786 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1789 void t4_hw_pci_read_cfg4(struct adapter *adapter, int reg, u32 *val);
1793 void t4_intr_enable(struct adapter *adapter);
1794 void t4_intr_disable(struct adapter *adapter);
1795 int t4_slow_intr_handler(struct adapter *adapter);
1799 fw_port_cap32_t t4_link_acaps(struct adapter *adapter, unsigned int port,
1801 int t4_link_l1cfg_core(struct adapter *adap, unsigned int mbox,
1805 static inline int t4_link_l1cfg(struct adapter *adapter, unsigned int mbox,
1808 return t4_link_l1cfg_core(adapter, mbox, port, lc,
1812 static inline int t4_link_l1cfg_ns(struct adapter *adapter, unsigned int mbox,
1815 return t4_link_l1cfg_core(adapter, mbox, port, lc,
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,
1840 unsigned int t4_get_regs_len(struct adapter *adapter);
1841 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1844 int t4_seeprom_wp(struct adapter *adapter, bool enable);
1845 int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p);
1846 int t4_get_vpd_params(struct adapter *adapter, struct vpd_params *p);
1847 int t4_get_pfres(struct adapter *adapter);
1848 int t4_read_flash(struct adapter *adapter, unsigned int addr,
1850 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int 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);
1859 unsigned int t4_flash_cfg_addr(struct adapter *adapter);
1860 int t4_check_fw_version(struct adapter *adap);
1861 int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
1862 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
1863 int t4_get_bs_version(struct adapter *adapter, u32 *vers);
1864 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
1865 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
1866 int t4_get_scfg_version(struct adapter *adapter, u32 *vers);
1867 int t4_get_vpd_version(struct adapter *adapter, u32 *vers);
1868 int t4_get_version_info(struct adapter *adapter);
1869 void t4_dump_version_info(struct adapter *adapter);
1870 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1873 int t4_prep_adapter(struct adapter *adapter);
1874 int t4_shutdown_adapter(struct adapter *adapter);
1877 int t4_bar2_sge_qregs(struct adapter *adapter,
1884 unsigned int qtimer_val(const struct adapter *adap,
1887 int t4_init_devlog_params(struct adapter *adapter);
1888 int t4_init_sge_params(struct adapter *adapter);
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);
1897 void t4_fatal_err(struct adapter *adapter);
1898 unsigned int t4_chip_rss_size(struct adapter *adapter);
1899 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
1901 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
1903 int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
1905 int t4_read_rss(struct adapter *adapter, u16 *entries);
1906 void t4_read_rss_key(struct adapter *adapter, u32 *key, bool sleep_ok);
1907 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
1909 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
1911 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
1913 u32 t4_read_rss_pf_map(struct adapter *adapter, bool sleep_ok);
1914 u32 t4_read_rss_pf_mask(struct adapter *adapter, bool sleep_ok);
1916 unsigned int t4_get_mps_bg_map(struct adapter *adapter, int pidx);
1917 unsigned int t4_get_tp_ch_map(struct adapter *adapter, int pidx);
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);
2063 void t4_db_full(struct adapter *adapter);
2064 void t4_db_dropped(struct adapter *adapter);
2065 int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
2067 void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
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,
2078 int t4_sched_params(struct adapter *adapter, u8 type, u8 level, u8 mode,
2082 void t4_sge_decode_idma_state(struct adapter *adapter, int state);
2083 void t4_idma_monitor_init(struct adapter *adapter,
2085 void t4_idma_monitor(struct adapter *adapter,
2088 int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf,
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);