Lines Matching defs:adapter

478 	unsigned int max_ird_adapter;     /* Max read depth per adapter */
644 struct adapter;
654 struct adapter *adapter;
703 enum { /* adapter flags */
794 struct adapter *adap;
881 struct adapter *adap;
891 struct adapter *adap;
956 struct adapter *adap; /* Backpointer to adapter */
1104 struct adapter {
1476 static inline int is_offload(const struct adapter *adap)
1481 static inline int is_hashfilter(const struct adapter *adap)
1486 static inline int is_pci_uld(const struct adapter *adap)
1491 static inline int is_uld(const struct adapter *adap)
1496 static inline int is_ethofld(const struct adapter *adap)
1501 static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr)
1506 static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val)
1524 static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr)
1529 static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val)
1536 * @adapter: the adapter
1543 static inline void t4_set_hw_addr(struct adapter *adapter, int port_idx,
1546 eth_hw_addr_set(adapter->port[port_idx], hw_addr);
1547 ether_addr_copy(adapter->port[port_idx]->perm_addr, hw_addr);
1563 * @adap: the adapter
1568 static inline struct port_info *adap2pinfo(struct adapter *adap, int idx)
1574 * netdev2adap - return the adapter structure associated with a net_device
1577 * Return the struct adapter associated with a net_device
1579 static inline struct adapter *netdev2adap(const struct net_device *dev)
1581 return netdev2pinfo(dev)->adapter;
1584 /* Return a version number to identify the type of adapter. The scheme is:
1589 static inline unsigned int mk_adap_vers(struct adapter *ap)
1596 static inline unsigned int qtimer_val(const struct adapter *adap,
1607 void t4_os_portmod_changed(struct adapter *adap, int port_id);
1608 void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat);
1610 void t4_free_sge_resources(struct adapter *adap);
1611 void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q);
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,
1648 #define for_each_port(adapter, iter) \
1649 for (iter = 0; iter < (adapter)->params.nports; ++iter)
1651 static inline int is_bypass(struct adapter *adap)
1681 static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
1686 static inline unsigned int us_to_core_ticks(const struct adapter *adap,
1692 static inline unsigned int core_ticks_to_us(const struct adapter *adapter,
1696 return ((ticks * 1000 + adapter->params.vpd.cclk/2) /
1697 adapter->params.vpd.cclk);
1700 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap,
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,
1722 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd,
1728 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd,
1754 static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
1779 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
1782 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
1785 void t4_hw_pci_read_cfg4(struct adapter *adapter, int reg, u32 *val);
1789 void t4_intr_enable(struct adapter *adapter);
1790 void t4_intr_disable(struct adapter *adapter);
1791 int t4_slow_intr_handler(struct adapter *adapter);
1795 fw_port_cap32_t t4_link_acaps(struct adapter *adapter, unsigned int port,
1797 int t4_link_l1cfg_core(struct adapter *adap, unsigned int mbox,
1801 static inline int t4_link_l1cfg(struct adapter *adapter, unsigned int mbox,
1804 return t4_link_l1cfg_core(adapter, mbox, port, lc,
1808 static inline int t4_link_l1cfg_ns(struct adapter *adapter, unsigned int mbox,
1811 return t4_link_l1cfg_core(adapter, mbox, port, lc,
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,
1836 unsigned int t4_get_regs_len(struct adapter *adapter);
1837 void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size);
1840 int t4_seeprom_wp(struct adapter *adapter, bool enable);
1841 int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p);
1842 int t4_get_vpd_params(struct adapter *adapter, struct vpd_params *p);
1843 int t4_get_pfres(struct adapter *adapter);
1844 int t4_read_flash(struct adapter *adapter, unsigned int addr,
1846 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int 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);
1855 unsigned int t4_flash_cfg_addr(struct adapter *adapter);
1856 int t4_check_fw_version(struct adapter *adap);
1857 int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
1858 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
1859 int t4_get_bs_version(struct adapter *adapter, u32 *vers);
1860 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
1861 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
1862 int t4_get_scfg_version(struct adapter *adapter, u32 *vers);
1863 int t4_get_vpd_version(struct adapter *adapter, u32 *vers);
1864 int t4_get_version_info(struct adapter *adapter);
1865 void t4_dump_version_info(struct adapter *adapter);
1866 int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
1869 int t4_prep_adapter(struct adapter *adapter);
1870 int t4_shutdown_adapter(struct adapter *adapter);
1873 int t4_bar2_sge_qregs(struct adapter *adapter,
1880 unsigned int qtimer_val(const struct adapter *adap,
1883 int t4_init_devlog_params(struct adapter *adapter);
1884 int t4_init_sge_params(struct adapter *adapter);
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);
1893 void t4_fatal_err(struct adapter *adapter);
1894 unsigned int t4_chip_rss_size(struct adapter *adapter);
1895 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
1897 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
1899 int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
1901 int t4_read_rss(struct adapter *adapter, u16 *entries);
1902 void t4_read_rss_key(struct adapter *adapter, u32 *key, bool sleep_ok);
1903 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
1905 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
1907 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
1909 u32 t4_read_rss_pf_map(struct adapter *adapter, bool sleep_ok);
1910 u32 t4_read_rss_pf_mask(struct adapter *adapter, bool sleep_ok);
1912 unsigned int t4_get_mps_bg_map(struct adapter *adapter, int pidx);
1913 unsigned int t4_get_tp_ch_map(struct adapter *adapter, int pidx);
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 void t4_wol_magic_enable(struct adapter *adap, unsigned int port,
1963 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
1966 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
1968 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
1969 int t4_early_init(struct adapter *adap, unsigned int mbox);
1970 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
1971 int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
1973 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
1974 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1977 int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf,
1980 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
1983 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
1987 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
1990 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
1995 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
1998 int t4_free_vi(struct adapter *adap, unsigned int mbox,
2001 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
2004 int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
2007 int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, int idx,
2009 int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
2013 int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
2016 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
2019 int t4_free_mac_filt(struct adapter *adap, unsigned int mbox,
2022 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
2024 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
2026 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
2028 int t4_enable_pi_params(struct adapter *adap, unsigned int mbox,
2031 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
2033 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
2035 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2037 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
2039 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
2042 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2045 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2047 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2049 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
2051 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type);
2052 int t4_read_sge_dbqtimers(struct adapter *adap, unsigned int ndbqtimers,
2058 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
2059 void t4_db_full(struct adapter *adapter);
2060 void t4_db_dropped(struct adapter *adapter);
2061 int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
2063 void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
2065 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox,
2067 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
2068 void t4_get_tx_sched(struct adapter *adap, unsigned int sched,
2070 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
2072 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid,
2074 int t4_sched_params(struct adapter *adapter, u8 type, u8 level, u8 mode,
2078 void t4_sge_decode_idma_state(struct adapter *adapter, int state);
2079 void t4_idma_monitor_init(struct adapter *adapter,
2081 void t4_idma_monitor(struct adapter *adapter,
2084 int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf,
2086 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2088 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
2090 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
2093 void t4_uld_mem_free(struct adapter *adap);
2094 int t4_uld_mem_alloc(struct adapter *adap);
2095 void t4_uld_clean_up(struct adapter *adap);
2097 int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port,
2100 int t4_load_boot(struct adapter *adap, u8 *boot_data,
2102 int t4_load_bootcfg(struct adapter *adap,
2104 void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, struct sge_fl *fl);
2105 void free_tx_desc(struct adapter *adap, struct sge_txq *q,
2107 void cxgb4_eosw_txq_free_desc(struct adapter *adap, struct sge_eosw_txq *txq,
2113 void free_txq(struct adapter *adap, struct sge_txq *q);
2114 void cxgb4_reclaim_completed_tx(struct adapter *adap,
2126 void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n);
2127 int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
2131 int cxgb4_thermal_init(struct adapter *adap);
2132 int cxgb4_thermal_remove(struct adapter *adap);
2133 int cxgb4_set_msix_aff(struct adapter *adap, unsigned short vec,
2141 int cxgb4_alloc_mac_filt(struct adapter *adap, unsigned int viid,
2145 int cxgb4_free_mac_filt(struct adapter *adap, unsigned int viid,
2147 int cxgb4_init_mps_ref_entries(struct adapter *adap);
2148 void cxgb4_free_mps_ref_entries(struct adapter *adap);
2149 int cxgb4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
2153 int cxgb4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
2155 int cxgb4_free_raw_mac_filt(struct adapter *adap,
2163 int cxgb4_alloc_raw_mac_filt(struct adapter *adap,
2174 int cxgb4_get_msix_idx_from_bmap(struct adapter *adap);
2175 void cxgb4_free_msix_idx_in_bmap(struct adapter *adap, u32 msix_idx);
2176 void cxgb4_enable_rx(struct adapter *adap, struct sge_rspq *q);
2181 int cxgb4_set_ktls_feature(struct adapter *adap, bool enable);