FreeBSD kernel CXGBE device code
t4_main.c File Reference
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_kern_tls.h"
#include "opt_ratelimit.h"
#include "opt_rss.h"
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/priv.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/eventhandler.h>
#include <sys/module.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <sys/pciio.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pci_private.h>
#include <sys/firmware.h>
#include <sys/sbuf.h>
#include <sys/smp.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_dl.h>
#include <net/if_vlan_var.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include "common/common.h"
#include "common/t4_msg.h"
#include "common/t4_regs.h"
#include "common/t4_regs_values.h"
#include "cudbg/cudbg.h"
#include "t4_clip.h"
#include "t4_ioctl.h"
#include "t4_l2t.h"
#include "t4_mp_ring.h"
#include "t4_if.h"
#include "t4_smt.h"
Include dependency graph for t4_main.c:

Go to the source code of this file.

Data Structures

struct  intrs_and_queues
 
struct  adapter_pre_reset_state
 
struct  memwin_init
 
struct  fw_h
 
struct  fw_info
 
struct  caps_allowed
 
struct  mcaddr_ctx
 
struct  mem_desc
 
struct  field_desc
 
struct  vxlan_evargs
 

Macros

#define NTXQ   16
 
#define NRXQ   8
 
#define NTXQ_VI   1
 
#define NRXQ_VI   1
 
#define TMR_IDX   1
 
#define PKTC_IDX   (-1)
 
#define DEFAULT_CF   "default"
 
#define BUILTIN_CF   "built-in"
 
#define FLASH_CF   "flash"
 
#define UWIRE_CF   "uwire"
 
#define FPGA_CF   "fpga"
 
#define COMPARE_CAPS(c)
 
#define COMPARE_PARAM(p, name)
 
#define T4_CAP
 
#define T4_CAP_ENABLE   (T4_CAP)
 
#define FW_VERSION(chip)
 
#define FW_INTFVER(chip, intf)   (chip##FW_HDR_INTFVER_##intf)
 
#define SAME_INTF(x)   (hdr1->intfver_##x == hdr2->intfver_##x)
 
#define FW_PARAM_DEV(param)
 
#define FW_PARAM_PFVF(param)
 
#define LIMIT_CAPS(x)
 
#define COPY_CAPS(x)
 
#define READ_CAPS(x)
 
#define FW_MAC_EXACT_CHUNK   7
 
#define A_PL_INDIR_CMD   0x1f8
 
#define S_PL_AUTOINC   31
 
#define M_PL_AUTOINC   0x1U
 
#define V_PL_AUTOINC(x)   ((x) << S_PL_AUTOINC)
 
#define G_PL_AUTOINC(x)   (((x) >> S_PL_AUTOINC) & M_PL_AUTOINC)
 
#define S_PL_VFID   20
 
#define M_PL_VFID   0xffU
 
#define V_PL_VFID(x)   ((x) << S_PL_VFID)
 
#define G_PL_VFID(x)   (((x) >> S_PL_VFID) & M_PL_VFID)
 
#define S_PL_ADDR   0
 
#define M_PL_ADDR   0xfffffU
 
#define V_PL_ADDR(x)   ((x) << S_PL_ADDR)
 
#define G_PL_ADDR(x)   (((x) >> S_PL_ADDR) & M_PL_ADDR)
 
#define A_PL_INDIR_DATA   0x1fc
 
#define GET_STAT(name)    read_vf_stat(sc, vin, A_MPS_VF_STAT_##name##_L)
 
#define SYSCTL_CAP(name, n, text)
 
#define T4_REGSTAT(name, stat, desc)
 
#define T4_PORTSTAT(name, desc)
 
#define ulp_region(reg)
 
#define MAX_READ_BUF_SIZE   (128 * 1024)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int t4_probe (device_t)
 
static int t4_attach (device_t)
 
static int t4_detach (device_t)
 
static int t4_child_location (device_t, device_t, struct sbuf *)
 
static int t4_ready (device_t)
 
static int t4_read_port_device (device_t, int, device_t *)
 
static int t4_suspend (device_t)
 
static int t4_resume (device_t)
 
static int t4_reset_prepare (device_t, device_t)
 
static int t4_reset_post (device_t, device_t)
 
static int cxgbe_probe (device_t)
 
static int cxgbe_attach (device_t)
 
static int cxgbe_detach (device_t)
 
static int vcxgbe_probe (device_t)
 
static int vcxgbe_attach (device_t)
 
static int vcxgbe_detach (device_t)
 
static int t5_probe (device_t)
 
static int t6_probe (device_t)
 
static void cxgbe_init (void *)
 
static int cxgbe_ioctl (struct ifnet *, unsigned long, caddr_t)
 
static int cxgbe_transmit (struct ifnet *, struct mbuf *)
 
static void cxgbe_qflush (struct ifnet *)
 
 MALLOC_DEFINE (M_CXGBE, "cxgbe", "Chelsio T4/T5 Ethernet driver and services")
 
 SLIST_HEAD (adapter)
 
static void setup_memwin (struct adapter *)
 
static void position_memwin (struct adapter *, int, uint32_t)
 
static int validate_mem_range (struct adapter *, uint32_t, uint32_t)
 
static int fwmtype_to_hwmtype (int)
 
static int validate_mt_off_len (struct adapter *, int, uint32_t, uint32_t, uint32_t *)
 
static int fixup_devlog_params (struct adapter *)
 
static int cfg_itype_and_nqueues (struct adapter *, struct intrs_and_queues *)
 
static int contact_firmware (struct adapter *)
 
static int partition_resources (struct adapter *)
 
static int get_params__pre_init (struct adapter *)
 
static int set_params__pre_init (struct adapter *)
 
static int get_params__post_init (struct adapter *)
 
static int set_params__post_init (struct adapter *)
 
static void t4_set_desc (struct adapter *)
 
static bool fixed_ifmedia (struct port_info *)
 
static void build_medialist (struct port_info *)
 
static void init_link_config (struct port_info *)
 
static int fixup_link_config (struct port_info *)
 
static int apply_link_config (struct port_info *)
 
static int cxgbe_init_synchronized (struct vi_info *)
 
static int cxgbe_uninit_synchronized (struct vi_info *)
 
static int adapter_full_init (struct adapter *)
 
static void adapter_full_uninit (struct adapter *)
 
static int vi_full_init (struct vi_info *)
 
static void vi_full_uninit (struct vi_info *)
 
static int alloc_extra_vi (struct adapter *, struct port_info *, struct vi_info *)
 
static void quiesce_txq (struct sge_txq *)
 
static void quiesce_wrq (struct sge_wrq *)
 
static void quiesce_iq_fl (struct adapter *, struct sge_iq *, struct sge_fl *)
 
static void quiesce_vi (struct vi_info *)
 
static int t4_alloc_irq (struct adapter *, struct irq *, int rid, driver_intr_t *, void *, char *)
 
static int t4_free_irq (struct adapter *, struct irq *)
 
static void t4_init_atid_table (struct adapter *)
 
static void t4_free_atid_table (struct adapter *)
 
static void get_regs (struct adapter *, struct t4_regdump *, uint8_t *)
 
static void vi_refresh_stats (struct vi_info *)
 
static void cxgbe_refresh_stats (struct vi_info *)
 
static void cxgbe_tick (void *)
 
static void vi_tick (void *)
 
static void cxgbe_sysctls (struct port_info *)
 
static int sysctl_int_array (SYSCTL_HANDLER_ARGS)
 
static int sysctl_bitfield_8b (SYSCTL_HANDLER_ARGS)
 
static int sysctl_bitfield_16b (SYSCTL_HANDLER_ARGS)
 
static int sysctl_btphy (SYSCTL_HANDLER_ARGS)
 
