32#ifndef __CHELSIO_COMMON_H
33#define __CHELSIO_COMMON_H
414#define CHELSIO_T4 0x4
415#define CHELSIO_T5 0x5
416#define CHELSIO_T6 0x6
464#ifndef PCI_VENDOR_ID_CHELSIO
465# define PCI_VENDOR_ID_CHELSIO 0x1425
468#define for_each_port(adapter, iter) \
469 for (iter = 0; iter < (adapter)->params.nports; ++iter)
475 tid <= sc->tids.ftid_end);
482 tid <= sc->tids.hpftid_end);
489 tid <= sc->tids.etid_end);
582 int size,
void *rpl,
bool sleep_ok,
int timeout);
584 void *rpl,
bool sleep_ok);
588 const void *cmd,
int size,
void *rpl,
608 unsigned int data_reg,
u32 *vals,
unsigned int nregs,
609 unsigned int start_idx);
611 unsigned int data_reg,
const u32 *vals,
612 unsigned int nregs,
unsigned int start_idx);
629int t4_eeprom_ptov(
unsigned int phys_addr,
unsigned int fn,
unsigned int sz);
632 u32 *data,
int byte_oriented);
634 unsigned int n,
const u8 *data,
int byte_oriented);
640 unsigned int boot_addr,
unsigned int size);
663 int filter_index,
int enable);
665 int filter_index,
int *enabled);
667 int start,
int n,
const u16 *rspq,
unsigned int nrspq);
671 unsigned int flags,
unsigned int defq,
unsigned int skeyidx,
678 u32 *valp,
bool sleep_ok);
680 u32 val,
bool sleep_ok);
682 u32 *vfl,
u32 *vfh,
bool sleep_ok);
684 u32 vfl,
u32 vfh,
bool sleep_ok);
698 const unsigned int *valp);
703 unsigned int *pif_req_wrptr,
unsigned int *pif_rsp_wrptr);
719 unsigned int naddr,
u8 *addr);
736 unsigned int *ipg,
bool sleep_ok);
738 unsigned int mask,
unsigned int val);
759 const unsigned short *alpha,
const unsigned short *beta);
766 unsigned int start,
unsigned int n);
773 u64 mask0,
u64 mask1,
unsigned int crc,
bool enable);
782 const u8 *fw_data,
unsigned int size,
int force);
785 unsigned int vf,
unsigned int nparams,
const u32 *params,
788 unsigned int vf,
unsigned int nparams,
const u32 *params,
791 unsigned int pf,
unsigned int vf,
792 unsigned int nparams,
const u32 *params,
793 const u32 *val,
int timeout);
795 unsigned int vf,
unsigned int nparams,
const u32 *params,
798 unsigned int vf,
unsigned int txq,
unsigned int txq_eth_ctrl,
799 unsigned int rxqi,
unsigned int rxq,
unsigned int tc,
800 unsigned int vi,
unsigned int cmask,
unsigned int pmask,
801 unsigned int exactf,
unsigned int rcaps,
unsigned int wxcaps);
803 unsigned int port,
unsigned int pf,
unsigned int vf,
804 unsigned int nmac,
u8 *mac,
u16 *rss_size,
805 uint8_t *vfvld, uint16_t *vin,
806 unsigned int portfunc,
unsigned int idstype);
808 unsigned int pf,
unsigned int vf,
unsigned int nmac,
u8 *mac,
809 u16 *rss_size, uint8_t *vfvld, uint16_t *vin);
811 unsigned int pf,
unsigned int vf,
814 int mtu,
int promisc,
int all_multi,
int bcast,
int vlanex,
817 bool free,
unsigned int naddr,
const u8 **addr,
u16 *idx,
818 u64 *hash,
bool sleep_ok);
820 unsigned int viid,
unsigned int naddr,
821 const u8 **addr,
bool sleep_ok);
823 int idx,
bool sleep_ok);
825 const u8 *addr,
const u8 *mask,
unsigned int idx,
826 u8 lookup_type,
u8 port_id,
bool sleep_ok);
828 const u8 *addr,
const u8 *mask,
unsigned int idx,
829 u8 lookup_type,
u8 port_id,
bool sleep_ok);
831 const u8 *addr,
const u8 *mask,
unsigned int vni,
832 unsigned int vni_mask,
u8 dip_hit,
u8 lookup_type,
835 int idx,
const u8 *addr,
bool persist, uint16_t *smt_idx);
837 const u8 *addr,
bool smac);
839 int idx,
const u8 *addr,
bool persist,
u8 *smt_idx,
bool smac);
841 bool ucast,
u64 vec,
bool sleep_ok);
843 unsigned int viid,
bool rx_en,
bool tx_en,
bool dcb_en);
845 bool rx_en,
bool tx_en);
847 unsigned int nblinks);
849 unsigned int mmd,
unsigned int reg,
unsigned int *valp);
851 unsigned int mmd,
unsigned int reg,
unsigned int val);
853 int port,
unsigned int devid,
854 unsigned int offset,
unsigned int len,
855 u8 *buf,
bool write);
857 int port,
unsigned int devid,
858 unsigned int offset,
unsigned int len,
861 int port,
unsigned int devid,
862 unsigned int offset,
unsigned int len,
865 unsigned int vf,
unsigned int iqtype,
unsigned int iqid,
866 unsigned int fl0id,
unsigned int fl1id);
868 unsigned int vf,
unsigned int iqtype,
unsigned int iqid,
869 unsigned int fl0id,
unsigned int fl1id);
871 unsigned int vf,
unsigned int eqid);
873 unsigned int vf,
unsigned int eqid);
875 unsigned int vf,
unsigned int eqid);
877 unsigned int vf,
unsigned int eqid);
890 int rateunit,
int ratemode,
int channel,
int cl,
891 int minrate,
int maxrate,
int weight,
int pktsize,
892 int burstsize,
int sleep_ok);
894 unsigned int maxrate,
int sleep_ok);
896 int weight,
int sleep_ok);
898 int mode,
unsigned int maxrate,
int pktsize,
901 unsigned int pf,
unsigned int vf,
902 unsigned int timeout,
unsigned int action);
908 u32 start_index,
bool sleep_ok);
910 u32 start_index,
bool sleep_ok);
912 u32 start_index,
bool sleep_ok);
914 u32 start_index,
bool sleep_ok);
921 unsigned int nparams,
const u32 *params,
928 unsigned int nparams,
const u32 *params,
947 unsigned int *naddr,
u8 *addr);
950 unsigned int *pbar2_qid);
void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index, u32 *vfl, u32 *vfh, bool sleep_ok)
int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, int weight, int sleep_ok)
uint32_t speed_to_fwcap(unsigned int speed)
int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, int mode, unsigned int maxrate, int pktsize, int sleep_ok)
int t4_shutdown_adapter(struct adapter *adapter)
void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr)
int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype, u32 *data)
void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size)
void t4_tp_get_tnl_stats(struct adapter *adap, struct tp_tnl_stats *st, bool sleep_ok)
int t4_set_sched_bps(struct adapter *adap, int sched, unsigned int kbps)
int t4vf_wait_dev_ready(struct adapter *adapter)
int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid, int start, int n, const u16 *rspq, unsigned int nrspq)
int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, const u8 *fw_data, unsigned int size, int force)
int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int viid)
bool t4_slow_intr_handler(struct adapter *adapter, bool verbose)
int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val)
void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN])
u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach)
int t4_free_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int naddr, const u8 **addr, bool sleep_ok)
int t4_get_vpd_version(struct adapter *adapter, u32 *vers)
int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl, bool sleep_ok, int timeout)
void t4_write_rss_pf_mask(struct adapter *adapter, u32 pfmask, bool sleep_ok)
int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid, const u8 *addr, const u8 *mask, unsigned int idx, u8 lookup_type, u8 port_id, bool sleep_ok)
static int t4_wr_mbox_timeout(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl, int timeout)
int t4_get_flash_params(struct adapter *adapter)
static u_int us_to_tcp_ticks(const struct adapter *adap, u_long us)
void t4_intr_enable(struct adapter *adapter)
int t4_write_flash(struct adapter *adapter, unsigned int addr, unsigned int n, const u8 *data, int byte_oriented)
static int is_ftid(const struct adapter *sc, u_int tid)
void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp)
void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[])
uint32_t fwcap_top_speed(uint32_t caps)
void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs, u32 start_index, bool sleep_ok)
int t4_seeprom_wp(struct adapter *adapter, int enable)
int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size)
int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode)
int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int iqtype, unsigned int iqid, unsigned int fl0id, unsigned int fl1id)
void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, struct tp_tcp_stats *v6, bool sleep_ok)
int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n, const unsigned int *valp)
void t4_idma_monitor_init(struct adapter *adapter, struct sge_idma_monitor_state *idma)
int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size, __be32 *data)
int t4_sched_config(struct adapter *adapter, int type, int minmaxen, int sleep_ok)
int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, u32 *val)
static unsigned int dack_ticks_to_usec(const struct adapter *adap, unsigned int ticks)
int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp, int filter_index, int enable)
int t4_eth_eq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int eqid)
void t4_read_indirect(struct adapter *adap, unsigned int addr_reg, unsigned int data_reg, u32 *vals, unsigned int nregs, unsigned int start_idx)
void t4_sge_decode_idma_state(struct adapter *adapter, int state)
void t4_get_tx_sched(struct adapter *adap, unsigned int sched, unsigned int *kbps, unsigned int *ipg, bool sleep_ok)
int t4_flash_erase_sectors(struct adapter *adapter, int start, int end)
int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n, unsigned int *valp)
int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, u32 *val, int rw)
int t4_hash_mac_addr(const u8 *addr)
int t4_get_tp_version(struct adapter *adapter, u32 *vers)
const struct chip_params * t4_get_chip_params(int chipid)
int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg)
void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx, struct tp_fcoe_stats *st, bool sleep_ok)
int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, unsigned int *naddr, u8 *addr)
void t4_intr_disable(struct adapter *adapter)
static int is_hashfilter(const struct adapter *adap)
int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords, u32 *data, int byte_oriented)
const char * t4_get_port_type_description(enum fw_port_type port_type)
int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op)
void t4_write_rss_pf_map(struct adapter *adapter, u32 pfmap, bool sleep_ok)
static int is_offload(const struct adapter *adap)
int t4_fw_initialize(struct adapter *adap, unsigned int mbox)
void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log)
void t4_idma_monitor(struct adapter *adapter, struct sge_idma_monitor_state *idma, int hz, int ticks)
static int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl)
void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index, u32 *valp, bool sleep_ok)
int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl, bool sleep_ok)
int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid, enum t4_bar2_qtype qtype, int user, u64 *pbar2_qoffset, unsigned int *pbar2_qid)
void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val)
int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid, enum ctxt_type ctype, u32 *data)
void t4_tp_get_proxy_stats(struct adapter *adap, struct tp_proxy_stats *st, bool sleep_ok)
int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset)
int t4_get_bs_version(struct adapter *adapter, u32 *vers)
int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, unsigned int flags)
int t4_fw_bye(struct adapter *adap, unsigned int mbox)
static int t4vf_wr_mbox(struct adapter *adap, const void *cmd, int size, void *rpl)
int t4_i2c_io(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, u8 *buf, bool write)
int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, u16 *rss_size, uint8_t *vfvld, uint16_t *vin, unsigned int portfunc, unsigned int idstype)
int t4_set_params_timeout(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, const u32 *val, int timeout)
int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int *valp)
int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int eqid)
static int t4vf_query_params(struct adapter *adapter, unsigned int nparams, const u32 *params, u32 *vals)
int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, u8 *buf)
void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf)
static int is_t6(struct adapter *adap)
int t4_get_version_info(struct adapter *adapter)
static int t4vf_set_params(struct adapter *adapter, unsigned int nparams, const u32 *params, const u32 *vals)
int t4_i2c_wr(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, u8 *buf)
void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate)
static unsigned int core_ticks_to_us(const struct adapter *adapter, unsigned int ticks)
int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size)
void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, const unsigned short *alpha, const unsigned short *beta)
int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size)
unsigned int t4_get_regs_len(struct adapter *adapter)
int t4_get_scfg_version(struct adapter *adapter, u32 *vers)
int t4_mc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity)
int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, bool ucast, u64 vec, bool sleep_ok)
void t4_write_rss_pf_config(struct adapter *adapter, unsigned int index, u32 val, bool sleep_ok)
int t4_prep_adapter(struct adapter *adapter, u32 *buf)
u32 t4_read_rss_pf_map(struct adapter *adapter, bool sleep_ok)
int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n, unsigned int *valp)
static int is_etid(const struct adapter *sc, u_int tid)
int t4_eeprom_ptov(unsigned int phys_addr, unsigned int fn, unsigned int sz)
int t4vf_get_sge_params(struct adapter *adapter)
int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals, unsigned int start, unsigned int n)
int t4_filter_field_shift(const struct adapter *adap, int filter_sel)
int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, u16 *rss_size, uint8_t *vfvld, uint16_t *vin)
int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl)
void t4_clr_port_stats(struct adapter *adap, int idx)
int t5_fw_init_extern_mem(struct adapter *adap)
int t4_update_port_info(struct port_info *pi)
static u_int tcp_ticks_to_us(const struct adapter *adap, u_int ticks)
int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid, unsigned int flags, unsigned int defq, unsigned int skeyidx, unsigned int skey)
int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int val)
int t4vf_get_rss_glb_config(struct adapter *adapter)
int t4vf_get_vfres(struct adapter *adapter)
void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp, int filter_index, int *enabled)
u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg)
int t4_init_hw(struct adapter *adapter, u32 fw_params)
int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int iqtype, unsigned int iqid, unsigned int fl0id, unsigned int fl1id)
void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st, bool sleep_ok)
int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid, const u8 *addr, const u8 *mask, unsigned int idx, u8 lookup_type, u8 port_id, bool sleep_ok)
int t4_configure_add_smac(struct adapter *adap)
int t4_init_devlog_params(struct adapter *adapter, int fw_attach)
void t4_fatal_err(struct adapter *adapter, bool fw_error)
int t4_config_watchdog(struct adapter *adapter, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int timeout, unsigned int action)
static int chip_id(struct adapter *adap)
int t4_seeprom_write(struct adapter *adapter, u32 addr, u32 data)
u32 t4_read_rss_pf_mask(struct adapter *adapter, bool sleep_ok)
int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size)
int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity)
void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st, bool sleep_ok)
static int chip_rev(struct adapter *adap)
int t4vf_prep_adapter(struct adapter *adapter)
int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, unsigned int maxrate, int sleep_ok)
int t4_fw_restart(struct adapter *adap, unsigned int mbox)
int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, const u32 *val)
int t4_del_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, const u8 *addr, bool smac)
int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid, bool rx_en, bool tx_en)
int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, int idx, bool sleep_ok)
void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx, bool sleep_ok)
void t4_intr_clear(struct adapter *adapter)
void t4_tp_pio_write(struct adapter *adap, const u32 *buff, u32 nregs, u32 start_index, bool sleep_ok)
static int is_t4(struct adapter *adap)
int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type)
void t4_tp_get_tid_stats(struct adapter *adap, struct tp_tid_stats *st, bool sleep_ok)
int t4_sched_params(struct adapter *adapter, int type, int level, int mode, int rateunit, int ratemode, int channel, int cl, int minrate, int maxrate, int weight, int pktsize, int burstsize, int sleep_ok)
int t4_configure_ringbb(struct adapter *adap)
int t4_set_devlog_level(struct adapter *adapter, unsigned int level)
static int is_hpftid(const struct adapter *sc, u_int tid)
void t4_report_fw_error(struct adapter *adap)
void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres)
int t4_add_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, int idx, const u8 *addr, bool persist, u8 *smt_idx, bool smac)
int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, enum dev_master master, enum dev_state *state)
void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st, bool sleep_ok)
static unsigned int core_ticks_per_usec(const struct adapter *adap)
int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port, struct link_config *lc)
int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int eqid)
int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid, bool free, unsigned int naddr, const u8 **addr, u16 *idx, u64 *hash, bool sleep_ok)
int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, u64 mask0, u64 mask1, unsigned int crc, bool enable)
int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr)
static int is_ethoffload(const struct adapter *adap)
void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
static int is_ktls(const struct adapter *adap)
int t4_read_rss(struct adapter *adapter, u16 *entries)
void t4_write_rss_vf_config(struct adapter *adapter, unsigned int index, u32 vfl, u32 vfh, bool sleep_ok)
void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[])
int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, int idx, const u8 *addr, bool persist, uint16_t *smt_idx)
void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs, u32 start_index, bool sleep_ok)
int t4_get_fw_version(struct adapter *adapter, u32 *vers)
int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int txq, unsigned int txq_eth_ctrl, unsigned int rxqi, unsigned int rxq, unsigned int tc, unsigned int vi, unsigned int cmask, unsigned int pmask, unsigned int exactf, unsigned int rcaps, unsigned int wxcaps)
int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port)
int t4vf_fw_reset(struct adapter *adapter)
int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, unsigned int viid, bool rx_en, bool tx_en, bool dcb_en)
int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask)
void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p)
int t4_seeprom_read(struct adapter *adapter, u32 addr, u32 *data)
void t4_read_rss_key(struct adapter *adapter, u32 *key, bool sleep_ok)
int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force)
void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED])
int t4_get_devlog_level(struct adapter *adapter, unsigned int *level)
void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr)
void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr, unsigned int mask, unsigned int val)
void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp, unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr)
static unsigned int us_to_core_ticks(const struct adapter *adap, unsigned int us)
void t4_write_indirect(struct adapter *adap, unsigned int addr_reg, unsigned int data_reg, const u32 *vals, unsigned int nregs, unsigned int start_idx)
static int port_top_speed(const struct port_info *pi)
void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs, u32 start_index, bool sleep_ok)
int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid, int mtu, int promisc, int all_multi, int bcast, int vlanex, bool sleep_ok)
unsigned int fwcap_to_speed(uint32_t caps)
static int is_t5(struct adapter *adap)
int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id)
void t4_get_port_stats_offset(struct adapter *adap, int idx, struct port_stats *stats, struct port_stats *offset)
int t4_init_tp_params(struct adapter *adap)
int t4_init_sge_params(struct adapter *adapter)
const char * t4_link_down_rc_str(unsigned char link_down_rc)
static int is_fpga(struct adapter *adap)
int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr)
int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n)
int t4_get_exprom_version(struct adapter *adapter, u32 *vers)
int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int eqid)
int t4_set_vf_mac(struct adapter *adapter, unsigned int pf, unsigned int vf, unsigned int naddr, u8 *addr)
int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n)
void t4_mk_filtdelwr(unsigned int ftid, struct fw_filter_wr *wr, int qid)
int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, u16 vlan)
static int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl)
int t4_flash_cfg_addr(struct adapter *adapter)
int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int nblinks)
int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, const u8 *addr, const u8 *mask, unsigned int vni, unsigned int vni_mask, u8 dip_hit, u8 lookup_type, bool sleep_ok)
void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st, bool sleep_ok)
struct devlog_params devlog
unsigned short a_wnd[NCCTRL_WIN]
unsigned int max_ird_adapter
bool fr_nsmr_tpte_wr_support
unsigned int smac_add_support
unsigned short mtus[NMTUS]
bool viid_smt_extn_support
unsigned int ofldq_wr_cred
struct vf_resources vfres
unsigned int filter2_wr_support
unsigned int max_pkts_per_eth_tx_pkts_wr
unsigned short b_wnd[NCCTRL_WIN]
unsigned int max_ordird_qp
struct adapter_params params
unsigned int vpd_cap_addr
struct link_config link_cfg
unsigned int idma_stalled[2]
unsigned int idma_state[2]
unsigned int idma_warn[2]
unsigned int idma_1s_thresh
int counter_val[SGE_NCOUNTERS]
int timer_val[SGE_NTIMERS]
u32 sge_fl_buffer_size[SGE_FLBUF_SIZES]
u32 tcp6_in_errs[MAX_NCHAN]
u32 tnl_tx_drops[MAX_NCHAN]
u32 mac_in_errs[MAX_NCHAN]
u32 tnl_cong_drops[MAX_NCHAN]
u32 ofld_vlan_drops[MAX_NCHAN]
u32 tcp_in_errs[MAX_NCHAN]
u32 hdr_in_errs[MAX_NCHAN]
u32 ofld_chan_drops[MAX_NCHAN]
unsigned short tx_modq[MAX_NCHAN]
fw_params_param_dev_fwcache