FreeBSD kernel CXGBE device code
|
Go to the source code of this file.
Macros | |
#define | msleep(x) |
Functions | |
__FBSDID ("$FreeBSD$") | |
int | t4vf_wait_dev_ready (struct adapter *adapter) |
int | t4vf_fw_reset (struct adapter *adapter) |
int | t4vf_get_sge_params (struct adapter *adapter) |
int | t4vf_get_rss_glb_config (struct adapter *adapter) |
int | t4vf_get_vfres (struct adapter *adapter) |
int | t4vf_prep_adapter (struct adapter *adapter) |
int | t4vf_get_vf_mac (struct adapter *adapter, unsigned int port, unsigned int *naddr, u8 *addr) |
#define msleep | ( | x | ) |
__FBSDID | ( | "$FreeBSD$" | ) |
int t4vf_fw_reset | ( | struct adapter * | adapter | ) |
t4vf_fw_reset - issue a reset to FW @adapter: the adapter
Issues a reset command to FW. For a Physical Function this would result in the Firmware reseting all of its state. For a Virtual Function this just resets the state associated with the VF.
Definition at line 74 of file t4vf_hw.c.
References cpu_to_be32, F_FW_CMD_WRITE, FW_LEN16, FW_RESET_CMD, fw_reset_cmd::op_to_write, fw_reset_cmd::retval_len16, t4vf_wr_mbox(), V_FW_CMD_LEN16, and V_FW_CMD_OP.
Referenced by t4vf_attach().
int t4vf_get_rss_glb_config | ( | struct adapter * | adapter | ) |
t4vf_get_rss_glb_config - retrieve adapter RSS Global Configuration @adapter: the adapter
Retrieves global RSS mode and parameters with which we have to live and stores them in the @adapter's RSS parameters.
Definition at line 233 of file t4vf_hw.c.
References rss_params::basicvirtual, fw_rss_glb_config_cmd::fw_rss_glb_config::basicvirtual, be32_to_cpu, cpu_to_be32, F_FW_CMD_READ, F_FW_CMD_REQUEST, F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ, F_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN, F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4, F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6, F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4, F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6, F_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN, F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP, F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN, FW_LEN16, FW_RSS_GLB_CONFIG_CMD, FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL, FW_SUCCESS, G_FW_RSS_GLB_CONFIG_CMD_MODE, rss_params::hashtoeplitz, fw_rss_glb_config_cmd::fw_rss_glb_config::manual, rss_params::mode, fw_rss_glb_config_cmd::fw_rss_glb_config::fw_rss_glb_config_manual::mode_pkd, rss_params::ofdmapen, fw_rss_glb_config_cmd::op_to_write, adapter::params, fw_rss_glb_config_cmd::retval_len16, adapter_params::rss, rss_params::syn2tupenipv4, rss_params::syn2tupenipv6, rss_params::syn4tupenipv4, rss_params::syn4tupenipv6, rss_params::synmapen, fw_rss_glb_config_cmd::fw_rss_glb_config::fw_rss_glb_config_basicvirtual::synmapen_to_hashtoeplitz, t4vf_wr_mbox(), rss_params::tnlalllookup, rss_params::tnlmapen, rss_params::u, fw_rss_glb_config_cmd::u, and V_FW_CMD_OP.
Referenced by get_params__post_init().
int t4vf_get_sge_params | ( | struct adapter * | adapter | ) |
t4vf_get_sge_params - retrieve adapter Scatter gather Engine parameters @adapter: the adapter
Retrieves various core SGE parameters in the form of hardware SGE register values. The caller is responsible for decoding these as needed. The SGE parameters are stored in @adapter->params.sge.
Definition at line 93 of file t4vf_hw.c.
References A_PL_VF_WHOAMI, A_SGE_CONM_CTRL, A_SGE_CONTROL, A_SGE_CONTROL2, A_SGE_FL_BUFFER_SIZE0, A_SGE_HOST_PAGE_SIZE, A_SGE_INGRESS_RX_THRESHOLD, A_SGE_TIMER_VALUE_0_AND_1, A_SGE_TIMER_VALUE_2_AND_3, A_SGE_TIMER_VALUE_4_AND_5, CH_ERR, CHELSIO_T5, chip_id(), core_ticks_to_us(), sge_params::counter_val, F_EGRSTATUSPAGESIZE, sge_params::fl_pktshift, sge_params::fl_starve_threshold, sge_params::fl_starve_threshold2, FW_PARAMS_MNEM_REG, FW_SUCCESS, G_EGRTHRESHOLD, G_EGRTHRESHOLDPACKING, G_INGPACKBOUNDARY, G_INGPADBOUNDARY, G_PKTSHIFT, G_SOURCEPF, G_T6_EGRTHRESHOLDPACKING, G_THRESHOLD_0, G_THRESHOLD_1, G_THRESHOLD_2, G_THRESHOLD_3, G_TIMERVALUE0, G_TIMERVALUE1, G_TIMERVALUE2, G_TIMERVALUE3, G_TIMERVALUE4, G_TIMERVALUE5, is_t4(), is_t5(), M_HOSTPAGESIZEPF0, sge_params::pack_boundary, sge_params::pad_boundary, sge_params::page_shift, adapter::params, S_HOSTPAGESIZEPF0, S_HOSTPAGESIZEPF1, adapter_params::sge, sge_params::sge_control, sge_params::sge_fl_buffer_size, SGE_FLBUF_SIZES, sge_params::spg_len, t4_read_reg(), t4vf_query_params(), sge_params::timer_val, V_FW_PARAMS_MNEM, V_FW_PARAMS_PARAM_XYZ, VF_PL_REG, X_INGPADBOUNDARY_SHIFT, and X_T6_INGPADBOUNDARY_SHIFT.
Referenced by get_params__post_init().
int t4vf_get_vf_mac | ( | struct adapter * | adapter, |
unsigned int | port, | ||
unsigned int * | naddr, | ||
u8 * | addr | ||
) |
Definition at line 396 of file t4vf_hw.c.
References cpu_to_be32, fw_acl_mac_cmd::en_to_len16, F_FW_CMD_READ, F_FW_CMD_REQUEST, FW_ACL_MAC_CMD, FW_LEN16, fw_acl_mac_cmd::macaddr0, fw_acl_mac_cmd::macaddr1, fw_acl_mac_cmd::macaddr2, fw_acl_mac_cmd::macaddr3, fw_acl_mac_cmd::nmac, fw_acl_mac_cmd::op_to_vfn, port, t4vf_wr_mbox(), and V_FW_CMD_OP.
Referenced by t4vf_attach().
int t4vf_get_vfres | ( | struct adapter * | adapter | ) |
t4vf_get_vfres - retrieve VF resource limits @adapter: the adapter
Retrieves configured resource limits and capabilities for a virtual function. The results are stored in @adapter->vfres.
Definition at line 308 of file t4vf_hw.c.
References be32_to_cpu, cpu_to_be32, F_FW_CMD_READ, F_FW_CMD_REQUEST, FW_LEN16, FW_PFVF_CMD, FW_SUCCESS, G_FW_PFVF_CMD_NEQ, G_FW_PFVF_CMD_NETHCTRL, G_FW_PFVF_CMD_NEXACTF, G_FW_PFVF_CMD_NIQ, G_FW_PFVF_CMD_NIQFLINT, G_FW_PFVF_CMD_NVI, G_FW_PFVF_CMD_PMASK, G_FW_PFVF_CMD_R_CAPS, G_FW_PFVF_CMD_TC, G_FW_PFVF_CMD_WX_CAPS, vf_resources::neq, vf_resources::nethctrl, vf_resources::nexactf, vf_resources::niq, vf_resources::niqflint, fw_pfvf_cmd::niqflint_niq, vf_resources::nvi, fw_pfvf_cmd::op_to_vfn, adapter::params, vf_resources::pmask, vf_resources::r_caps, fw_pfvf_cmd::r_caps_to_nethctrl, fw_pfvf_cmd::retval_len16, t4vf_wr_mbox(), vf_resources::tc, fw_pfvf_cmd::tc_to_nexactf, fw_pfvf_cmd::type_to_neq, V_FW_CMD_OP, adapter_params::vfres, and vf_resources::wx_caps.
Referenced by get_params__post_init().
int t4vf_prep_adapter | ( | struct adapter * | adapter | ) |
Definition at line 354 of file t4vf_hw.c.
References vpd_params::cclk, chip_id(), adapter::chip_params, adapter_params::chipid, adapter::dev, adapter_params::fpga, adapter_params::nports, adapter::params, vf_resources::pmask, t4_get_chip_params(), t4vf_wait_dev_ready(), adapter_params::vfres, and adapter_params::vpd.
Referenced by t4vf_attach().
int t4vf_wait_dev_ready | ( | struct adapter * | adapter | ) |
Definition at line 47 of file t4vf_hw.c.
References A_PL_VF_WHOAMI, msleep, t4_read_reg(), and VF_PL_REG.
Referenced by t4vf_prep_adapter().