static int sysctl_noflowq (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tx_vm_wr (SYSCTL_HANDLER_ARGS)
 
static int sysctl_holdoff_tmr_idx (SYSCTL_HANDLER_ARGS)
 
static int sysctl_holdoff_pktc_idx (SYSCTL_HANDLER_ARGS)
 
static int sysctl_qsize_rxq (SYSCTL_HANDLER_ARGS)
 
static int sysctl_qsize_txq (SYSCTL_HANDLER_ARGS)
 
static int sysctl_pause_settings (SYSCTL_HANDLER_ARGS)
 
static int sysctl_link_fec (SYSCTL_HANDLER_ARGS)
 
static int sysctl_requested_fec (SYSCTL_HANDLER_ARGS)
 
static int sysctl_module_fec (SYSCTL_HANDLER_ARGS)
 
static int sysctl_autoneg (SYSCTL_HANDLER_ARGS)
 
static int sysctl_force_fec (SYSCTL_HANDLER_ARGS)
 
static int sysctl_handle_t4_reg64 (SYSCTL_HANDLER_ARGS)
 
static int sysctl_temperature (SYSCTL_HANDLER_ARGS)
 
static int sysctl_vdd (SYSCTL_HANDLER_ARGS)
 
static int sysctl_reset_sensor (SYSCTL_HANDLER_ARGS)
 
static int sysctl_loadavg (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cctrl (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cim_ibq_obq (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cim_la (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cim_ma_la (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cim_pif_la (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cim_qcfg (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cpl_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_ddp_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tid_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_devlog (SYSCTL_HANDLER_ARGS)
 
static int sysctl_fcoe_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_hw_sched (SYSCTL_HANDLER_ARGS)
 
static int sysctl_lb_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_linkdnrc (SYSCTL_HANDLER_ARGS)
 
static int sysctl_meminfo (SYSCTL_HANDLER_ARGS)
 
static int sysctl_mps_tcam (SYSCTL_HANDLER_ARGS)
 
static int sysctl_mps_tcam_t6 (SYSCTL_HANDLER_ARGS)
 
static int sysctl_path_mtus (SYSCTL_HANDLER_ARGS)
 
static int sysctl_pm_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_rdma_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tcp_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tids (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tp_err_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tnl_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tp_la_mask (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tp_la (SYSCTL_HANDLER_ARGS)
 
static int sysctl_tx_rate (SYSCTL_HANDLER_ARGS)
 
static int sysctl_ulprx_la (SYSCTL_HANDLER_ARGS)
 
static int sysctl_wcwr_stats (SYSCTL_HANDLER_ARGS)
 
static int sysctl_cpus (SYSCTL_HANDLER_ARGS)
 
static int sysctl_reset (SYSCTL_HANDLER_ARGS)
 
static int get_sge_context (struct adapter *, struct t4_sge_context *)
 
static int load_fw (struct adapter *, struct t4_data *)
 
static int load_cfg (struct adapter *, struct t4_data *)
 
static int load_boot (struct adapter *, struct t4_bootrom *)
 
static int load_bootcfg (struct adapter *, struct t4_data *)
 
static int cudbg_dump (struct adapter *, struct t4_cudbg_dump *)
 
static void free_offload_policy (struct t4_offload_policy *)
 
static int set_offload_policy (struct adapter *, struct t4_offload_policy *)
 
static int read_card_mem (struct adapter *, int, struct t4_mem_range *)
 
static int read_i2c (struct adapter *, struct t4_i2c_data *)
 
static int clear_stats (struct adapter *, u_int)
 
static int hold_clip_addr (struct adapter *, struct t4_clip_addr *)
 
static int release_clip_addr (struct adapter *, struct t4_clip_addr *)
 
static int mod_event (module_t, int, void *)
 
static int notify_siblings (device_t, int)
 
static uint64_t vi_get_counter (struct ifnet *, ift_counter)
 
static uint64_t cxgbe_get_counter (struct ifnet *, ift_counter)
 
static void enable_vxlan_rx (struct adapter *)
 
static void reset_adapter_task (void *, int)
 
static void fatal_error_task (void *, int)
 
static void dump_devlog (struct adapter *)
 
static void dump_cim_regs (struct adapter *)
 
static void dump_cimla (struct adapter *)
 
 CTASSERT (sizeof(struct cluster_metadata)<=CL_METADATA_SIZE)
 
static void t5_attribute_workaround (device_t dev)
 
void t4_init_devnames (struct adapter *sc)
 
static int t4_ifnet_unit (struct adapter *sc, struct port_info *pi)
 
int t4_detach_common (device_t dev)
 
static bool ok_to_reset (struct adapter *sc)
 
static int stop_adapter (struct adapter *sc)
 
static void save_caps_and_params (struct adapter *sc, struct adapter_pre_reset_state *o)
 
static int compare_caps_and_params (struct adapter *sc, struct adapter_pre_reset_state *o)
 
static int reset_adapter (struct adapter *sc)
 
static int cxgbe_vi_attach (device_t dev, struct vi_info *vi)
 
static void cxgbe_vi_detach (struct vi_info *vi)
 
int cxgbe_media_change (struct ifnet *ifp)
 
static int port_mword (struct port_info *pi, uint32_t speed)
 
void cxgbe_media_status (struct ifnet *ifp, struct ifmediareq *ifmr)
 
static void delayed_panic (void *arg)
 
void t4_fatal_err (struct adapter *sc, bool fw_error)
 
void t4_add_adapter (struct adapter *sc)
 
int t4_map_bars_0_and_4 (struct adapter *sc)
 
int t4_map_bar_2 (struct adapter *sc)
 
int rw_via_memwin (struct adapter *sc, int idx, uint32_t addr, uint32_t *val, int len, int rw)
 
int alloc_atid (struct adapter *sc, void *ctx)
 
void * lookup_atid (struct adapter *sc, int atid)
 
void free_atid (struct adapter *sc, int atid)
 
static void queue_tid_release (struct adapter *sc, int tid)
 
void release_tid (struct adapter *sc, int tid, struct sge_wrq *ctrlq)
 
static int t4_range_cmp (const void *a, const void *b)
 
static void update_nirq (struct intrs_and_queues *iaq, int nports)
 
static void calculate_iaq (struct adapter *sc, struct intrs_and_queues *iaq, int itype, int navail)
 
 CTASSERT (offsetof(struct fw_h, fw_ver)==offsetof(struct fw_hdr, fw_ver))
 
 CTASSERT (offsetof(struct fw_h, intfver_nic)==offsetof(struct fw_hdr, intfver_nic))
 
 CTASSERT (offsetof(struct fw_h, intfver_fcoe)==offsetof(struct fw_hdr, intfver_fcoe))
 
static struct fw_infofind_fw_info (int chip)
 
static int fw_compatible (const struct fw_h *hdr1, const struct fw_h *hdr2)
 
static int load_fw_module (struct adapter *sc, const struct firmware **dcfg, const struct firmware **fw)
 
static void unload_fw_module (struct adapter *sc, const struct firmware *dcfg, const struct firmware *fw)
 
static int install_kld_firmware (struct adapter *sc, struct fw_h *card_fw, const struct fw_h *drv_fw, const char *reason, int *already)
 
static int copy_cfg_file_to_card (struct adapter *sc, char *cfg_file, uint32_t mtype, uint32_t moff)
 
static int apply_cfg_and_initialize (struct adapter *sc, char *cfg_file, const struct caps_allowed *caps_allowed)
 
static void ifmedia_add4 (struct ifmedia *ifm, int m)
 
static void set_current_media (struct port_info *pi)
 
static u_int add_maddr (void *arg, struct sockaddr_dl *sdl, u_int cnt)
 
int update_mac_settings (struct ifnet *ifp, int flags)
 
int begin_synchronized_op (struct adapter *sc, struct vi_info *vi, int flags, char *wmesg)
 
void doom_vi (struct adapter *sc, struct vi_info *vi)
 
void end_synchronized_op (struct adapter *sc, int flags)
 
int t4_setup_intr_handlers (struct adapter *sc)
 
static void write_global_rss_key (struct adapter *sc)
 
int adapter_init (struct adapter *sc)
 
int vi_init (struct vi_info *vi)
 
static uint64_t read_vf_stat (struct adapter *sc, u_int vin, int reg)
 
static void t4_get_vi_stats (struct adapter *sc, u_int vin, struct fw_vi_stats_vf *stats)
 
static void t4_clr_vi_stats (struct adapter *sc, u_int vin)
 
void t4_sysctls (struct adapter *sc)
 
void vi_sysctls (struct vi_info *vi)
 
static void sbuf_cim_la4 (struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg)
 
static void sbuf_cim_la6 (struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg)
 
static int sbuf_cim_la (struct adapter *sc, struct sbuf *sb, int flags)
 
void t4_os_cim_err (struct adapter *sc)
 
static int sbuf_devlog (struct adapter *sc, struct sbuf *sb, int flags)
 
static int mem_desc_cmp (const void *a, const void *b)
 
static void mem_region_show (struct sbuf *sb, const char *name, unsigned int from, unsigned int to)
 
static void tcamxy2valmask (uint64_t x, uint64_t y, uint8_t *addr, uint64_t *mask)
 
static void field_desc_show (struct sbuf *sb, uint64_t v, const struct field_desc *f)
 
static void tp_la_show (struct sbuf *sb, uint64_t *p, int idx)
 
static void tp_la_show2 (struct sbuf *sb, uint64_t *p, int idx)
 
static void tp_la_show3 (struct sbuf *sb, uint64_t *p, int idx)
 
int t4_os_find_pci_capability (struct adapter *sc, int cap)
 
int t4_os_pci_save_state (struct adapter *sc)
 
int t4_os_pci_restore_state (struct adapter *sc)
 
void t4_os_portmod_changed (struct port_info *pi)
 
void t4_os_link_changed (struct port_info *pi)
 
void t4_iterate (void(*func)(struct adapter *, void *), void *arg)
 
static int t4_ioctl (struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, struct thread *td)
 
static void calculate_nqueues (int *t, int nc, const int c)
 
static void tweak_tunables (void)
 
static void t4_vxlan_start (struct adapter *sc, void *arg)
 
static void t4_vxlan_stop (struct adapter *sc, void *arg)
 
static void t4_vxlan_start_handler (void *arg __unused, struct ifnet *ifp, sa_family_t family, u_int port)
 
static void t4_vxlan_stop_handler (void *arg __unused, struct ifnet *ifp, sa_family_t family, u_int port)
 
 SX_SYSINIT (cxgbe_mlu, &mlu, "cxgbe mod load/unload")
 
 DRIVER_MODULE (t4nex, pci, t4_driver, t4_devclass, mod_event, 0)
 
 MODULE_VERSION (t4nex, 1)
 
 MODULE_DEPEND (t4nex, firmware, 1, 1, 1)
 
 DRIVER_MODULE (t5nex, pci, t5_driver, t5_devclass, mod_event, 0)
 
 MODULE_VERSION (t5nex, 1)
 
 MODULE_DEPEND (t5nex, firmware, 1, 1, 1)
 
 DRIVER_MODULE (t6nex, pci, t6_driver, t6_devclass, mod_event, 0)
 
 MODULE_VERSION (t6nex, 1)
 
 MODULE_DEPEND (t6nex, firmware, 1, 1, 1)
 
 DRIVER_MODULE (cxgbe, t4nex, cxgbe_driver, cxgbe_devclass, 0, 0)
 
 MODULE_VERSION (cxgbe, 1)
 
 DRIVER_MODULE (cxl, t5nex, cxl_driver, cxl_devclass, 0, 0)
 
 MODULE_VERSION (cxl, 1)
 
 DRIVER_MODULE (cc, t6nex, cc_driver, cc_devclass, 0, 0)
 
 MODULE_VERSION (cc, 1)
 
 DRIVER_MODULE (vcxgbe, cxgbe, vcxgbe_driver, vcxgbe_devclass, 0, 0)
 
 MODULE_VERSION (vcxgbe, 1)
 
 DRIVER_MODULE (vcxl, cxl, vcxl_driver, vcxl_devclass, 0, 0)
 
 MODULE_VERSION (vcxl, 1)
 
 DRIVER_MODULE (vcc, cc, vcc_driver, vcc_devclass, 0, 0)
 
 MODULE_VERSION (vcc, 1)
 

Variables

static device_method_t t4_methods []
 
static driver_t t4_driver
 
device_method_t cxgbe_methods []
 
static driver_t cxgbe_driver
 
static device_method_t vcxgbe_methods []
 
static driver_t vcxgbe_driver
 
static d_ioctl_t t4_ioctl
 
static struct cdevsw t4_cdevsw
 
static device_method_t t5_methods []
 
static driver_t t5_driver
 
static driver_t cxl_driver
 
static driver_t vcxl_driver
 
static device_method_t t6_methods []
 
static driver_t t6_driver
 
static driver_t cc_driver
 
static driver_t vcc_driver
 
static struct sx t4_list_lock
 
struct {
   uint16_t   device
 
   char *   desc
 
t4_pciids []
 
struct {
   uint16_t   device
 
   char *   desc
 
t5_pciids []
 
struct {
   uint16_t   device
 
   char *   desc
 
t6_pciids []
 
static const struct devnames devnames []
 
static struct callout fatal_callout
 
static struct taskqueue * reset_tq
 
static const struct memwin_init t4_memwin [NUM_MEMWIN]
 
static const struct memwin_init t5_memwin [NUM_MEMWIN]
 
struct fw_info fw_info []
 
static char * caps_decoder []
 
static const char * qname [CIM_NUM_IBQ+CIM_NUM_OBQ_T5]
 
static const char *const devlog_level_strings []
 
static const char *const devlog_facility_strings []
 
static const struct field_desc tp_la0 []
 
static const struct field_desc tp_la1 []
 
static const struct field_desc tp_la2 []
 
static eventhandler_tag vxlan_start_evtag
 
static eventhandler_tag vxlan_stop_evtag
 
static struct sx mlu
 
static devclass_t t4_devclass
 
static devclass_t t5_devclass
 
static devclass_t t6_devclass
 
static devclass_t cxgbe_devclass
 
static devclass_t cxl_devclass
 
static devclass_t cc_devclass
 
static devclass_t vcxgbe_devclass
 
static devclass_t vcxl_devclass
 
static devclass_t vcc_devclass
 

Macro Definition Documentation

◆ A_PL_INDIR_CMD

#define A_PL_INDIR_CMD   0x1f8

Definition at line 6996 of file t4_main.c.

◆ A_PL_INDIR_DATA

#define A_PL_INDIR_DATA   0x1fc

Definition at line 7013 of file t4_main.c.

◆ BUILTIN_CF

#define BUILTIN_CF   "built-in"

◆ COMPARE_CAPS

#define COMPARE_CAPS (   c)
Value:
do { \
if (o->c##caps != sc->c##caps) { \
CH_ERR(sc, "%scaps 0x%04x -> 0x%04x.\n", #c, o->c##caps, \
sc->c##caps); \
rc = EINVAL; \
} \
} while (0)

◆ COMPARE_PARAM

#define COMPARE_PARAM (   p,
  name 
)
Value:
do { \
if (o->p != sc->p) { \
CH_ERR(sc, #name " %d -> %d\n", o->p, sc->p); \
rc = EINVAL; \
} \
} while (0)

◆ COPY_CAPS

#define COPY_CAPS (   x)
Value:
do { \
caps_allowed.x##caps = t4_##x##caps_allowed; \
} while (0)

◆ DEFAULT_CF

#define DEFAULT_CF   "default"

◆ FLASH_CF

#define FLASH_CF   "flash"

◆ FPGA_CF

#define FPGA_CF   "fpga"

◆ FW_INTFVER

#define FW_INTFVER (   chip,
  intf 
)    (chip##FW_HDR_INTFVER_##intf)

Definition at line 4346 of file t4_main.c.

◆ FW_MAC_EXACT_CHUNK

#define FW_MAC_EXACT_CHUNK   7

Definition at line 5938 of file t4_main.c.

◆ FW_PARAM_DEV

#define FW_PARAM_DEV (   param)
Value:
V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param))
#define V_FW_PARAMS_MNEM(x)
@ FW_PARAMS_MNEM_DEV

Definition at line 4832 of file t4_main.c.

◆ FW_PARAM_PFVF

#define FW_PARAM_PFVF (   param)
Value:
V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_PFVF_##param))
@ FW_PARAMS_MNEM_PFVF

Definition at line 4835 of file t4_main.c.

◆ FW_VERSION

#define FW_VERSION (   chip)
Value:
( \
V_FW_HDR_FW_VER_MAJOR(chip##FW_VERSION_MAJOR) | \
V_FW_HDR_FW_VER_MINOR(chip##FW_VERSION_MINOR) | \
V_FW_HDR_FW_VER_MICRO(chip##FW_VERSION_MICRO) | \
V_FW_HDR_FW_VER_BUILD(chip##FW_VERSION_BUILD))

Definition at line 4341 of file t4_main.c.

◆ G_PL_ADDR

#define G_PL_ADDR (   x)    (((x) >> S_PL_ADDR) & M_PL_ADDR)

Definition at line 7011 of file t4_main.c.

◆ G_PL_AUTOINC

#define G_PL_AUTOINC (   x)    (((x) >> S_PL_AUTOINC) & M_PL_AUTOINC)

Definition at line 7001 of file t4_main.c.

◆ G_PL_VFID

#define G_PL_VFID (   x)    (((x) >> S_PL_VFID) & M_PL_VFID)

Definition at line 7006 of file t4_main.c.

◆ GET_STAT

#define GET_STAT (   name)     read_vf_stat(sc, vin, A_MPS_VF_STAT_##name##_L)

◆ LIMIT_CAPS

#define LIMIT_CAPS (   x)
Value:
do { \
caps.x##caps &= htobe16(caps_allowed->x##caps); \
} while (0)

◆ M_PL_ADDR

#define M_PL_ADDR   0xfffffU

Definition at line 7009 of file t4_main.c.

◆ M_PL_AUTOINC

#define M_PL_AUTOINC   0x1U

Definition at line 6999 of file t4_main.c.

◆ M_PL_VFID

#define M_PL_VFID   0xffU

Definition at line 7004 of file t4_main.c.

◆ MAX_READ_BUF_SIZE

#define MAX_READ_BUF_SIZE   (128 * 1024)

Definition at line 11828 of file t4_main.c.

◆ NRXQ

#define NRXQ   8

◆ NRXQ_VI

#define NRXQ_VI   1

◆ NTXQ

#define NTXQ   16

◆ NTXQ_VI

#define NTXQ_VI   1

◆ PKTC_IDX

#define PKTC_IDX   (-1)

◆ READ_CAPS

#define READ_CAPS (   x)
Value:
do { \
sc->x = htobe16(caps.x); \
} while (0)

◆ S_PL_ADDR

#define S_PL_ADDR   0

Definition at line 7008 of file t4_main.c.

◆ S_PL_AUTOINC

#define S_PL_AUTOINC   31

Definition at line 6998 of file t4_main.c.

◆ S_PL_VFID

#define S_PL_VFID   20

Definition at line 7003 of file t4_main.c.

◆ SAME_INTF

#define SAME_INTF (   x)    (hdr1->intfver_##x == hdr2->intfver_##x)

◆ SYSCTL_CAP

#define SYSCTL_CAP (   name,
  n,
  text 
)
Value:
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, #name, \
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, caps_decoder[n], \
(uintptr_t)&sc->name, sysctl_bitfield_16b, "A", \
"available " text " capabilities")
static char * caps_decoder[]
Definition: t4_main.c:7159
static int sysctl_bitfield_16b(SYSCTL_HANDLER_ARGS)
Definition: t4_main.c:8034

◆ T4_CAP

#define T4_CAP
Value:
(IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \
IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HWSTATS | \
IFCAP_HWRXTSTMP | IFCAP_MEXTPG)

Definition at line 2441 of file t4_main.c.

◆ T4_CAP_ENABLE

#define T4_CAP_ENABLE   (T4_CAP)

Definition at line 2445 of file t4_main.c.

◆ T4_PORTSTAT

#define T4_PORTSTAT (   name,
  desc 
)
Value:
SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, #name, CTLFLAG_RD, \
&pi->stats.name, desc)
#define SYSCTL_ADD_UQUAD
Definition: adapter.h:82
char * desc
Definition: t4_main.c:875

◆ T4_REGSTAT

#define T4_REGSTAT (   name,
  stat,
  desc 
)
Value:
SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \
CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \
(is_t4(sc) ? PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##stat##_L) : \
T5_PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##stat##_L)), \
#define CTLTYPE_U64
Definition: adapter.h:84
static int is_t4(struct adapter *adap)
Definition: common.h:522
static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS)
Definition: t4_main.c:8598
#define T5_PORT_REG(idx, reg)
Definition: t4_regs.h:288
#define PORT_REG(idx, reg)
Definition: t4_regs.h:101

◆ TMR_IDX

#define TMR_IDX   1

◆ ulp_region

#define ulp_region (   reg)
Value:
md->base = t4_read_reg(sc, A_ULP_ ## reg ## _LLIMIT);\
(md++)->limit = t4_read_reg(sc, A_ULP_ ## reg ## _ULIMIT)
static uint32_t t4_read_reg(struct adapter *sc, uint32_t reg)
Definition: adapter.h:1104

◆ UWIRE_CF

#define UWIRE_CF   "uwire"

◆ V_PL_ADDR

#define V_PL_ADDR (   x)    ((x) << S_PL_ADDR)

Definition at line 7010 of file t4_main.c.

◆ V_PL_AUTOINC

#define V_PL_AUTOINC (   x)    ((x) << S_PL_AUTOINC)

Definition at line 7000 of file t4_main.c.

◆ V_PL_VFID

#define V_PL_VFID (   x)    ((x) << S_PL_VFID)

Definition at line 7005 of file t4_main.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ adapter_full_init()

static int adapter_full_init ( struct adapter sc)
static

Definition at line 6534 of file t4_main.c.

References ASSERT_SYNCHRONIZED_OP, CH_ERR, adapter::dev, adapter::flags, IS_VF, t4_intr_enable(), t4_setup_adapter_queues(), adapter::tq, and write_global_rss_key().

Referenced by adapter_init(), and t4_resume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adapter_full_uninit()

static void adapter_full_uninit ( struct adapter sc)
static

Definition at line 6590 of file t4_main.c.

References adapter::flags, t4_teardown_adapter_queues(), and adapter::tq.

Referenced by adapter_init(), and t4_detach_common().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adapter_init()

int adapter_init ( struct adapter sc)

Definition at line 6568 of file t4_main.c.

References adapter_full_init(), adapter_full_uninit(), ADAPTER_LOCK_ASSERT_NOTOWNED, ASSERT_SYNCHRONIZED_OP, adapter::flags, and FULL_INIT_DONE.

Referenced by cxgbe_init_synchronized(), and set_filter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_maddr()

static u_int add_maddr ( void *  arg,
struct sockaddr_dl *  sdl,
u_int  cnt 
)
static

Definition at line 5949 of file t4_main.c.

References port_info::adapter, vi_info::ctx, adapter::ctx, FW_MAC_EXACT_CHUNK, adapter::mbox, vi_info::pi, t4_alloc_mac_filt(), port_info::vi, and vi_info::viid.

Referenced by update_mac_settings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ alloc_atid()

int alloc_atid ( struct adapter sc,
void *  ctx 
)

Definition at line 3851 of file t4_main.c.

References tid_info::afree, tid_info::atid_tab, tid_info::atids_in_use, aopen_entry::data, M_TID_TID, aopen_entry::next, and adapter::tids.

Referenced by set_hashfilter().

Here is the caller graph for this function:

◆ alloc_extra_vi()

static int alloc_extra_vi ( struct adapter sc,
struct port_info pi,
struct vi_info vi 
)
static

◆ apply_cfg_and_initialize()

◆ apply_link_config()

◆ begin_synchronized_op()

◆ build_medialist()

static void build_medialist ( struct port_info pi)
static

◆ calculate_iaq()

◆ calculate_nqueues()

static void calculate_nqueues ( int *  t,
int  nc,
const int  c 
)
static

Definition at line 12641 of file t4_main.c.

Referenced by tweak_tunables().

Here is the caller graph for this function:

◆ cfg_itype_and_nqueues()

static int cfg_itype_and_nqueues ( struct adapter sc,
struct intrs_and_queues iaq 
)
static

Definition at line 4285 of file t4_main.c.

References calculate_iaq(), adapter::dev, INTR_MSI, INTR_MSIX, intrs_and_queues::nirq, and t4_intr_types.

Referenced by t4_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_stats()

static int clear_stats ( struct adapter sc,
u_int  port_id 
)
static

Definition at line 11901 of file t4_main.c.

References A_TP_MIB_DATA, A_TP_MIB_INDEX, A_TP_MIB_TNL_CNG_DROP_0, sge_fl::cl_allocated, sge_fl::cl_fast_recycled, sge_fl::cl_recycled, sge::ctrlq, port_info::fcs_base, port_info::fcs_reg, sge_rxq::fl, sge_ofld_rxq::fl, vi_info::flags, for_each_ofld_rxq, for_each_ofld_txq, for_each_rxq, for_each_txq, for_each_vi, hw_off_limits(), sge_txq::imm_wrs, IS_MAIN_VI, is_t6(), sge_txq::kern_tls_cbc, sge_txq::kern_tls_fin, sge_txq::kern_tls_fin_short, sge_txq::kern_tls_full, sge_txq::kern_tls_gcm, sge_txq::kern_tls_header, sge_txq::kern_tls_octets, sge_txq::kern_tls_options, sge_txq::kern_tls_partial, sge_txq::kern_tls_records, sge_txq::kern_tls_short, sge_txq::kern_tls_waste, sge_rxq::lro, mp_ring_reset_stats(), adapter_params::nports, adapter::params, adapter::port, port_info::port_id, sge_txq::r, sge_txq::raw_wrs, adapter::reg_lock, port_info::rx_e_chan_map, port_stats::rx_fcs_err, sge_ofld_rxq::rx_iscsi_ddp_octets, sge_ofld_rxq::rx_iscsi_ddp_pdus, sge_ofld_rxq::rx_iscsi_ddp_setup_error, sge_ofld_rxq::rx_iscsi_ddp_setup_ok, sge_ofld_rxq::rx_iscsi_fl_octets, sge_ofld_rxq::rx_iscsi_fl_pdus, sge_ofld_rxq::rx_toe_tls_octets, sge_ofld_rxq::rx_toe_tls_records, sge_rxq::rxcsum, rxq, adapter::sge, sge_txq::sgl_wrs, port_info::stats, t4_clr_port_stats(), t4_clr_vi_stats(), t4_read_reg64(), t4_write_indirect(), port_info::tnl_cong_drops, sge_txq::tso_wrs, port_info::tx_chan, sge_ofld_txq::tx_iscsi_iso_wrs, sge_ofld_txq::tx_iscsi_octets, sge_ofld_txq::tx_iscsi_pdus, port_info::tx_parse_error, sge_ofld_txq::tx_toe_tls_octets, sge_ofld_txq::tx_toe_tls_records, sge_wrq::tx_wrs_copied, sge_wrq::tx_wrs_direct, sge_txq::txcsum, sge_txq::txpkt_wrs, sge_txq::txpkts0_pkts, sge_txq::txpkts0_wrs, sge_txq::txpkts1_pkts, sge_txq::txpkts1_wrs, sge_txq::txpkts_flush, VI_INIT_DONE, vi_info::vin, sge_rxq::vlan_extraction, sge_txq::vlan_insertion, sge_rxq::vxlan_rxcsum, sge_txq::vxlan_tso_wrs, sge_txq::vxlan_txcsum, wrq, and sge_ofld_txq::wrq.

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_caps_and_params()

static int compare_caps_and_params ( struct adapter sc,
struct adapter_pre_reset_state o 
)
static

◆ contact_firmware()

static int contact_firmware ( struct adapter sc)
static

◆ copy_cfg_file_to_card()

static int copy_cfg_file_to_card ( struct adapter sc,
char *  cfg_file,
uint32_t  mtype,
uint32_t  moff 
)
static

Definition at line 4743 of file t4_main.c.

References chip_id(), DEFAULT_CF, adapter::dev, find_fw_info(), FLASH_CFG_MAX_SIZE, FPGA_CF, fw_info, is_fpga(), fw_info::kld_name, load_fw_module(), unload_fw_module(), UWIRE_CF, validate_mt_off_len(), and write_via_memwin().

Referenced by apply_cfg_and_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTASSERT() [1/4]

CTASSERT ( offsetof(struct fw_h, fw_ver)  = =offsetof(struct fw_hdr, fw_ver))

◆ CTASSERT() [2/4]

CTASSERT ( offsetof(struct fw_h, intfver_fcoe)  = =offsetof(struct fw_hdr, intfver_fcoe))

◆ CTASSERT() [3/4]

CTASSERT ( offsetof(struct fw_h, intfver_nic)  = =offsetof(struct fw_hdr, intfver_nic))

◆ CTASSERT() [4/4]

CTASSERT ( sizeof(struct cluster_metadata)<=  CL_METADATA_SIZE)

Referenced by write_global_rss_key().

Here is the caller graph for this function:

◆ cudbg_dump()

static int cudbg_dump ( struct adapter sc,
struct t4_cudbg_dump dump 
)
static

◆ cxgbe_attach()

static int cxgbe_attach ( device_t  dev)
static

◆ cxgbe_detach()

static int cxgbe_detach ( device_t  dev)
static

◆ cxgbe_get_counter()

◆ cxgbe_init()

static void cxgbe_init ( void *  arg)
static

Definition at line 2684 of file t4_main.c.

References vi_info::adapter, begin_synchronized_op(), cxgbe_init_synchronized(), end_synchronized_op(), INTR_OK, and SLEEP_OK.

Referenced by cxgbe_vi_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxgbe_init_synchronized()

◆ cxgbe_ioctl()

◆ cxgbe_media_change()

◆ cxgbe_media_status()

void cxgbe_media_status ( struct ifnet *  ifp,
struct ifmediareq *  ifmr 
)

◆ cxgbe_probe()

static int cxgbe_probe ( device_t  dev)
static

Definition at line 2430 of file t4_main.c.

References port_info::dev, and port_info::port_id.

◆ cxgbe_qflush()

static void cxgbe_qflush ( struct ifnet *  ifp)
static

Definition at line 3001 of file t4_main.c.

References sge_txq::eq, EQ_QFLUSH, vi_info::flags, sge_eq::flags, for_each_txq, ifp, mp_ring_check_drainage(), mp_ring_is_idle(), sge_txq::r, TXQ_LOCK, TXQ_UNLOCK, and VI_INIT_DONE.

Referenced by cxgbe_vi_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxgbe_refresh_stats()

static void cxgbe_refresh_stats ( struct vi_info vi)
static

◆ cxgbe_sysctls()

◆ cxgbe_tick()

static void cxgbe_tick ( void *  arg)
static

Definition at line 7134 of file t4_main.c.

References cxgbe_refresh_stats(), IS_MAIN_VI, vi_info::tick, and vi_info::tick_mtx.

Referenced by cxgbe_init_synchronized().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxgbe_transmit()

static int cxgbe_transmit ( struct ifnet *  ifp,
struct mbuf *  m 
)
static

◆ cxgbe_uninit_synchronized()

◆ cxgbe_vi_attach()

◆ cxgbe_vi_detach()

static void cxgbe_vi_detach ( struct vi_info vi)
static

Definition at line 2629 of file t4_main.c.

References vi_info::ctx, cxgbe_uninit_synchronized(), ifp, vi_info::ifp, vi_info::pfil, vi_info::tick, and vi_full_uninit().

Referenced by cxgbe_detach(), and vcxgbe_detach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delayed_panic()

static void delayed_panic ( void *  arg)
static

Definition at line 3515 of file t4_main.c.

References adapter::dev.

Referenced by fatal_error_task().

Here is the caller graph for this function:

◆ doom_vi()

void doom_vi ( struct adapter sc,
struct vi_info vi 
)

Definition at line 6183 of file t4_main.c.

References ADAPTER_LOCK, ADAPTER_UNLOCK, adapter::flags, IS_BUSY, adapter::last_op, adapter::last_op_flags, adapter::last_op_thr, adapter::sc_lock, SET_BUSY, and SET_DOOMED.

Referenced by cxgbe_detach(), and vcxgbe_detach().

Here is the caller graph for this function:

◆ DRIVER_MODULE() [1/9]

DRIVER_MODULE ( cc  ,
t6nex  ,
cc_driver  ,
cc_devclass  ,
,
 
)

◆ DRIVER_MODULE() [2/9]

DRIVER_MODULE ( cxgbe  ,
t4nex  ,
cxgbe_driver  ,
cxgbe_devclass  ,
,
 
)

◆ DRIVER_MODULE() [3/9]

DRIVER_MODULE ( cxl  ,
t5nex  ,
cxl_driver  ,
cxl_devclass  ,
,
 
)

◆ DRIVER_MODULE() [4/9]

DRIVER_MODULE ( t4nex  ,
pci  ,
t4_driver  ,
t4_devclass  ,
mod_event  ,
 
)

◆ DRIVER_MODULE() [5/9]

DRIVER_MODULE ( t5nex  ,
pci  ,
t5_driver  ,
t5_devclass  ,
mod_event  ,
 
)

◆ DRIVER_MODULE() [6/9]

DRIVER_MODULE ( t6nex  ,
pci  ,
t6_driver  ,
t6_devclass  ,
mod_event  ,
 
)

◆ DRIVER_MODULE() [7/9]

DRIVER_MODULE ( vcc  ,
cc  ,
vcc_driver  ,
vcc_devclass  ,
,
 
)

◆ DRIVER_MODULE() [8/9]

DRIVER_MODULE ( vcxgbe  ,
cxgbe  ,
vcxgbe_driver  ,
vcxgbe_devclass  ,
,
 
)

◆ DRIVER_MODULE() [9/9]

DRIVER_MODULE ( vcxl  ,
cxl  ,
vcxl_driver  ,
vcxl_devclass  ,
,
 
)

◆ dump_cim_regs()

static void dump_cim_regs ( struct adapter sc)
static

Definition at line 8985 of file t4_main.c.

References A_EDC_H_BIST_CMD_LEN, A_EDC_H_BIST_DATA_PATTERN, A_EDC_H_BIST_STATUS_RDATA, A_EDC_H_BIST_USER_WDATA0, A_EDC_H_BIST_USER_WDATA1, A_EDC_H_BIST_USER_WDATA2, adapter::dev, and t4_read_reg().

Referenced by fatal_error_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_cimla()

static void dump_cimla ( struct adapter sc)
static

Definition at line 9004 of file t4_main.c.

References adapter::dev, and sbuf_cim_la().

Referenced by fatal_error_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_devlog()

static void dump_devlog ( struct adapter sc)
static

Definition at line 9445 of file t4_main.c.

References adapter::dev, and sbuf_devlog().

Referenced by fatal_error_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable_vxlan_rx()

static void enable_vxlan_rx ( struct adapter sc)
static

Definition at line 12955 of file t4_main.c.

References A_MPS_RX_VXLAN_TYPE, ASSERT_SYNCHRONIZED_OP, CH_ERR, F_VXLAN_EN, for_each_port, adapter::port, port_info::port_id, adapter::rawf_base, t4_alloc_raw_mac_filt(), t4_write_reg(), V_VXLAN, port_info::vi, vi_info::viid, adapter::vxlan_port, and port_info::vxlan_tcam_entry.

Referenced by t4_resume(), and t4_vxlan_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end_synchronized_op()

◆ fatal_error_task()

static void fatal_error_task ( void *  arg,
int  pending 
)
static

Definition at line 3523 of file t4_main.c.

References ADAP_CIM_ERR, CH_ALERT, delayed_panic(), dump_cim_regs(), dump_cimla(), dump_devlog(), adapter::error_flags, fatal_callout, ilog2(), and reset_adapter().

Referenced by t4_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ field_desc_show()

static void field_desc_show ( struct sbuf *  sb,
uint64_t  v,
const struct field_desc f 
)
static

Definition at line 10695 of file t4_main.c.

References field_desc::name, field_desc::start, and field_desc::width.

Referenced by tp_la_show(), tp_la_show2(), and tp_la_show3().

Here is the caller graph for this function:

◆ find_fw_info()

static struct fw_info * find_fw_info ( int  chip)
static

Definition at line 4427 of file t4_main.c.

References fw_info::chip.

Referenced by contact_firmware(), copy_cfg_file_to_card(), and load_fw_module().

Here is the caller graph for this function:

◆ fixed_ifmedia()

◆ fixup_devlog_params()

static int fixup_devlog_params ( struct adapter sc)
static

Definition at line 4118 of file t4_main.c.

References devlog_params::addr, adapter_params::devlog, devlog_params::memtype, adapter::params, devlog_params::size, devlog_params::start, and validate_mt_off_len().

Referenced by get_params__pre_init(), and t4_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fixup_link_config()

◆ free_atid()

void free_atid ( struct adapter sc,
int  atid 
)

Definition at line 3879 of file t4_main.c.

References tid_info::afree, tid_info::atid_tab, tid_info::atids_in_use, aopen_entry::next, and adapter::tids.

Referenced by set_hashfilter(), and t4_hashfilter_ao_rpl().

Here is the caller graph for this function:

◆ free_offload_policy()

static void free_offload_policy ( struct t4_offload_policy op)
static

Definition at line 11722 of file t4_main.c.

References t4_offload_policy::nrules, r, and t4_offload_policy::rule.

Referenced by set_offload_policy(), and t4_detach_common().

Here is the caller graph for this function:

◆ fw_compatible()

static int fw_compatible ( const struct fw_h hdr1,
const struct fw_h hdr2 
)
static

Definition at line 4443 of file t4_main.c.

References fw_h::chip, fw_h::fw_ver, and SAME_INTF.

Referenced by install_kld_firmware().

Here is the caller graph for this function:

◆ fwmtype_to_hwmtype()

static int fwmtype_to_hwmtype ( int  mtype)
static

Definition at line 4051 of file t4_main.c.

References FW_MEMTYPE_EDC0, FW_MEMTYPE_EDC1, FW_MEMTYPE_EXTMEM, FW_MEMTYPE_EXTMEM1, MEM_EDC0, MEM_EDC1, MEM_MC0, and MEM_MC1.

Referenced by validate_mt_off_len().

Here is the caller graph for this function:

◆ get_params__post_init()

static int get_params__post_init ( struct adapter sc)
static

Definition at line 5119 of file t4_main.c.

References A_LE_DB_ACTIVE_TABLE_START_INDEX, adapter_params::a_wnd, adapter_params::b_wnd, fw_caps_config_cmd::cfvalid_to_len16, CHELSIO_T4, CHELSIO_T6, chip_id(), adapter::chip_params, adapter_params::core_vdd, t4_virt_res::cq, adapter::cryptocaps, fw_caps_config_cmd::cryptocaps, t4_virt_res::ddp, adapter::dev, adapter_params::dev_512sgl_mr, adapter_params::eo_wr_cred, sge::eq_start, sge::eqmap_sz, adapter_params::ethoffload, tid_info::etid_base, tid_info::etid_end, F_FW_CMD_READ, F_FW_CMD_REQUEST, fw_caps_config_cmd::fcoecaps, adapter_params::filter2_wr_support, adapter_params::fr_nsmr_tpte_wr_support, tid_info::ftid_base, tid_info::ftid_end, FW_CAPS_CONFIG_CMD, FW_CAPS_CONFIG_NIC_ETHOFLD, FW_CAPS_CONFIG_NIC_HASHFILTER, FW_CAPS_CONFIG_TLSKEYS, FW_LEN16, FW_PARAM_DEV, FW_PARAM_DEV_DIAG_VDD, FW_PARAM_PFVF, FW_PARAMS_MNEM_DEV, FW_PARAMS_PARAM_DEV_DIAG, adapter_params::fw_vers, FW_VERSION32, adapter_params::hash_filter, tid_info::hpftid_base, tid_info::hpftid_end, sge::iq_start, sge::iqmap_sz, t4_virt_res::iscsi, adapter::iscsicaps, fw_caps_config_cmd::iscsicaps, t4_virt_res::key, t4_virt_res::l2t, L2T_SIZE, fw_caps_config_cmd::linkcaps, MAX_ATIDS, adapter_params::max_ird_adapter, adapter_params::max_ordird_qp, adapter_params::max_pkts_per_eth_tx_pkts_wr, adapter::mbox, adapter_params::mps_bg_map, adapter_params::mtus, tid_info::natids, fw_caps_config_cmd::nbmcaps, tid_info::netids, tid_info::nftids, tid_info::nhpftids, adapter::niccaps, fw_caps_config_cmd::niccaps, adapter::nrawf, chip_params::nsched_cls, adapter_params::nsched_cls, tid_info::nstids, tid_info::ntids, t4_virt_res::ocq, adapter_params::offload, adapter_params::ofldq_wr_cred, fw_caps_config_cmd::op_to_write, adapter::params, t4_virt_res::pbl, adapter::pf, t4_virt_res::qp, adapter::rawf_base, adapter::rdmacaps, fw_caps_config_cmd::rdmacaps, READ_CAPS, t4_virt_res::rq, adapter::sge, t4_range::size, t4_virt_res::srq, t4_virt_res::stag, t4_range::start, tid_info::stid_base, fw_caps_config_cmd::switchcaps, t4_init_rx_buf_info(), t4_init_sge_params(), t4_init_tp_params(), t4_load_mtus(), t4_query_params(), t4_read_mtu_tbl(), t4_read_reg(), t4_verify_chip_settings(), t4_wr_mbox(), tid_info::tid_base, adapter::tids, adapter::toecaps, fw_caps_config_cmd::toecaps, adapter_params::ulptx_memwrite_dsgl, V_FW_CMD_OP, V_FW_PARAMS_MNEM, V_FW_PARAMS_PARAM_X, V_FW_PARAMS_PARAM_Y, and adapter::vres.

Referenced by t4_attach(), and t4_resume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_params__pre_init()

◆ get_regs()

static void get_regs ( struct adapter sc,
struct t4_regdump regs,
uint8_t *  buf 
)
static

Definition at line 6989 of file t4_main.c.

References chip_id(), chip_rev(), t4_regdump::len, t4_get_regs(), and t4_regdump::version.

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_sge_context()

static int get_sge_context ( struct adapter sc,
struct t4_sge_context cntxt 
)
static

Definition at line 11486 of file t4_main.c.

References begin_synchronized_op(), t4_sge_context::cid, CTXT_CNM, CTXT_EGRESS, CTXT_FLM, CTXT_INGRESS, t4_sge_context::data, end_synchronized_op(), adapter::flags, FW_OK, hw_off_limits(), INTR_OK, M_CTXTQID, adapter::mbox, t4_sge_context::mem_id, SLEEP_OK, t4_sge_ctxt_rd(), and t4_sge_ctxt_rd_bd().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hold_clip_addr()

static int hold_clip_addr ( struct adapter sc,
struct t4_clip_addr ca 
)
static

Definition at line 12041 of file t4_main.c.

References t4_clip_addr::addr, and t4_get_clip_entry().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ifmedia_add4()

static void ifmedia_add4 ( struct ifmedia *  ifm,
int  m 
)
inlinestatic

Definition at line 5662 of file t4_main.c.

Referenced by build_medialist().

Here is the caller graph for this function:

◆ init_link_config()

◆ install_kld_firmware()

static int install_kld_firmware ( struct adapter sc,
struct fw_h card_fw,
const struct fw_h drv_fw,
const char *  reason,
int *  already 
)
static

Definition at line 4510 of file t4_main.c.

References adapter::dev, adapter::flags, fw_compatible(), FW_OK, fw_h::fw_ver, G_FW_HDR_FW_VER_BUILD, G_FW_HDR_FW_VER_MAJOR, G_FW_HDR_FW_VER_MICRO, G_FW_HDR_FW_VER_MINOR, load_fw_module(), adapter::mbox, t4_fw_upgrade(), and unload_fw_module().

Referenced by contact_firmware().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_boot()

static int load_boot ( struct adapter sc,
struct t4_bootrom br 
)
static

Definition at line 11596 of file t4_main.c.

References A_PCIE_PF_EXPROM_OFST, begin_synchronized_op(), t4_bootrom::data, end_synchronized_op(), G_OFFSET, hw_off_limits(), INTR_OK, t4_bootrom::len, t4_bootrom::pf_offset, PF_REG, t4_bootrom::pfidx_addr, SLEEP_OK, t4_load_boot(), and t4_read_reg().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_bootcfg()

static int load_bootcfg ( struct adapter sc,
struct t4_data bc 
)
static

Definition at line 11646 of file t4_main.c.

References begin_synchronized_op(), t4_data::data, end_synchronized_op(), hw_off_limits(), INTR_OK, t4_data::len, SLEEP_OK, and t4_load_bootcfg().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_cfg()

static int load_cfg ( struct adapter sc,
struct t4_data cfg 
)
static

Definition at line 11563 of file t4_main.c.

References begin_synchronized_op(), t4_data::data, end_synchronized_op(), hw_off_limits(), INTR_OK, t4_data::len, SLEEP_OK, and t4_load_cfg().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_fw()

static int load_fw ( struct adapter sc,
struct t4_data fw 
)
static

Definition at line 11524 of file t4_main.c.

References begin_synchronized_op(), t4_data::data, adapter::debug_flags, DF_LOAD_FW_ANYTIME, end_synchronized_op(), adapter::flags, FULL_INIT_DONE, hw_off_limits(), INTR_OK, t4_data::len, SLEEP_OK, and t4_load_fw().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_fw_module()

static int load_fw_module ( struct adapter sc,
const struct firmware **  dcfg,
const struct firmware **  fw 
)
static

Definition at line 4465 of file t4_main.c.

References chip_id(), adapter::dev, find_fw_info(), fw_info, fw_info::fw_mod_name, and fw_info::kld_name.

Referenced by copy_cfg_file_to_card(), and install_kld_firmware().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup_atid()

void * lookup_atid ( struct adapter sc,
int  atid 
)

Definition at line 3871 of file t4_main.c.

References tid_info::atid_tab, aopen_entry::data, and adapter::tids.

Referenced by t4_hashfilter_ao_rpl().

Here is the caller graph for this function:

◆ MALLOC_DEFINE()

MALLOC_DEFINE ( M_CXGBE  ,
"cxgbe"  ,
"Chelsio T4/T5 Ethernet driver and services"   
)

◆ mem_desc_cmp()

static int mem_desc_cmp ( const void *  a,
const void *  b 
)
static

Definition at line 9667 of file t4_main.c.

Referenced by sysctl_meminfo().

Here is the caller graph for this function:

◆ mem_region_show()

static void mem_region_show ( struct sbuf *  sb,
const char *  name,
unsigned int  from,
unsigned int  to 
)
static

Definition at line 9674 of file t4_main.c.

Referenced by sysctl_meminfo().

Here is the caller graph for this function:

◆ mod_event()

◆ MODULE_DEPEND() [1/3]

MODULE_DEPEND ( t4nex  ,
firmware  ,
,
,
 
)

◆ MODULE_DEPEND() [2/3]

MODULE_DEPEND ( t5nex  ,
firmware  ,
,
,
 
)

◆ MODULE_DEPEND() [3/3]

MODULE_DEPEND ( t6nex  ,
firmware  ,
,
,
 
)

◆ MODULE_VERSION() [1/9]

MODULE_VERSION ( cc  ,
 
)

◆ MODULE_VERSION() [2/9]

MODULE_VERSION ( cxgbe  ,
 
)

◆ MODULE_VERSION() [3/9]

MODULE_VERSION ( cxl  ,
 
)

◆ MODULE_VERSION() [4/9]

MODULE_VERSION ( t4nex  ,
 
)

◆ MODULE_VERSION() [5/9]

MODULE_VERSION ( t5nex  ,
 
)

◆ MODULE_VERSION() [6/9]

MODULE_VERSION ( t6nex  ,
 
)

◆ MODULE_VERSION() [7/9]

MODULE_VERSION ( vcc  ,
 
)

◆ MODULE_VERSION() [8/9]

MODULE_VERSION ( vcxgbe  ,
 
)

◆ MODULE_VERSION() [9/9]

MODULE_VERSION ( vcxl  ,
 
)

◆ notify_siblings()

static int notify_siblings ( device_t  dev,
int  detaching 
)
static

Definition at line 1639 of file t4_main.c.

References port_info::dev.

Referenced by t4_attach(), and t4_detach().

Here is the caller graph for this function:

◆ ok_to_reset()

◆ partition_resources()

static int partition_resources ( struct adapter sc)
static

Definition at line 4973 of file t4_main.c.

References apply_cfg_and_initialize(), BUILTIN_CF, COPY_CAPS, adapter::debug_flags, adapter::dev, DF_DISABLE_CFG_RETRY, false, adapter::flags, FW_CAPS_CONFIG_NIC, MASTER_PF, and caps_allowed::niccaps.

Referenced by t4_attach(), and t4_resume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ port_mword()

◆ position_memwin()

static void position_memwin ( struct adapter sc,
int  idx,
uint32_t  addr 
)
static

Definition at line 3742 of file t4_main.c.

References A_PCIE_MEM_ACCESS_OFFSET, is_t4(), adapter::memwin, memwin::mw_curpos, NUM_MEMWIN, PCIE_MEM_ACCESS_REG, adapter::pf, t4_read_reg(), t4_write_reg(), and V_PFNUM.

Referenced by rw_via_memwin(), and setup_memwin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_tid_release()

static void queue_tid_release ( struct adapter sc,
int  tid 
)
static

Definition at line 3892 of file t4_main.c.

References CXGBE_UNIMPLEMENTED.

Referenced by release_tid().

Here is the caller graph for this function:

◆ quiesce_iq_fl()

static void quiesce_iq_fl ( struct adapter sc,
struct sge_iq iq,
struct sge_fl fl 
)
static

Definition at line 6880 of file t4_main.c.

References fl, FL_DOOMED, FL_LOCK, FL_STARVING, FL_UNLOCK, sge_iq::flags, sge_fl::flags, free_fl_buffers(), iq, IQ_HAS_FL, IQ_HW_ALLOCATED, IQS_DISABLED, IQS_IDLE, adapter::sfl_callout, adapter::sfl_lock, and sge_iq::state.

Referenced by quiesce_vi(), and t4_suspend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quiesce_txq()

static void quiesce_txq ( struct sge_txq txq)
static

◆ quiesce_vi()

static void quiesce_vi ( struct vi_info vi)
static

Definition at line 6911 of file t4_main.c.

References vi_info::adapter, sge_rxq::fl, sge_ofld_rxq::fl, vi_info::flags, for_each_ofld_rxq, for_each_ofld_txq, for_each_rxq, for_each_txq, sge_rxq::iq, sge_ofld_rxq::iq, quiesce_iq_fl(), quiesce_txq(), quiesce_wrq(), rxq, VI_INIT_DONE, and sge_ofld_txq::wrq.

Referenced by t4_suspend(), and vi_full_uninit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quiesce_wrq()

static void quiesce_wrq ( struct sge_wrq wrq)
static

Definition at line 6873 of file t4_main.c.

Referenced by quiesce_vi(), and t4_suspend().

Here is the caller graph for this function:

◆ read_card_mem()

static int read_card_mem ( struct adapter sc,
int  win,
struct t4_mem_range mr 
)
static

Definition at line 11830 of file t4_main.c.

References t4_mem_range::addr, t4_mem_range::data, hw_off_limits(), t4_mem_range::len, MAX_READ_BUF_SIZE, read_via_memwin(), adapter::reg_lock, and validate_mem_range().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_i2c()

static int read_i2c ( struct adapter sc,
struct t4_i2c_data i2cd 
)
static

Definition at line 11877 of file t4_main.c.

References begin_synchronized_op(), t4_i2c_data::data, t4_i2c_data::dev_addr, end_synchronized_op(), hw_off_limits(), INTR_OK, t4_i2c_data::len, adapter::mbox, adapter_params::nports, t4_i2c_data::offset, adapter::params, t4_i2c_data::port_id, SLEEP_OK, and t4_i2c_rd().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_vf_stat()

static uint64_t read_vf_stat ( struct adapter sc,
u_int  vin,
int  reg 
)
static

Definition at line 7016 of file t4_main.c.

References A_PL_INDIR_CMD, A_PL_INDIR_DATA, adapter::flags, IS_VF, adapter::reg_lock, t4_read_reg(), t4_write_reg(), V_PL_ADDR, V_PL_AUTOINC, V_PL_VFID, and VF_MPS_REG.

Here is the call graph for this function:

◆ release_clip_addr()

static int release_clip_addr ( struct adapter sc,
struct t4_clip_addr ca 
)
static

Definition at line 12057 of file t4_main.c.

References t4_clip_addr::addr, and t4_release_clip_addr().

Referenced by t4_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release_tid()

void release_tid ( struct adapter sc,
int  tid,
struct sge_wrq ctrlq 
)

Definition at line 3899 of file t4_main.c.

References alloc_wrqe(), CPL_TID_RELEASE, INIT_TP_WR_MIT_CPL, queue_tid_release(), t4_wrq_tx(), and wrtod().

Referenced by t4_del_hashfilter_rpl(), t4_hashfilter_ao_rpl(), and t4_hashfilter_tcb_rpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_adapter()

static int reset_adapter ( struct adapter sc)
static

Definition at line 2368 of file t4_main.c.

References begin_synchronized_op(), CH_ALERT, CH_ERR, adapter::dev, end_synchronized_op(), adapter::error_flags, adapter::flags, hw_off_limits(), adapter::incarnation, adapter::num_resets, ok_to_reset(), and SLEEP_OK.

Referenced by fatal_error_task(), and reset_adapter_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_adapter_task()

static void reset_adapter_task ( void *  arg,
int  pending 
)
static

Definition at line 2423 of file t4_main.c.

References reset_adapter().

Referenced by t4_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rw_via_memwin()

int rw_via_memwin ( struct adapter sc,
int  idx,
uint32_t  addr,
uint32_t *  val,
int  len,
int  rw 
)

Definition at line 3765 of file t4_main.c.

References adapter::memwin, memwin::mw_aperture, memwin::mw_base, memwin::mw_curpos, NUM_MEMWIN, position_memwin(), t4_read_reg(), and t4_write_reg().

Referenced by read_via_memwin(), and write_via_memwin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_caps_and_params()

◆ sbuf_cim_la()

static int sbuf_cim_la ( struct adapter sc,
struct sbuf *  sb,
int  flags 
)
static

Definition at line 8933 of file t4_main.c.

References A_UP_UP_DBG_LA_CFG, CHELSIO_T6, chip_id(), adapter_params::cim_la_size, hw_off_limits(), adapter::params, adapter::reg_lock, sbuf_cim_la4(), sbuf_cim_la6(), t4_cim_read(), and t4_cim_read_la().

Referenced by dump_cimla(), and sysctl_cim_la().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sbuf_cim_la4()

static void sbuf_cim_la4 ( struct adapter sc,
struct sbuf *  sb,
uint32_t *  buf,
uint32_t  cfg 
)
static

Definition at line 8871 of file t4_main.c.

References adapter_params::cim_la_size, F_UPDBGLACAPTPCONLY, and adapter::params.

Referenced by sbuf_cim_la().

Here is the caller graph for this function:

◆ sbuf_cim_la6()

static void sbuf_cim_la6 ( struct adapter sc,
struct sbuf *  sb,
uint32_t *  buf,
uint32_t  cfg 
)
static

Definition at line 8901 of file t4_main.c.

References adapter_params::cim_la_size, F_UPDBGLACAPTPCONLY, and adapter::params.

Referenced by sbuf_cim_la().

Here is the caller graph for this function:

◆ sbuf_devlog()

static int sbuf_devlog ( struct adapter sc,
struct sbuf *  sb,
int  flags 
)
static

◆ set_current_media()

static void set_current_media ( struct port_info pi)
static

◆ set_offload_policy()

static int set_offload_policy ( struct adapter sc,
struct t4_offload_policy uop 
)
static

◆ set_params__post_init()

◆ set_params__pre_init()

static int set_params__pre_init ( struct adapter sc)
static

Definition at line 5081 of file t4_main.c.

References CHELSIO_T6, chip_id(), adapter::dev, FW_EINVAL, FW_PARAM_DEV, adapter_params::fw_vers, FW_VERSION32, adapter::mbox, adapter::params, adapter::pf, t4_set_params(), and adapter_params::viid_smt_extn_support.

Referenced by apply_cfg_and_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_memwin()

static void setup_memwin ( struct adapter sc)
static

◆ SLIST_HEAD()

SLIST_HEAD ( adapter  )

Definition at line 265 of file t4_main.c.

◆ stop_adapter()

static int stop_adapter ( struct adapter sc)
inlinestatic

Definition at line 1863 of file t4_main.c.

References ADAP_STOPPED, adapter::error_flags, ilog2(), and t4_shutdown_adapter().

Referenced by t4_fatal_err(), and t4_suspend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SX_SYSINIT()

SX_SYSINIT ( cxgbe_mlu  ,
mlu,
"cxgbe mod load/unload"   
)

◆ sysctl_autoneg()

static int sysctl_autoneg ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_bitfield_16b()

static int sysctl_bitfield_16b ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8034 of file t4_main.c.

◆ sysctl_bitfield_8b()

static int sysctl_bitfield_8b ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8013 of file t4_main.c.

Referenced by cxgbe_sysctls(), and t4_sysctls().

Here is the caller graph for this function:

◆ sysctl_btphy()

static int sysctl_btphy ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8055 of file t4_main.c.

References port_info::adapter, begin_synchronized_op(), end_synchronized_op(), hw_off_limits(), INTR_OK, adapter::mbox, port_info::mdio_addr, SLEEP_OK, t4_mdio_rd(), and port_info::vi.

Referenced by cxgbe_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cctrl()

static int sysctl_cctrl ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8754 of file t4_main.c.

References adapter_params::a_wnd, adapter_params::b_wnd, hw_off_limits(), NCCTRL_WIN, NMTUS, adapter::params, adapter::reg_lock, and t4_read_cong_tbl().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cim_ibq_obq()

static int sysctl_cim_ibq_obq ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8805 of file t4_main.c.

References adapter::chip_params, CIM_IBQ_SIZE, CIM_NUM_IBQ, chip_params::cim_num_obq, CIM_OBQ_SIZE, hw_off_limits(), qname, adapter::reg_lock, t4_read_cim_ibq(), and t4_read_cim_obq().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cim_la()

static int sysctl_cim_la ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8964 of file t4_main.c.

References sbuf_cim_la().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cim_ma_la()

static int sysctl_cim_ma_la ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9032 of file t4_main.c.

References CIM_MALA_SIZE, hw_off_limits(), adapter::reg_lock, and t4_cim_read_ma_la().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cim_pif_la()

static int sysctl_cim_pif_la ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9083 of file t4_main.c.

References CIM_PIFLA_SIZE, hw_off_limits(), adapter::reg_lock, and t4_cim_read_pif_la().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cim_qcfg()

static int sysctl_cim_qcfg ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_cpl_stats()

static int sysctl_cpl_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9200 of file t4_main.c.

References adapter::chip_params, hw_off_limits(), chip_params::nchan, adapter::reg_lock, tp_cpl_stats::req, tp_cpl_stats::rsp, and t4_tp_get_cpl_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_cpus()

static int sysctl_cpus ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 11067 of file t4_main.c.

References adapter::dev.

Referenced by t4_sysctls().

Here is the caller graph for this function:

◆ sysctl_ddp_stats()

static int sysctl_ddp_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9246 of file t4_main.c.

References tp_usm_stats::drops, tp_usm_stats::frames, hw_off_limits(), tp_usm_stats::octets, adapter::reg_lock, and t4_get_usm_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_devlog()

static int sysctl_devlog ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9424 of file t4_main.c.

References sbuf_devlog().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_fcoe_stats()

static int sysctl_fcoe_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9467 of file t4_main.c.

References adapter::chip_params, tp_fcoe_stats::frames_ddp, tp_fcoe_stats::frames_drop, hw_off_limits(), MAX_NCHAN, chip_params::nchan, tp_fcoe_stats::octets_ddp, adapter::reg_lock, and t4_get_fcoe_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_force_fec()

static int sysctl_force_fec ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_handle_t4_reg64()

static int sysctl_handle_t4_reg64 ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8598 of file t4_main.c.

References hw_off_limits(), adapter::reg_lock, sysctl_handle_64, and t4_read_reg64().

Here is the call graph for this function:

◆ sysctl_holdoff_pktc_idx()

static int sysctl_holdoff_pktc_idx ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8199 of file t4_main.c.

References vi_info::adapter, begin_synchronized_op(), end_synchronized_op(), vi_info::flags, HOLD_LOCK, INTR_OK, LOCK_HELD, vi_info::pktc_idx, SGE_NCOUNTERS, SLEEP_OK, and VI_INIT_DONE.

Referenced by vi_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_holdoff_tmr_idx()

static int sysctl_holdoff_tmr_idx ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8162 of file t4_main.c.

References vi_info::adapter, begin_synchronized_op(), end_synchronized_op(), for_each_rxq, HOLD_LOCK, INTR_OK, sge_iq::intr_params, sge_rxq::iq, LOCK_HELD, vi_info::pktc_idx, rxq, SGE_NTIMERS, SLEEP_OK, vi_info::tmr_idx, V_QINTR_CNT_EN, and V_QINTR_TIMER_IDX.

Referenced by vi_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_hw_sched()

static int sysctl_hw_sched ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9523 of file t4_main.c.

References A_TP_MOD_CONFIG, A_TP_TX_MOD_QUEUE_REQ_MAP, G_TIMERMODE, hw_off_limits(), NTX_SCHED, adapter::reg_lock, t4_get_tx_sched(), t4_read_pace_tbl(), and t4_read_reg().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_int_array()

static int sysctl_int_array ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 7995 of file t4_main.c.

Referenced by t4_sysctls().

Here is the caller graph for this function:

◆ sysctl_lb_stats()

static int sysctl_lb_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9579 of file t4_main.c.

References adapter::chip_params, hw_off_limits(), chip_params::nchan, lb_port_stats::octets, adapter::reg_lock, and t4_get_lb_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_link_fec()

static int sysctl_link_fec ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8357 of file t4_main.c.

References link_config::fec, port_info::link_cfg, and link_config::link_ok.

Referenced by cxgbe_sysctls().

Here is the caller graph for this function:

◆ sysctl_linkdnrc()

static int sysctl_linkdnrc ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9635 of file t4_main.c.

References port_info::link_cfg, link_config::link_down_rc, link_config::link_ok, and t4_link_down_rc_str().

Referenced by cxgbe_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_loadavg()

static int sysctl_loadavg ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8711 of file t4_main.c.

References begin_synchronized_op(), end_synchronized_op(), FW_PARAMS_MNEM_DEV, FW_PARAMS_PARAM_DEV_LOAD, hw_off_limits(), INTR_OK, adapter::mbox, adapter::pf, SLEEP_OK, t4_query_params(), V_FW_PARAMS_MNEM, and V_FW_PARAMS_PARAM_X.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_meminfo()

static int sysctl_meminfo ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9691 of file t4_main.c.

References A_CIM_EXTMEM2_ADDR_SIZE, A_CIM_EXTMEM2_BASE_ADDR, A_CIM_SDRAM_ADDR_SIZE, A_CIM_SDRAM_BASE_ADDR, A_LE_DB_CONFIG, A_LE_DB_HASH_TBL_BASE_ADDR, A_LE_DB_HASH_TID_BASE, A_MA_EDRAM0_BAR, A_MA_EDRAM1_BAR, A_MA_EXT_MEMORY1_BAR, A_MA_EXT_MEMORY_BAR, A_MA_TARGET_MEM_ENABLE, A_MPS_RX_LPBK_BG_PG_CNT0, A_MPS_RX_MAC_BG_PG_CNT0, A_MPS_RX_PG_RSV0, A_MPS_RX_PG_RSV4, A_SGE_CONTROL2, A_SGE_DBQ_CTXT_BADDR, A_SGE_DBVFIFO_BADDR, A_SGE_DBVFIFO_SIZE, A_SGE_FLM_CACHE_BADDR, A_SGE_IMSG_CTXT_BADDR, A_TP_CMM_MM_BASE, A_TP_CMM_MM_MAX_PSTRUCT, A_TP_CMM_MM_PS_FLST_BASE, A_TP_CMM_MM_RX_FLST_BASE, A_TP_CMM_MM_TX_FLST_BASE, A_TP_CMM_TCB_BASE, A_TP_CMM_TIMER_BASE, A_TP_PMM_RX_BASE, A_TP_PMM_RX_MAX_PAGE, A_TP_PMM_RX_PAGE_SIZE, A_TP_PMM_TX_BASE, A_TP_PMM_TX_MAX_PAGE, A_TP_PMM_TX_PAGE_SIZE, A_ULP_RX_CTX_BASE, A_ULP_TX_ERR_TABLE_BASE, mem_desc::base, CHELSIO_T5, chip_id(), adapter::chip_params, F_EDRAM0_ENABLE, F_EDRAM1_ENABLE, F_EXT_MEM1_ENABLE, F_EXT_MEM_ENABLE, F_HASHEN, F_HMA_MUX, F_PMRXNUMCHN, F_VFIFO_ENABLE, G_ALLOC, G_EDRAM0_BASE, G_EDRAM0_SIZE, G_EDRAM1_BASE, G_EDRAM1_SIZE, G_EXT_MEM1_BASE, G_EXT_MEM1_SIZE, G_EXT_MEM_BASE, G_EXT_MEM_SIZE, G_PMRXMAXPAGE, G_PMTXMAXPAGE, G_PMTXNUMCHN, G_T5_ALLOC, G_T5_USED, G_T6_DBVFIFO_SIZE, G_USED, hw_off_limits(), mem_desc::idx, is_t4(), is_t5(), is_t6(), t4_virt_res::key, mem_desc::limit, mem_desc_cmp(), mem_region_show(), chip_params::nchan, t4_virt_res::ocq, adapter::reg_lock, region, t4_range::size, t4_range::start, t4_read_reg(), ulp_region, and adapter::vres.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_module_fec()

static int sysctl_module_fec ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_mps_tcam()

◆ sysctl_mps_tcam_t6()

static int sysctl_mps_tcam_t6 ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10069 of file t4_main.c.

References A_MPS_CLS_TCAM_DATA2_CTL, A_MPS_CLS_TCAM_RDATA0_REQ_ID1, A_MPS_CLS_TCAM_RDATA1_REQ_ID1, A_MPS_CLS_TCAM_RDATA2_REQ_ID1, begin_synchronized_op(), CHELSIO_T5, chip_id(), adapter::chip_params, fw_ldst_cmd::cycles_to_len16, end_synchronized_op(), F_DATADIPHIT, F_DATAVIDH2, F_FW_CMD_READ, F_FW_CMD_REQUEST, F_T6_REPLICATE, F_T6_SRAM_VLD, F_T6_VF_VALID, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::fid_idx, FW_LDST_ADDRSPC_MPS, FW_LDST_CMD, FW_LDST_MPS_RPLC, FW_LEN16, G_DATALKPTYPE, G_DATAPORTNUM, G_DATAVIDH1, G_DMACH, G_PORTMAP, G_T6_PF, G_T6_SRAM_PRIO0, G_T6_SRAM_PRIO1, G_T6_SRAM_PRIO2, G_T6_SRAM_PRIO3, G_T6_VF, G_VIDL, hw_off_limits(), INTR_OK, M_DATALKPTYPE, adapter::mbox, fw_ldst_cmd::fw_ldst::mps, MPS_CLS_SRAM_H, MPS_CLS_SRAM_L, chip_params::mps_tcam_size, fw_ldst_cmd::op_to_addrspace, adapter::reg_lock, fw_ldst_cmd::fw_ldst::fw_ldst_mps::rplc, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc127_96, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc159_128, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc191_160, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc223_192, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc255_224, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc31_0, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc63_32, fw_ldst_cmd::fw_ldst::fw_ldst_mps::fw_ldst_mps_rplc::rplc95_64, S_T6_MULTILISTEN0, SLEEP_OK, t4_read_reg(), t4_wr_mbox(), t4_write_reg(), tcamxy2valmask(), fw_ldst_cmd::u, V_CTLCMDTYPE, V_CTLREQID, V_CTLTCAMINDEX, V_CTLTCAMSEL, V_CTLXYBITSEL, V_FW_CMD_OP, V_FW_LDST_CMD_ADDRSPACE, V_FW_LDST_CMD_FID, and V_FW_LDST_CMD_IDX.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_noflowq()

static int sysctl_noflowq ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8084 of file t4_main.c.

References vi_info::ntxq, and vi_info::rsrv_noflowq.

Referenced by vi_sysctls().

Here is the caller graph for this function:

◆ sysctl_path_mtus()

static int sysctl_path_mtus ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10252 of file t4_main.c.

References hw_off_limits(), NMTUS, adapter::reg_lock, and t4_read_mtu_tbl().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_pause_settings()

static int sysctl_pause_settings ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_pm_stats()

static int sysctl_pm_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10288 of file t4_main.c.

References CHELSIO_T5, chip_id(), hw_off_limits(), MAX_PM_NSTATS, adapter::reg_lock, t4_pmrx_get_stats(), and t4_pmtx_get_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_qsize_rxq()

static int sysctl_qsize_rxq ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8229 of file t4_main.c.

References vi_info::adapter, begin_synchronized_op(), end_synchronized_op(), vi_info::flags, HOLD_LOCK, INTR_OK, LOCK_HELD, vi_info::qsize_rxq, SLEEP_OK, and VI_INIT_DONE.

Referenced by vi_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_qsize_txq()

static int sysctl_qsize_txq ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8259 of file t4_main.c.

References vi_info::adapter, begin_synchronized_op(), end_synchronized_op(), vi_info::flags, HOLD_LOCK, INTR_OK, LOCK_HELD, vi_info::qsize_txq, SLEEP_OK, and VI_INIT_DONE.

Referenced by vi_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_rdma_stats()

static int sysctl_rdma_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10361 of file t4_main.c.

References hw_off_limits(), adapter::reg_lock, tp_rdma_stats::rqe_dfr_mod, tp_rdma_stats::rqe_dfr_pkt, and t4_tp_get_rdma_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_requested_fec()

static int sysctl_requested_fec ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_reset()

static int sysctl_reset ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 11099 of file t4_main.c.

References hw_off_limits(), adapter::num_resets, adapter::reset_task, and reset_tq.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_reset_sensor()

static int sysctl_reset_sensor ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_tcp_stats()

static int sysctl_tcp_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10395 of file t4_main.c.

References hw_off_limits(), adapter::reg_lock, t4_tp_get_tcp_stats(), tp_tcp_stats::tcp_in_segs, tp_tcp_stats::tcp_out_rsts, tp_tcp_stats::tcp_out_segs, and tp_tcp_stats::tcp_retrans_segs.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_temperature()

static int sysctl_temperature ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 8618 of file t4_main.c.

References begin_synchronized_op(), end_synchronized_op(), FW_PARAM_DEV_DIAG_TMP, FW_PARAMS_MNEM_DEV, FW_PARAMS_PARAM_DEV_DIAG, hw_off_limits(), INTR_OK, adapter::mbox, adapter::pf, SLEEP_OK, t4_query_params(), V_FW_PARAMS_MNEM, V_FW_PARAMS_PARAM_X, and V_FW_PARAMS_PARAM_Y.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tid_stats()

static int sysctl_tid_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 9279 of file t4_main.c.

References tp_tid_stats::act, tp_tid_stats::del, hw_off_limits(), tp_tid_stats::inv, tp_tid_stats::pas, adapter::reg_lock, and t4_tp_get_tid_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tids()

◆ sysctl_tnl_stats()

static int sysctl_tnl_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10614 of file t4_main.c.

References adapter::chip_params, hw_off_limits(), tp_tnl_stats::in_pkt, chip_params::nchan, tp_tnl_stats::out_pkt, adapter::reg_lock, and t4_tp_get_tnl_stats().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tp_err_stats()

◆ sysctl_tp_la()

static int sysctl_tp_la ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10879 of file t4_main.c.

References A_TP_DBG_LA_CONFIG, G_DBGLAMODE, hw_off_limits(), adapter::reg_lock, t4_read_reg(), t4_tp_read_la(), tp_la_show(), tp_la_show2(), tp_la_show3(), and TPLA_SIZE.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tp_la_mask()

static int sysctl_tp_la_mask ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10662 of file t4_main.c.

References A_TP_DBG_LA_CONFIG, hw_off_limits(), tp_params::la_mask, adapter::params, adapter::reg_lock, t4_set_reg_field(), and adapter_params::tp.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tx_rate()

static int sysctl_tx_rate ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10932 of file t4_main.c.

References adapter::chip_params, hw_off_limits(), MAX_NCHAN, chip_params::nchan, adapter::reg_lock, and t4_get_chan_txrate().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_tx_vm_wr()

◆ sysctl_ulprx_la()

static int sysctl_ulprx_la ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 10978 of file t4_main.c.

References hw_off_limits(), adapter::reg_lock, t4_ulprx_read_la(), and ULPRX_LA_SIZE.

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_vdd()

static int sysctl_vdd ( SYSCTL_HANDLER_ARGS  )
static

◆ sysctl_wcwr_stats()

static int sysctl_wcwr_stats ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 11020 of file t4_main.c.

References A_SGE_STAT_CFG, A_SGE_STAT_MATCH, A_SGE_STAT_TOTAL, CHELSIO_T5, chip_id(), G_STATMODE, G_STATSOURCE_T5, G_T6_STATMODE, hw_off_limits(), is_t5(), adapter::reg_lock, and t4_read_reg().

Referenced by t4_sysctls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_add_adapter()

void t4_add_adapter ( struct adapter sc)

Definition at line 3580 of file t4_main.c.

References t4_list_lock.

Referenced by t4_attach(), and t4vf_attach().

Here is the caller graph for this function:

◆ t4_alloc_irq()

static int t4_alloc_irq ( struct adapter sc,
struct irq *  irq,
int  rid,
driver_intr_t *  handler,
void *  arg,
char *  name 
)
static

Definition at line 6949 of file t4_main.c.

References adapter::dev, and rid.

Referenced by t4_setup_intr_handlers().

Here is the caller graph for this function:

◆ t4_attach()

static int t4_attach ( device_t  dev)
static

Definition at line 1108 of file t4_main.c.

References A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L, A_PL_WHOAMI, A_SGE_PF_GTS, A_SGE_PF_KDOORBELL, vi_info::adapter, port_info::adapter, adapter::bt_map, build_medialist(), adapter::cdev, cfg_itype_and_nqueues(), adapter::chan_map, CHELSIO_T5, chip_id(), CHK_MBOX_ACCESS, contact_firmware(), sge::ctrlq, adapter::ctrlq_oid, adapter::ctx, cxgbe_media_change(), cxgbe_media_status(), adapter::debug_flags, vi_info::dev, port_info::dev, adapter::dev, sge::eqmap, sge::eqmap_sz, adapter::fatal_error_task, fatal_error_task(), port_info::fcs_base, port_info::fcs_reg, vi_info::first_intr, vi_info::first_nm_rxq, vi_info::first_nm_txq, vi_info::first_ofld_rxq, vi_info::first_ofld_txq, vi_info::first_rxq, vi_info::first_txq, FIXED_IFMEDIA, fixed_ifmedia(), fixup_devlog_params(), fixup_link_config(), port_info::flags, adapter::flags, for_each_port, for_each_vi, FW_OK, adapter::fwq_oid, G_SOURCEPF, G_T6_SOURCEPF, get_params__post_init(), get_params__pre_init(), devnames::ifnet_name, adapter::ifp_lock, adapter::ifp_lockname, init_link_config(), adapter::intr_count, INTR_MSI, INTR_MSIX, adapter::intr_type, intrs_and_queues::intr_type, sge::iqmap, sge::iqmap_sz, is_bt(), is_ethoffload(), is_offload(), is_t4(), is_t6(), t4_virt_res::key, adapter::key_map, adapter::ktls_tick, port_info::lockname, adapter::lockname, MASTER_PF, adapter::mbox, port_info::media, pci_params::mps, MYPF_REG, adapter::names, sge::neq, sge::niq, intrs_and_queues::nirq, sge::nm_rxq, sge::nm_txq, vi_info::nnmrxq, sge::nnmrxq, intrs_and_queues::nnmrxq, intrs_and_queues::nnmrxq_vi, vi_info::nnmtxq, sge::nnmtxq, intrs_and_queues::nnmtxq, intrs_and_queues::nnmtxq_vi, vi_info::nofldrxq, sge::nofldrxq, intrs_and_queues::nofldrxq, intrs_and_queues::nofldrxq_vi, vi_info::nofldtxq, sge::nofldtxq, intrs_and_queues::nofldtxq, intrs_and_queues::nofldtxq_vi, notify_siblings(), adapter_params::nports, vi_info::nrxq, sge::nrxq, intrs_and_queues::nrxq, intrs_and_queues::nrxq_vi, vi_info::ntxq, sge::ntxq, intrs_and_queues::ntxq, intrs_and_queues::ntxq_vi, intrs_and_queues::num_vis, port_info::nvi, vi_info::ofld_pktc_idx, sge::ofld_rxq, vi_info::ofld_tmr_idx, sge::ofld_txq, adapter::params, partition_resources(), adapter_params::pci, adapter::pf, vi_info::pi, port_info::pi_lock, vi_info::pktc_idx, adapter::policy, adapter::policy_lock, adapter::port, port_info::port_id, PORT_LOCK, PORT_REG, port_info::port_type, PORT_UNLOCK, vi_info::qsize_rxq, vi_info::qsize_txq, adapter::reg_lock, reset_adapter_task(), adapter::reset_task, vi_info::rsrv_noflowq, sge::rxq, adapter::sc_lock, set_params__post_init(), setup_memwin(), adapter::sfl_callout, adapter::sfl_lock, adapter::sge, adapter::sge_gts_reg, adapter::sge_kdoorbell_reg, t4_range::size, pci_params::speed, t4_range::start, t4_add_adapter(), t4_cdevsw, t4_create_dma_tag(), t4_detach_common(), t4_ifnet_unit(), t4_init_atid_table(), t4_init_clip_table(), t4_init_devlog_params(), t4_init_devnames(), t4_init_l2t(), t4_init_smt(), t4_init_tx_sched(), t4_intr_clear(), t4_map_bar_2(), t4_map_bars_0_and_4(), t4_pktc_idx, t4_port_init(), t4_prep_adapter(), t4_qsize_rxq, t4_qsize_txq, t4_read_reg(), t4_set_desc(), t4_setup_intr_handlers(), t4_sysctls(), t4_tmr_idx, t5_attribute_workaround(), T5_PORT_REG, vi_info::tmr_idx, adapter::traceq, port_info::tx_chan, sge::txq, port_info::vi, adapter::vres, adapter::vxlan_refcount, and pci_params::width.

Here is the call graph for this function:

◆ t4_child_location()

static int t4_child_location ( device_t  bus,
device_t  dev,
struct sbuf *  sb 
)
static

Definition at line 1594 of file t4_main.c.

References port_info::dev, for_each_port, adapter::port, and port_info::port_id.

◆ t4_clr_vi_stats()

static void t4_clr_vi_stats ( struct adapter sc,
u_int  vin 
)
static

Definition at line 7065 of file t4_main.c.

References A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H, A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L, A_PL_INDIR_CMD, A_PL_INDIR_DATA, t4_write_reg(), V_PL_ADDR, V_PL_AUTOINC, V_PL_VFID, and VF_MPS_REG.

Referenced by clear_stats().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_detach()

static int t4_detach ( device_t  dev)
static

Definition at line 1666 of file t4_main.c.

References port_info::dev, notify_siblings(), and t4_detach_common().

Here is the call graph for this function:

◆ t4_detach_common()

◆ t4_fatal_err()

void t4_fatal_err ( struct adapter sc,
bool  fw_error 
)

Definition at line 3554 of file t4_main.c.

References ADAP_CIM_ERR, ADAP_FATAL_ERR, adapter::debug_flags, adapter::dev, DF_VERBOSE_SLOWINTR, adapter::error_flags, adapter::fatal_error_task, ilog2(), reset_tq, stop_adapter(), t4_report_fw_error(), and t4_slow_intr_handler().

Referenced by t4_intr_err(), and t4_wr_mbox_meat_timeout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_free_atid_table()

static void t4_free_atid_table ( struct adapter sc)
static

Definition at line 3835 of file t4_main.c.

References tid_info::atid_tab, tid_info::atids_in_use, and adapter::tids.

Referenced by t4_detach_common().

Here is the caller graph for this function:

◆ t4_free_irq()

static int t4_free_irq ( struct adapter sc,
struct irq *  irq 
)
static

Definition at line 6976 of file t4_main.c.

References adapter::dev.

Referenced by t4_detach_common().

Here is the caller graph for this function:

◆ t4_get_vi_stats()

static void t4_get_vi_stats ( struct adapter sc,
u_int  vin,
struct fw_vi_stats_vf *  stats 
)
static

Definition at line 7034 of file t4_main.c.

References adapter::flags, GET_STAT, IS_VF, and adapter::reg_lock.

Referenced by vi_refresh_stats().

Here is the caller graph for this function:

◆ t4_ifnet_unit()

static int t4_ifnet_unit ( struct adapter sc,
struct port_info pi 
)
static

Definition at line 1090 of file t4_main.c.

References adapter::dev, devnames::ifnet_name, adapter::names, and port_info::port_id.

Referenced by t4_attach().

Here is the caller graph for this function:

◆ t4_init_atid_table()

static void t4_init_atid_table ( struct adapter sc)
static

Definition at line 3813 of file t4_main.c.

References tid_info::afree, tid_info::atid_tab, tid_info::atids_in_use, tid_info::natids, aopen_entry::next, and adapter::tids.

Referenced by t4_attach().

Here is the caller graph for this function:

◆ t4_init_devnames()

void t4_init_devnames ( struct adapter sc)

Definition at line 1076 of file t4_main.c.

References CHELSIO_T4, chip_id(), adapter::dev, and adapter::names.

Referenced by t4_attach(), and t4vf_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_ioctl()

◆ t4_iterate()

void t4_iterate ( void(*)(struct adapter *, void *)  func,
void *  arg 
)

Definition at line 12190 of file t4_main.c.

References t4_list_lock.

Referenced by t4_cloner_create(), t4_vxlan_start_handler(), and t4_vxlan_stop_handler().

Here is the caller graph for this function:

◆ t4_map_bar_2()

int t4_map_bar_2 ( struct adapter sc)

◆ t4_map_bars_0_and_4()

int t4_map_bars_0_and_4 ( struct adapter sc)

Definition at line 3588 of file t4_main.c.

References adapter::bh, adapter::bt, adapter::dev, DOORBELL_KDB, adapter::doorbells, adapter::mmio_len, adapter::msix_res, adapter::msix_rid, adapter::regs_res, and adapter::regs_rid.

Referenced by t4_attach(), and t4vf_attach().

Here is the caller graph for this function:

◆ t4_os_cim_err()

void t4_os_cim_err ( struct adapter sc)

Definition at line 9026 of file t4_main.c.

References ADAP_CIM_ERR, and adapter::error_flags.

Referenced by cim_intr_handler().

Here is the caller graph for this function:

◆ t4_os_find_pci_capability()

int t4_os_find_pci_capability ( struct adapter sc,
int  cap 
)

Definition at line 12070 of file t4_main.c.

References adapter::dev.

Referenced by get_pci_mode(), set_pcie_completion_timeout(), and t4_prep_adapter().

Here is the caller graph for this function:

◆ t4_os_link_changed()

◆ t4_os_pci_restore_state()

int t4_os_pci_restore_state ( struct adapter sc)

Definition at line 12091 of file t4_main.c.

References adapter::dev.

◆ t4_os_pci_save_state()

int t4_os_pci_save_state ( struct adapter sc)

Definition at line 12078 of file t4_main.c.

References adapter::dev.

◆ t4_os_portmod_changed()

◆ t4_probe()

static int t4_probe ( device_t  dev)
static

Definition at line 954 of file t4_main.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t4_pciids.

◆ t4_range_cmp()

static int t4_range_cmp ( const void *  a,
const void *  b 
)
static

Definition at line 3917 of file t4_main.c.

Referenced by validate_mem_range().

Here is the caller graph for this function:

◆ t4_read_port_device()

static int t4_read_port_device ( device_t  dev,
int  port,
device_t *  child 
)
static

Definition at line 1623 of file t4_main.c.

References child, port_info::dev, MAX_NPORTS, adapter::port, and port.

◆ t4_ready()

static int t4_ready ( device_t  dev)
static

Definition at line 1612 of file t4_main.c.

References adapter::dev, adapter::flags, and FW_OK.

◆ t4_reset_post()

static int t4_reset_post ( device_t  dev,
device_t  child 
)
static

Definition at line 2359 of file t4_main.c.

References CH_ALERT, and adapter::dev.

◆ t4_reset_prepare()

static int t4_reset_prepare ( device_t  dev,
device_t  child 
)
static

Definition at line 2350 of file t4_main.c.

References CH_ALERT, and adapter::dev.

◆ t4_resume()

◆ t4_set_desc()

static void t4_set_desc ( struct adapter sc)
static

Definition at line 5651 of file t4_main.c.

References adapter::dev, vpd_params::id, adapter::params, and adapter_params::vpd.

Referenced by t4_attach().

Here is the caller graph for this function:

◆ t4_setup_intr_handlers()

◆ t4_suspend()

◆ t4_sysctls()

void t4_sysctls ( struct adapter sc)

Definition at line 7179 of file t4_main.c.

References A_TP_FINWAIT2_TIMER, A_TP_INIT_SRTT, A_TP_KEEP_IDLE, A_TP_KEEP_INTVL, A_TP_PERS_MAX, A_TP_PERS_MIN, A_TP_RXT_MAX, A_TP_RXT_MIN, tom_tunables::autorcvbuf_inc, adapter::bs_version, vpd_params::cclk, adapter::cfcsum, adapter::cfg_file, CHELSIO_T4, CHELSIO_T5, chip_id(), chip_rev(), CIM_NUM_IBQ, tls_tunables::combo_wrs, tom_tunables::cong_algorithm, tom_tunables::cop_managed_offloading, sge_params::counter_val, adapter::ctx, tom_tunables::ddp, adapter::debug_flags, adapter::dev, doorbells, adapter::doorbells, vpd_params::ec, adapter::er_version, adapter::flags, adapter::fw_version, tls_tunables::inline_keys, is_ktls(), is_offload(), IS_VF, tom_tunables::iso, adapter::lro_timeout, vpd_params::md, vpd_params::na, tid_info::nftids, adapter_params::nports, adapter::params, vpd_params::pn, tom_tunables::rx_coalesce, S_KEEPALIVEMAXR2, S_RXTSHIFTMAXR2, S_SYNSHIFTMAX, adapter::sc_do_rxcopy, adapter_params::scfg_vers, adapter_params::sge, vpd_params::sn, tom_tunables::sndbuf, adapter::swintr, sysctl_bitfield_8b(), SYSCTL_CAP, sysctl_cctrl(), sysctl_cim_ibq_obq(), sysctl_cim_la(), sysctl_cim_ma_la(), sysctl_cim_pif_la(), sysctl_cim_qcfg(), sysctl_clip(), sysctl_cpl_stats(), sysctl_cpus(), sysctl_ddp_stats(), sysctl_devlog(), sysctl_fcoe_stats(), sysctl_hw_sched(), sysctl_int_array(), sysctl_l2t(), sysctl_lb_stats(), sysctl_loadavg(), sysctl_meminfo(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_path_mtus(), sysctl_pm_stats(), sysctl_rdma_stats(), sysctl_reset(), sysctl_reset_sensor(), sysctl_smt(), sysctl_tcp_stats(), sysctl_temperature(), sysctl_tid_stats(), sysctl_tids(), sysctl_tnl_stats(), sysctl_tp_err_stats(), sysctl_tp_la(), sysctl_tp_la_mask(), sysctl_tx_rate(), sysctl_ulprx_la(), sysctl_vdd(), sysctl_wcwr_stats(), t4_sge_sysctls(), adapter::tids, sge_params::timer_val, tom_tunables::tls, tom_tunables::tls_rx_timeout, adapter::tlst, adapter::tp_version, adapter::tt, tom_tunables::tx_align, tom_tunables::tx_zcopy, tom_tunables::update_hc_on_pmtu_change, adapter_params::vpd, and adapter_params::vpd_vers.

Referenced by t4_attach(), and t4vf_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_vxlan_start()

static void t4_vxlan_start ( struct adapter sc,
void *  arg 
)
static

Definition at line 12984 of file t4_main.c.

References begin_synchronized_op(), CH_ERR, CHELSIO_T5, chip_id(), enable_vxlan_rx(), end_synchronized_op(), hw_off_limits(), INTR_OK, adapter::nrawf, vxlan_evargs::port, SLEEP_OK, adapter::vxlan_port, and adapter::vxlan_refcount.

Referenced by t4_vxlan_start_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_vxlan_start_handler()

static void t4_vxlan_start_handler ( void *arg  __unused,
struct ifnet *  ifp,
sa_family_t  family,
u_int  port 
)
static

Definition at line 13035 of file t4_main.c.

References ifp, vxlan_evargs::ifp, port, vxlan_evargs::port, t4_iterate(), and t4_vxlan_start().

Referenced by mod_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_vxlan_stop()

static void t4_vxlan_stop ( struct adapter sc,
void *  arg 
)
static

Definition at line 13009 of file t4_main.c.

References A_MPS_RX_VXLAN_TYPE, begin_synchronized_op(), CH_ERR, CHELSIO_T5, chip_id(), end_synchronized_op(), F_VXLAN_EN, hw_off_limits(), INTR_OK, adapter::nrawf, vxlan_evargs::port, SLEEP_OK, t4_set_reg_field(), adapter::vxlan_port, and adapter::vxlan_refcount.

Referenced by t4_vxlan_stop_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t4_vxlan_stop_handler()

static void t4_vxlan_stop_handler ( void *arg  __unused,
struct ifnet *  ifp,
sa_family_t  family,
u_int  port 
)
static

Definition at line 13048 of file t4_main.c.

References ifp, vxlan_evargs::ifp, port, vxlan_evargs::port, t4_iterate(), and t4_vxlan_stop().

Referenced by mod_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t5_attribute_workaround()

static void t5_attribute_workaround ( device_t  dev)
static

Definition at line 1024 of file t4_main.c.

Referenced by t4_attach().

Here is the caller graph for this function:

◆ t5_probe()

static int t5_probe ( device_t  dev)
static

Definition at line 979 of file t4_main.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t5_pciids.

◆ t6_probe()

static int t6_probe ( device_t  dev)
static

Definition at line 1004 of file t4_main.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t6_pciids.

◆ tcamxy2valmask()

static void tcamxy2valmask ( uint64_t  x,
uint64_t  y,
uint8_t *  addr,
uint64_t *  mask 
)
inlinestatic

Definition at line 9957 of file t4_main.c.

Referenced by sysctl_mps_tcam(), and sysctl_mps_tcam_t6().

Here is the caller graph for this function:

◆ tp_la_show()

static void tp_la_show ( struct sbuf *  sb,
uint64_t *  p,
int  idx 
)
static

Definition at line 10850 of file t4_main.c.

References field_desc_show(), and tp_la0.

Referenced by sysctl_tp_la().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tp_la_show2()

static void tp_la_show2 ( struct sbuf *  sb,
uint64_t *  p,
int  idx 
)
static

Definition at line 10857 of file t4_main.c.

References field_desc_show(), tp_la0, and TPLA_SIZE.

Referenced by sysctl_tp_la().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tp_la_show3()

static void tp_la_show3 ( struct sbuf *  sb,
uint64_t *  p,
int  idx 
)
static

Definition at line 10868 of file t4_main.c.

References field_desc_show(), tp_la0, tp_la1, tp_la2, and TPLA_SIZE.

Referenced by sysctl_tp_la().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tweak_tunables()

static void tweak_tunables ( void  )
static

◆ unload_fw_module()

static void unload_fw_module ( struct adapter sc,
const struct firmware *  dcfg,
const struct firmware *  fw 
)
static

Definition at line 4493 of file t4_main.c.

Referenced by copy_cfg_file_to_card(), and install_kld_firmware().

Here is the caller graph for this function:

◆ update_mac_settings()

◆ update_nirq()

static void update_nirq ( struct intrs_and_queues iaq,
int  nports 
)
static

◆ validate_mem_range()

static int validate_mem_range ( struct adapter sc,
uint32_t  addr,
uint32_t  len 
)
static

◆ validate_mt_off_len()

static int validate_mt_off_len ( struct adapter sc,
int  mtype,
uint32_t  off,
uint32_t  len,
uint32_t *  addr 
)
static

◆ vcxgbe_attach()

static int vcxgbe_attach ( device_t  dev)
static

◆ vcxgbe_detach()

static int vcxgbe_detach ( device_t  dev)
static

Definition at line 3493 of file t4_main.c.

References vi_info::adapter, cxgbe_vi_detach(), adapter::dev, doom_vi(), end_synchronized_op(), adapter::mbox, adapter::pf, t4_free_vi(), and vi_info::viid.

Here is the call graph for this function:

◆ vcxgbe_probe()

static int vcxgbe_probe ( device_t  dev)
static

Definition at line 3402 of file t4_main.c.

References vi_info::dev, vi_info::pi, port_info::port_id, and port_info::vi.

◆ vi_full_init()

◆ vi_full_uninit()

static void vi_full_uninit ( struct vi_info vi)
static

Definition at line 6810 of file t4_main.c.

References vi_info::flags, vi_info::nm_rss, quiesce_vi(), vi_info::rss, t4_teardown_vi_queues(), and VI_INIT_DONE.

Referenced by cxgbe_vi_detach(), and vi_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vi_get_counter()

static uint64_t vi_get_counter ( struct ifnet *  ifp,
ift_counter  c 
)
static

Definition at line 3026 of file t4_main.c.

References mp_ring::dropped, vi_info::flags, for_each_txq, ifp, sge_txq::r, vi_info::stats, vi_info::tick_mtx, VI_INIT_DONE, and vi_refresh_stats().

Referenced by cxgbe_init_synchronized(), and cxgbe_vi_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vi_init()

int vi_init ( struct vi_info vi)

Definition at line 6789 of file t4_main.c.

References vi_info::adapter, ASSERT_SYNCHRONIZED_OP, vi_info::flags, vi_full_init(), vi_full_uninit(), and VI_INIT_DONE.

Referenced by cxgbe_init_synchronized().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vi_refresh_stats()

static void vi_refresh_stats ( struct vi_info vi)
static

Definition at line 7077 of file t4_main.c.

References vi_info::adapter, vi_info::flags, vi_info::last_refreshed, vi_info::stats, t4_get_vi_stats(), vi_info::tick_mtx, VI_SKIP_STATS, and vi_info::vin.

Referenced by vi_get_counter(), and vi_tick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vi_sysctls()

◆ vi_tick()

static void vi_tick ( void *  arg)
static

Definition at line 7146 of file t4_main.c.

References vi_info::tick, vi_info::tick_mtx, and vi_refresh_stats().

Referenced by cxgbe_init_synchronized().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_global_rss_key()

static void write_global_rss_key ( struct adapter sc)
static

Definition at line 6513 of file t4_main.c.

References CTASSERT(), and t4_write_rss_key().

Referenced by adapter_full_init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ caps_decoder

char* caps_decoder[]
static
Initial value:
= {
"\20\001IPMI\002NCSI",
"\20\001PPP\002QFC\003DCBX",
"\20\001INGRESS\002EGRESS",
"\20\001NIC\002VM\003IDS\004UM\005UM_ISGL"
"\006HASHFILTER\007ETHOFLD",
"\20\001TOE",
"\20\001RDDP\002RDMAC",
"\20\001INITIATOR_PDU\002TARGET_PDU"
"\003INITIATOR_CNXOFLD\004TARGET_CNXOFLD"
"\005INITIATOR_SSNOFLD\006TARGET_SSNOFLD"
"\007T10DIF"
"\010INITIATOR_CMDOFLD\011TARGET_CMDOFLD",
"\20\001LOOKASIDE\002TLSKEYS\003IPSEC_INLINE"
"\004TLS_HW",
"\20\001INITIATOR\002TARGET\003CTRL_OFLD"
"\004PO_INITIATOR\005PO_TARGET",
}

Definition at line 7159 of file t4_main.c.

◆ cc_devclass

devclass_t cc_devclass
static

Definition at line 13184 of file t4_main.c.

◆ cc_driver

driver_t cc_driver
static
Initial value:
= {
"cc",
sizeof(struct port_info)
}
device_method_t cxgbe_methods[]
Definition: t4_main.c:134

Definition at line 235 of file t4_main.c.

◆ cxgbe_devclass

devclass_t cxgbe_devclass
static

Definition at line 13184 of file t4_main.c.

◆ cxgbe_driver

driver_t cxgbe_driver
static
Initial value:
= {
"cxgbe",
sizeof(struct port_info)
}

Definition at line 140 of file t4_main.c.

◆ cxgbe_methods

device_method_t cxgbe_methods[]
Initial value:
= {
DEVMETHOD(device_probe, cxgbe_probe),
DEVMETHOD(device_attach, cxgbe_attach),
DEVMETHOD(device_detach, cxgbe_detach),
{ 0, 0 }
}
static int cxgbe_detach(device_t)
Definition: t4_main.c:2655
static int cxgbe_probe(device_t)
Definition: t4_main.c:2430
static int cxgbe_attach(device_t)
Definition: t4_main.c:2597

Definition at line 134 of file t4_main.c.

◆ cxl_devclass

devclass_t cxl_devclass
static

Definition at line 13184 of file t4_main.c.

◆ cxl_driver

driver_t cxl_driver
static
Initial value:
= {
"cxl",
sizeof(struct port_info)
}

Definition at line 196 of file t4_main.c.

◆ desc

char* desc

Definition at line 875 of file t4_main.c.

Referenced by t4_probe(), t5_probe(), and t6_probe().

◆ device

uint16_t device

Definition at line 874 of file t4_main.c.

Referenced by t4_probe(), t5_probe(), and t6_probe().

◆ devlog_facility_strings

const char* const devlog_facility_strings[]
static
Initial value:
= {
}
@ FW_DEVLOG_FACILITY_RES
@ FW_DEVLOG_FACILITY_ACL
@ FW_DEVLOG_FACILITY_RI
@ FW_DEVLOG_FACILITY_MAC
@ FW_DEVLOG_FACILITY_FILTER
@ FW_DEVLOG_FACILITY_CHNET
@ FW_DEVLOG_FACILITY_FLR
@ FW_DEVLOG_FACILITY_PORT
@ FW_DEVLOG_FACILITY_DCB
@ FW_DEVLOG_FACILITY_OFLD
@ FW_DEVLOG_FACILITY_SCHED
@ FW_DEVLOG_FACILITY_CF
@ FW_DEVLOG_FACILITY_CORE
@ FW_DEVLOG_FACILITY_TIMER
@ FW_DEVLOG_FACILITY_VI
@ FW_DEVLOG_FACILITY_FOISCSI
@ FW_DEVLOG_FACILITY_PHY
@ FW_DEVLOG_FACILITY_ISCSI
@ FW_DEVLOG_FACILITY_TM
@ FW_DEVLOG_FACILITY_ETH
@ FW_DEVLOG_FACILITY_HW
@ FW_DEVLOG_FACILITY_FCOE
@ FW_DEVLOG_FACILITY_FOFCOE
@ FW_DEVLOG_FACILITY_DMAQ
@ FW_DEVLOG_FACILITY_QFC

Definition at line 9321 of file t4_main.c.

Referenced by sbuf_devlog().

◆ devlog_level_strings

const char* const devlog_level_strings[]
static
Initial value:
= {
[FW_DEVLOG_LEVEL_EMERG] = "EMERG",
[FW_DEVLOG_LEVEL_NOTICE] = "NOTICE",
}
@ FW_DEVLOG_LEVEL_INFO
@ FW_DEVLOG_LEVEL_DEBUG
@ FW_DEVLOG_LEVEL_NOTICE
@ FW_DEVLOG_LEVEL_EMERG
@ FW_DEVLOG_LEVEL_ERR
@ FW_DEVLOG_LEVEL_CRIT

Definition at line 9312 of file t4_main.c.

Referenced by sbuf_devlog().

◆ devnames

const struct devnames devnames[]
static
Initial value:
= {
{
.nexus_name = "t4nex",
.ifnet_name = "cxgbe",
.vi_ifnet_name = "vcxgbe",
.pf03_drv_name = "t4iov",
.vf_nexus_name = "t4vf",
.vf_ifnet_name = "cxgbev"
}, {
.nexus_name = "t5nex",
.ifnet_name = "cxl",
.vi_ifnet_name = "vcxl",
.pf03_drv_name = "t5iov",
.vf_nexus_name = "t5vf",
.vf_ifnet_name = "cxlv"
}, {
.nexus_name = "t6nex",
.ifnet_name = "cc",
.vi_ifnet_name = "vcc",
.pf03_drv_name = "t6iov",
.vf_nexus_name = "t6vf",
.vf_ifnet_name = "ccv"
}
}

Definition at line 1050 of file t4_main.c.

◆ fatal_callout

struct callout fatal_callout
static

Definition at line 3511 of file t4_main.c.

Referenced by fatal_error_task(), and mod_event().

◆ fw_info

◆ mlu

struct sx mlu
static

Definition at line 13061 of file t4_main.c.

Referenced by mod_event().

◆ qname

const char* qname[CIM_NUM_IBQ+CIM_NUM_OBQ_T5]
static
Initial value:
= {
"TP0", "TP1", "ULP", "SGE0", "SGE1", "NC-SI",
"ULP0", "ULP1", "ULP2", "ULP3", "SGE", "NC-SI",
"SGE0-RX", "SGE1-RX"
}

Definition at line 8798 of file t4_main.c.

Referenced by sysctl_cim_ibq_obq(), and sysctl_cim_qcfg().

◆ reset_tq

struct taskqueue* reset_tq
static

Definition at line 3512 of file t4_main.c.

Referenced by mod_event(), sysctl_reset(), and t4_fatal_err().

◆ t4_cdevsw

struct cdevsw t4_cdevsw
static
Initial value:
= {
.d_version = D_VERSION,
.d_ioctl = t4_ioctl,
.d_name = "t4nex",
}
static d_ioctl_t t4_ioctl
Definition: t4_main.c:162

Definition at line 164 of file t4_main.c.

Referenced by t4_attach().

◆ t4_devclass

devclass_t t4_devclass
static

Definition at line 13183 of file t4_main.c.

◆ t4_driver

driver_t t4_driver
static
Initial value:
= {
"t4nex",
sizeof(struct adapter)
}
static device_method_t t4_methods[]
Definition: t4_main.c:107

Definition at line 123 of file t4_main.c.

◆ t4_ioctl

d_ioctl_t t4_ioctl
static

Definition at line 162 of file t4_main.c.

◆ t4_list_lock

struct sx t4_list_lock
static

Definition at line 264 of file t4_main.c.

Referenced by mod_event(), t4_add_adapter(), t4_detach_common(), and t4_iterate().

◆ t4_memwin

const struct memwin_init t4_memwin[NUM_MEMWIN]
static
Initial value:
= {
}
@ MEMWIN2_APERTURE_T4
Definition: adapter.h:511
@ MEMWIN1_APERTURE
Definition: adapter.h:508
@ MEMWIN0_BASE
Definition: adapter.h:506
@ MEMWIN1_BASE
Definition: adapter.h:509
@ MEMWIN0_APERTURE
Definition: adapter.h:505
@ MEMWIN2_BASE_T4
Definition: adapter.h:512

Definition at line 3676 of file t4_main.c.

Referenced by setup_memwin().

◆ t4_methods

device_method_t t4_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t4_probe),
DEVMETHOD(device_attach, t4_attach),
DEVMETHOD(device_detach, t4_detach),
DEVMETHOD(device_suspend, t4_suspend),
DEVMETHOD(device_resume, t4_resume),
DEVMETHOD(bus_child_location, t4_child_location),
DEVMETHOD(bus_reset_prepare, t4_reset_prepare),
DEVMETHOD(bus_reset_post, t4_reset_post),
DEVMETHOD(t4_is_main_ready, t4_ready),
DEVMETHOD_END
}
static int t4_reset_post(device_t, device_t)
Definition: t4_main.c:2359
static int t4_suspend(device_t)
Definition: t4_main.c:1871
static int t4_detach(device_t)
Definition: t4_main.c:1666
static int t4_attach(device_t)
Definition: t4_main.c:1108
static int t4_probe(device_t)
Definition: t4_main.c:954
static int t4_child_location(device_t, device_t, struct sbuf *)
Definition: t4_main.c:1594
static int t4_reset_prepare(device_t, device_t)
Definition: t4_main.c:2350
static int t4_read_port_device(device_t, int, device_t *)
Definition: t4_main.c:1623
static int t4_resume(device_t)
Definition: t4_main.c:2144
static int t4_ready(device_t)
Definition: t4_main.c:1612

Definition at line 107 of file t4_main.c.

◆ 

struct { ... } t4_pciids[]
Initial value:
= {
{0xa000, "Chelsio Terminator 4 FPGA"},
{0x4400, "Chelsio T440-dbg"},
{0x4401, "Chelsio T420-CR"},
{0x4402, "Chelsio T422-CR"},
{0x4403, "Chelsio T440-CR"},
{0x4404, "Chelsio T420-BCH"},
{0x4405, "Chelsio T440-BCH"},
{0x4406, "Chelsio T440-CH"},
{0x4407, "Chelsio T420-SO"},
{0x4408, "Chelsio T420-CX"},
{0x4409, "Chelsio T420-BT"},
{0x440a, "Chelsio T404-BT"},
{0x440e, "Chelsio T440-LP-CR"},
}

Referenced by t4_probe().

◆ t5_devclass

devclass_t t5_devclass
static

Definition at line 13183 of file t4_main.c.

◆ t5_driver

driver_t t5_driver
static
Initial value:
= {
"t5nex",
sizeof(struct adapter)
}
static device_method_t t5_methods[]
Definition: t4_main.c:172

Definition at line 188 of file t4_main.c.

◆ t5_memwin

const struct memwin_init t5_memwin[NUM_MEMWIN]
static
Initial value:

Definition at line 3682 of file t4_main.c.

Referenced by setup_memwin().

◆ t5_methods

device_method_t t5_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t5_probe),
DEVMETHOD(device_attach, t4_attach),
DEVMETHOD(device_detach, t4_detach),
DEVMETHOD(device_suspend, t4_suspend),
DEVMETHOD(device_resume, t4_resume),
DEVMETHOD(bus_child_location, t4_child_location),
DEVMETHOD(bus_reset_prepare, t4_reset_prepare),
DEVMETHOD(bus_reset_post, t4_reset_post),
DEVMETHOD(t4_is_main_ready, t4_ready),
DEVMETHOD_END
}
static int t5_probe(device_t)
Definition: t4_main.c:979

Definition at line 172 of file t4_main.c.

◆ 

struct { ... } t5_pciids[]
Initial value:
= {
{0xb000, "Chelsio Terminator 5 FPGA"},
{0x5400, "Chelsio T580-dbg"},
{0x5401, "Chelsio T520-CR"},
{0x5402, "Chelsio T522-CR"},
{0x5403, "Chelsio T540-CR"},
{0x5407, "Chelsio T520-SO"},
{0x5409, "Chelsio T520-BT"},
{0x540a, "Chelsio T504-BT"},
{0x540d, "Chelsio T580-CR"},
{0x540e, "Chelsio T540-LP-CR"},
{0x5410, "Chelsio T580-LP-CR"},
{0x5411, "Chelsio T520-LL-CR"},
{0x5412, "Chelsio T560-CR"},
{0x5414, "Chelsio T580-LP-SO-CR"},
{0x5415, "Chelsio T502-BT"},
{0x5418, "Chelsio T540-BT"},
{0x5419, "Chelsio T540-LP-BT"},
{0x541a, "Chelsio T540-SO-BT"},
{0x541b, "Chelsio T540-SO-CR"},
{0x5483, "Custom T540-CR"},
{0x5484, "Custom T540-BT"},
}

Referenced by t5_probe().

◆ t6_devclass

devclass_t t6_devclass
static

Definition at line 13183 of file t4_main.c.

◆ t6_driver

driver_t t6_driver
static
Initial value:
= {
"t6nex",
sizeof(struct adapter)
}
static device_method_t t6_methods[]
Definition: t4_main.c:211

Definition at line 227 of file t4_main.c.

◆ t6_methods

device_method_t t6_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t6_probe),
DEVMETHOD(device_attach, t4_attach),
DEVMETHOD(device_detach, t4_detach),
DEVMETHOD(device_suspend, t4_suspend),
DEVMETHOD(device_resume, t4_resume),
DEVMETHOD(bus_child_location, t4_child_location),
DEVMETHOD(bus_reset_prepare, t4_reset_prepare),
DEVMETHOD(bus_reset_post, t4_reset_post),
DEVMETHOD(t4_is_main_ready, t4_ready),
DEVMETHOD_END
}
static int t6_probe(device_t)
Definition: t4_main.c:1004

Definition at line 211 of file t4_main.c.

◆ 

struct { ... } t6_pciids[]
Initial value:
= {
{0xc006, "Chelsio Terminator 6 FPGA"},
{0x6400, "Chelsio T6-DBG-25"},
{0x6401, "Chelsio T6225-CR"},
{0x6402, "Chelsio T6225-SO-CR"},
{0x6403, "Chelsio T6425-CR"},
{0x6404, "Chelsio T6425-SO-CR"},
{0x6405, "Chelsio T6225-OCP-SO"},
{0x6406, "Chelsio T62100-OCP-SO"},
{0x6407, "Chelsio T62100-LP-CR"},
{0x6408, "Chelsio T62100-SO-CR"},
{0x6409, "Chelsio T6210-BT"},
{0x640d, "Chelsio T62100-CR"},
{0x6410, "Chelsio T6-DBG-100"},
{0x6411, "Chelsio T6225-LL-CR"},
{0x6414, "Chelsio T61100-OCP-SO"},
{0x6415, "Chelsio T6201-BT"},
{0x6480, "Custom T6225-CR"},
{0x6481, "Custom T62100-CR"},
{0x6482, "Custom T6225-CR"},
{0x6483, "Custom T62100-CR"},
{0x6484, "Custom T64100-CR"},
{0x6485, "Custom T6240-SO"},
{0x6486, "Custom T6225-SO-CR"},
{0x6487, "Custom T6225-CR"},
}

Referenced by t6_probe().

◆ tp_la0

const struct field_desc tp_la0[]
static

Definition at line 10716 of file t4_main.c.

Referenced by tp_la_show(), tp_la_show2(), and tp_la_show3().

◆ tp_la1

const struct field_desc tp_la1[]
static

Definition at line 10753 of file t4_main.c.

Referenced by tp_la_show3().

◆ tp_la2

const struct field_desc tp_la2[]
static

Definition at line 10802 of file t4_main.c.

Referenced by tp_la_show3().

◆ vcc_devclass

devclass_t vcc_devclass
static

Definition at line 13185 of file t4_main.c.

◆ vcc_driver

driver_t vcc_driver
static
Initial value:
= {
"vcc",
sizeof(struct vi_info)
}
static device_method_t vcxgbe_methods[]
Definition: t4_main.c:150

Definition at line 242 of file t4_main.c.

◆ vcxgbe_devclass

devclass_t vcxgbe_devclass
static

Definition at line 13185 of file t4_main.c.

◆ vcxgbe_driver

driver_t vcxgbe_driver
static
Initial value:
= {
"vcxgbe",
sizeof(struct vi_info)
}

Definition at line 156 of file t4_main.c.

◆ vcxgbe_methods

device_method_t vcxgbe_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, vcxgbe_probe),
DEVMETHOD(device_attach, vcxgbe_attach),
DEVMETHOD(device_detach, vcxgbe_detach),
{ 0, 0 }
}
static int vcxgbe_detach(device_t)
Definition: t4_main.c:3493
static int vcxgbe_probe(device_t)
Definition: t4_main.c:3402
static int vcxgbe_attach(device_t)
Definition: t4_main.c:3465

Definition at line 150 of file t4_main.c.

◆ vcxl_devclass

devclass_t vcxl_devclass
static

Definition at line 13185 of file t4_main.c.

◆ vcxl_driver

driver_t vcxl_driver
static
Initial value:
= {
"vcxl",
sizeof(struct vi_info)
}

Definition at line 203 of file t4_main.c.

◆ vxlan_start_evtag

eventhandler_tag vxlan_start_evtag
static

Definition at line 12946 of file t4_main.c.

Referenced by mod_event().

◆ vxlan_stop_evtag

eventhandler_tag vxlan_stop_evtag
static

Definition at line 12947 of file t4_main.c.

Referenced by mod_event().