FreeBSD kernel CXGBE device code
|
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/priv.h>
#include <dev/pci/pcivar.h>
#include "common/common.h"
#include "common/t4_regs.h"
#include "t4_ioctl.h"
#include "t4_mp_ring.h"
Go to the source code of this file.
Data Structures | |
struct | intrs_and_queues |
Macros | |
#define | FW_PARAM_DEV(param) |
#define | FW_PARAM_PFVF(param) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | t4vf_probe (device_t dev) |
static int | t5vf_probe (device_t dev) |
static int | t6vf_probe (device_t dev) |
static int | get_params__pre_init (struct adapter *sc) |
static int | get_params__post_init (struct adapter *sc) |
static int | set_params__post_init (struct adapter *sc) |
static int | cfg_itype_and_nqueues (struct adapter *sc, struct intrs_and_queues *iaq) |
static int | t4vf_attach (device_t dev) |
static void | get_regs (struct adapter *sc, struct t4_regdump *regs, uint8_t *buf) |
static void | t4_clr_vi_stats (struct adapter *sc) |
static int | t4vf_ioctl (struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, struct thread *td) |
DRIVER_MODULE (t4vf, pci, t4vf_driver, t4vf_devclass, 0, 0) | |
MODULE_VERSION (t4vf, 1) | |
MODULE_DEPEND (t4vf, t4nex, 1, 1, 1) | |
DRIVER_MODULE (t5vf, pci, t5vf_driver, t5vf_devclass, 0, 0) | |
MODULE_VERSION (t5vf, 1) | |
MODULE_DEPEND (t5vf, t5nex, 1, 1, 1) | |
DRIVER_MODULE (t6vf, pci, t6vf_driver, t6vf_devclass, 0, 0) | |
MODULE_VERSION (t6vf, 1) | |
MODULE_DEPEND (t6vf, t6nex, 1, 1, 1) | |
DRIVER_MODULE (cxgbev, t4vf, cxgbev_driver, cxgbev_devclass, 0, 0) | |
MODULE_VERSION (cxgbev, 1) | |
DRIVER_MODULE (cxlv, t5vf, cxlv_driver, cxlv_devclass, 0, 0) | |
MODULE_VERSION (cxlv, 1) | |
DRIVER_MODULE (ccv, t6vf, ccv_driver, ccv_devclass, 0, 0) | |
MODULE_VERSION (ccv, 1) | |
Variables | |
struct { | |
uint16_t device | |
char * desc | |
} | t4vf_pciids [] |
struct { | |
uint16_t device | |
char * desc | |
} | t5vf_pciids [] |
struct { | |
uint16_t device | |
char * desc | |
} | t6vf_pciids [] |
static d_ioctl_t | t4vf_ioctl |
static struct cdevsw | t4vf_cdevsw |
static device_method_t | t4vf_methods [] |
static driver_t | t4vf_driver |
static device_method_t | t5vf_methods [] |
static driver_t | t5vf_driver |
static device_method_t | t6vf_methods [] |
static driver_t | t6vf_driver |
static driver_t | cxgbev_driver |
static driver_t | cxlv_driver |
static driver_t | ccv_driver |
static devclass_t | t4vf_devclass |
static devclass_t | t5vf_devclass |
static devclass_t | t6vf_devclass |
static devclass_t | cxgbev_devclass |
static devclass_t | cxlv_devclass |
static devclass_t | ccv_devclass |
#define FW_PARAM_DEV | ( | param | ) |
#define FW_PARAM_PFVF | ( | param | ) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 320 of file t4_vf.c.
References adapter::dev, INTR_INTX, INTR_MSI, INTR_MSIX, intrs_and_queues::intr_type, vf_resources::neq, vf_resources::nethctrl, vf_resources::niqflint, intrs_and_queues::nirq, adapter_params::nports, intrs_and_queues::nrxq, intrs_and_queues::ntxq, adapter::params, t4_intr_types, t4_nrxq, t4_ntxq, T4VF_EXTRA_INTR, and adapter_params::vfres.
Referenced by t4vf_attach().
DRIVER_MODULE | ( | ccv | , |
t6vf | , | ||
ccv_driver | , | ||
ccv_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | cxgbev | , |
t4vf | , | ||
cxgbev_driver | , | ||
cxgbev_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | cxlv | , |
t5vf | , | ||
cxlv_driver | , | ||
cxlv_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | t4vf | , |
pci | , | ||
t4vf_driver | , | ||
t4vf_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | t5vf | , |
pci | , | ||
t5vf_driver | , | ||
t5vf_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | t6vf | , |
pci | , | ||
t6vf_driver | , | ||
t6vf_devclass | , | ||
0 | , | ||
0 | |||
) |
|
static |
Definition at line 231 of file t4_vf.c.
References adapter::dev, FW_PARAM_PFVF, FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL, adapter_params::max_pkts_per_eth_tx_pkts_wr, rss_params::mode, vf_resources::nvi, adapter::params, vf_resources::pmask, adapter_params::portvec, adapter_params::rss, t4_init_rx_buf_info(), t4_verify_chip_settings(), t4vf_get_rss_glb_config(), t4vf_get_sge_params(), t4vf_get_vfres(), t4vf_query_params(), and adapter_params::vfres.
Referenced by t4vf_attach().
|
static |
Definition at line 196 of file t4_vf.c.
References vpd_params::cclk, adapter::dev, FW_PARAM_DEV, adapter_params::fw_vers, adapter::fw_version, G_FW_HDR_FW_VER_BUILD, G_FW_HDR_FW_VER_MAJOR, G_FW_HDR_FW_VER_MICRO, G_FW_HDR_FW_VER_MINOR, adapter::params, t4vf_query_params(), adapter_params::tp_vers, adapter::tp_version, and adapter_params::vpd.
Referenced by t4vf_attach().
|
static |
Definition at line 777 of file t4_vf.c.
References chip_id(), t4_regdump::len, t4_get_regs(), and t4_regdump::version.
Referenced by t4vf_ioctl().
MODULE_DEPEND | ( | t4vf | , |
t4nex | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | t5vf | , |
t5nex | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | t6vf | , |
t6nex | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | ccv | , |
1 | |||
) |
MODULE_VERSION | ( | cxgbev | , |
1 | |||
) |
MODULE_VERSION | ( | cxlv | , |
1 | |||
) |
MODULE_VERSION | ( | t4vf | , |
1 | |||
) |
MODULE_VERSION | ( | t5vf | , |
1 | |||
) |
MODULE_VERSION | ( | t6vf | , |
1 | |||
) |
|
static |
Definition at line 298 of file t4_vf.c.
References FW_PARAM_PFVF, adapter::params, adapter_params::port_caps32, and t4vf_set_params().
Referenced by t4vf_attach().
|
static |
Definition at line 786 of file t4_vf.c.
References A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H, A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L, t4_write_reg(), and VF_MPS_REG.
Referenced by t4vf_ioctl().
|
static |
Definition at line 482 of file t4_vf.c.
References A_SGE_VF_GTS, A_SGE_VF_KDOORBELL, vi_info::adapter, port_info::adapter, adapter::cdev, cfg_itype_and_nqueues(), adapter::chan_map, adapter::ctx, cxgbe_media_change(), cxgbe_media_status(), adapter::debug_flags, vi_info::dev, port_info::dev, adapter::dev, sge::eqmap, sge::eqmap_sz, vi_info::first_rxq, vi_info::first_txq, adapter::flags, for_each_port, for_each_vi, FW_OK, get_params__post_init(), get_params__pre_init(), adapter::intr_count, INTR_MSIX, adapter::intr_type, intrs_and_queues::intr_type, sge::iqmap, sge::iqmap_sz, IS_VF, port_info::lockname, adapter::lockname, MAX_NPORTS, adapter::mbox, port_info::media, pci_params::mps, adapter::names, sge::neq, sge::niq, intrs_and_queues::nirq, adapter_params::nports, vi_info::nrxq, sge::nrxq, intrs_and_queues::nrxq, vi_info::ntxq, sge::ntxq, intrs_and_queues::ntxq, port_info::nvi, vf_resources::nvi, adapter::params, adapter_params::pci, adapter::pf, vi_info::pi, port_info::pi_lock, vi_info::pktc_idx, vf_resources::pmask, adapter::port, port_info::port_id, vi_info::qsize_rxq, vi_info::qsize_txq, adapter::reg_lock, vi_info::rsrv_noflowq, sge::rxq, adapter::sc_lock, set_params__post_init(), adapter::sfl_callout, adapter::sfl_lock, adapter::sge, adapter::sge_gts_reg, adapter::sge_kdoorbell_reg, t4_add_adapter(), t4_create_dma_tag(), t4_detach_common(), t4_init_devnames(), t4_map_bar_2(), t4_map_bars_0_and_4(), t4_os_set_hw_addr(), t4_pktc_idx, t4_port_init(), t4_qsize_rxq, t4_qsize_txq, t4_setup_intr_handlers(), t4_sysctls(), t4_tmr_idx, t4vf_cdevsw, t4vf_fw_reset(), t4vf_get_vf_mac(), t4vf_prep_adapter(), vi_info::tmr_idx, port_info::tx_chan, sge::txq, devnames::vf_ifnet_name, VF_SGE_REG, adapter_params::vfres, and port_info::vi.
|
static |
Definition at line 796 of file t4_vf.c.
References t4_reg::addr, CHELSIO_T4_CLEAR_STATS, CHELSIO_T4_GETREG, CHELSIO_T4_REGDUMP, CHELSIO_T4_SCHED_CLASS, CHELSIO_T4_SCHED_QUEUE, CHELSIO_T4_SETREG, t4_regdump::data, adapter::dev, vi_info::flags, for_each_rxq, for_each_txq, for_each_vi, get_regs(), sge_txq::imm_wrs, t4_regdump::len, sge_rxq::lro, adapter::mmio_len, mp_ring_reset_stats(), adapter_params::nports, adapter::params, vi_info::pi, adapter::port, sge_txq::r, sge_rxq::rxcsum, rxq, sge_txq::sgl_wrs, t4_reg::size, t4_clr_vi_stats(), t4_get_regs_len(), t4_read_reg(), t4_read_reg64(), t4_set_sched_class(), t4_set_sched_queue(), t4_write_reg(), t4_write_reg64(), sge_txq::tso_wrs, port_info::tx_parse_error, 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, t4_reg::val, VI_INIT_DONE, sge_rxq::vlan_extraction, and sge_txq::vlan_insertion.
|
static |
Definition at line 141 of file t4_vf.c.
References desc, device, and t4vf_pciids.
|
static |
Definition at line 157 of file t4_vf.c.
References desc, device, and t5vf_pciids.
|
static |
Definition at line 173 of file t4_vf.c.
References desc, device, and t6vf_pciids.
|
static |
|
static |
|
static |
char* desc |
Definition at line 71 of file t4_vf.c.
Referenced by t4vf_probe(), t5vf_probe(), and t6vf_probe().
uint16_t device |
Definition at line 70 of file t4_vf.c.
Referenced by t4vf_probe(), t5vf_probe(), and t6vf_probe().
|
static |
Definition at line 134 of file t4_vf.c.
Referenced by t4vf_attach().
|
static |
|
static |
struct { ... } t4vf_pciids[] |
Referenced by t4vf_probe().
|
static |
|
static |
struct { ... } t5vf_pciids[] |
Referenced by t5vf_probe().
|
static |
|
static |
struct { ... } t6vf_pciids[] |
Referenced by t6vf_probe().