FreeBSD kernel CXGB device code
|
Go to the source code of this file.
Data Structures | |
struct | sg_ent |
struct | mdio_ops |
struct | adapter_info |
struct | mc5_stats |
struct | mc7_stats |
struct | mac_stats |
struct | tp_mib_stats |
struct | tp_params |
struct | qset_params |
struct | sge_params |
struct | mc5_params |
struct | vpd_params |
struct | generic_vpd |
struct | pci_params |
struct | adapter_params |
struct | trace_params |
struct | link_config |
struct | mc5 |
struct | mc7 |
struct | cmac |
struct | cphy_ops |
struct | cphy |
struct | addr_val_pair |
Functions | |
static unsigned int | t3_mc5_size (const struct mc5 *p) |
static unsigned int | t3_mc7_size (const struct mc7 *p) |
static int | mdio_read (struct cphy *phy, int mmd, int reg, unsigned int *valp) |
static int | mdio_write (struct cphy *phy, int mmd, int reg, unsigned int val) |
static void | cphy_init (struct cphy *phy, adapter_t *adapter, pinfo_t *pinfo, int phy_addr, struct cphy_ops *phy_ops, const struct mdio_ops *mdio_ops, unsigned int caps, const char *desc) |
static int | uses_xaui (const adapter_t *adap) |
static int | is_10G (const adapter_t *adap) |
static int | is_offload (const adapter_t *adap) |
static unsigned int | core_ticks_per_usec (const adapter_t *adap) |
static unsigned int | dack_ticks_to_usec (const adapter_t *adap, unsigned int ticks) |
static unsigned int | is_pcie (const adapter_t *adap) |
void | t3_set_reg_field (adapter_t *adap, unsigned int addr, u32 mask, u32 val) |
void | t3_write_regs (adapter_t *adapter, const struct addr_val_pair *p, int n, unsigned int offset) |
int | t3_wait_op_done_val (adapter_t *adapter, int reg, u32 mask, int polarity, int attempts, int delay, u32 *valp) |
static int | t3_wait_op_done (adapter_t *adapter, int reg, u32 mask, int polarity, int attempts, int delay) |
int | t3_mdio_change_bits (struct cphy *phy, int mmd, int reg, unsigned int clear, unsigned int set) |
int | t3_phy_reset (struct cphy *phy, int mmd, int wait) |
int | t3_phy_advertise (struct cphy *phy, unsigned int advert) |
int | t3_phy_advertise_fiber (struct cphy *phy, unsigned int advert) |
int | t3_set_phy_speed_duplex (struct cphy *phy, int speed, int duplex) |
int | t3_phy_lasi_intr_enable (struct cphy *phy) |
int | t3_phy_lasi_intr_disable (struct cphy *phy) |
int | t3_phy_lasi_intr_clear (struct cphy *phy) |
int | t3_phy_lasi_intr_handler (struct cphy *phy) |
void | t3_intr_enable (adapter_t *adapter) |
void | t3_intr_disable (adapter_t *adapter) |
void | t3_intr_clear (adapter_t *adapter) |
void | t3_xgm_intr_enable (adapter_t *adapter, int idx) |
void | t3_xgm_intr_disable (adapter_t *adapter, int idx) |
void | t3_port_intr_enable (adapter_t *adapter, int idx) |
void | t3_port_intr_disable (adapter_t *adapter, int idx) |
void | t3_port_intr_clear (adapter_t *adapter, int idx) |
int | t3_slow_intr_handler (adapter_t *adapter) |
void | t3_link_changed (adapter_t *adapter, int port_id) |
int | t3_link_start (struct cphy *phy, struct cmac *mac, struct link_config *lc) |
const struct adapter_info * | t3_get_adapter_info (unsigned int board_id) |
int | t3_seeprom_read (adapter_t *adapter, u32 addr, u32 *data) |
int | t3_seeprom_write (adapter_t *adapter, u32 addr, u32 data) |
int | t3_seeprom_wp (adapter_t *adapter, int enable) |
int | t3_get_vpd_len (adapter_t *adapter, struct generic_vpd *vpd) |
int | t3_read_vpd (adapter_t *adapter, struct generic_vpd *vpd) |
int | t3_read_flash (adapter_t *adapter, unsigned int addr, unsigned int nwords, u32 *data, int byte_oriented) |
int | t3_get_tp_version (adapter_t *adapter, u32 *vers) |
int | t3_check_tpsram_version (adapter_t *adapter) |
int | t3_check_tpsram (adapter_t *adapter, const u8 *tp_ram, unsigned int size) |
int | t3_load_fw (adapter_t *adapter, const u8 *fw_data, unsigned int size) |
int | t3_get_fw_version (adapter_t *adapter, u32 *vers) |
int | t3_check_fw_version (adapter_t *adapter) |
int | t3_load_boot (adapter_t *adapter, u8 *fw_data, unsigned int size) |
int | t3_init_hw (adapter_t *adapter, u32 fw_params) |
void | mac_prep (struct cmac *mac, adapter_t *adapter, int index) |
void | early_hw_init (adapter_t *adapter, const struct adapter_info *ai) |
int | t3_reset_adapter (adapter_t *adapter) |
int | t3_prep_adapter (adapter_t *adapter, const struct adapter_info *ai, int reset) |
int | t3_reinit_adapter (adapter_t *adap) |
void | t3_led_ready (adapter_t *adapter) |
void | t3_fatal_err (adapter_t *adapter) |
void | t3_set_vlan_accel (adapter_t *adapter, unsigned int ports, int on) |
void | t3_enable_filters (adapter_t *adap) |
void | t3_disable_filters (adapter_t *adap) |
void | t3_tp_set_offload_mode (adapter_t *adap, int enable) |
void | t3_config_rss (adapter_t *adapter, unsigned int rss_config, const u8 *cpus, const u16 *rspq) |
int | t3_read_rss (adapter_t *adapter, u8 *lkup, u16 *map) |
int | t3_set_proto_sram (adapter_t *adap, const u8 *data) |
int | t3_mps_set_active_ports (adapter_t *adap, unsigned int port_mask) |
void | t3_port_failover (adapter_t *adapter, int port) |
void | t3_failover_done (adapter_t *adapter, int port) |
void | t3_failover_clear (adapter_t *adapter) |
int | t3_cim_ctl_blk_read (adapter_t *adap, unsigned int addr, unsigned int n, unsigned int *valp) |
int | t3_mc7_bd_read (struct mc7 *mc7, unsigned int start, unsigned int n, u64 *buf) |
int | t3_mac_init (struct cmac *mac) |
void | t3b_pcs_reset (struct cmac *mac) |
void | t3c_pcs_force_los (struct cmac *mac) |
void | t3_mac_disable_exact_filters (struct cmac *mac) |
void | t3_mac_enable_exact_filters (struct cmac *mac) |
int | t3_mac_enable (struct cmac *mac, int which) |
int | t3_mac_disable (struct cmac *mac, int which) |
int | t3_mac_set_mtu (struct cmac *mac, unsigned int mtu) |
int | t3_mac_set_rx_mode (struct cmac *mac, struct t3_rx_mode *rm) |
int | t3_mac_set_address (struct cmac *mac, unsigned int idx, u8 addr[6]) |
int | t3_mac_set_num_ucast (struct cmac *mac, unsigned char n) |
const struct mac_stats * | t3_mac_update_stats (struct cmac *mac) |
int | t3_mac_set_speed_duplex_fc (struct cmac *mac, int speed, int duplex, int fc) |
int | t3b2_mac_watchdog_task (struct cmac *mac) |
void | t3_mc5_prep (adapter_t *adapter, struct mc5 *mc5, int mode) |
int | t3_mc5_init (struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, unsigned int nroutes) |
void | t3_mc5_intr_handler (struct mc5 *mc5) |
int | t3_read_mc5_range (const struct mc5 *mc5, unsigned int start, unsigned int n, u32 *buf) |
int | t3_tp_set_coalescing_size (adapter_t *adap, unsigned int size, int psh) |
void | t3_tp_set_max_rxsize (adapter_t *adap, unsigned int size) |
void | t3_tp_get_mib_stats (adapter_t *adap, struct tp_mib_stats *tps) |
void | t3_load_mtus (adapter_t *adap, unsigned short mtus[NMTUS], unsigned short alpha[NCCTRL_WIN], unsigned short beta[NCCTRL_WIN], unsigned short mtu_cap) |
void | t3_read_hw_mtus (adapter_t *adap, unsigned short mtus[NMTUS]) |
void | t3_get_cong_cntl_tab (adapter_t *adap, unsigned short incr[NMTUS][NCCTRL_WIN]) |
void | t3_config_trace_filter (adapter_t *adapter, const struct trace_params *tp, int filter_index, int invert, int enable) |
void | t3_query_trace_filter (adapter_t *adapter, struct trace_params *tp, int filter_index, int *inverted, int *enabled) |
int | t3_config_sched (adapter_t *adap, unsigned int kbps, int sched) |
int | t3_set_sched_ipg (adapter_t *adap, int sched, unsigned int ipg) |
void | t3_get_tx_sched (adapter_t *adap, unsigned int sched, unsigned int *kbps, unsigned int *ipg) |
void | t3_read_pace_tbl (adapter_t *adap, unsigned int pace_vals[NTX_SCHED]) |
void | t3_set_pace_tbl (adapter_t *adap, unsigned int *pace_vals, unsigned int start, unsigned int n) |
int | t3_get_up_la (adapter_t *adapter, u32 *stopped, u32 *index, u32 *size, void *data) |
int | t3_get_up_ioqs (adapter_t *adapter, u32 *size, void *data) |
void | t3_sge_prep (adapter_t *adap, struct sge_params *p) |
void | t3_sge_init (adapter_t *adap, struct sge_params *p) |
int | t3_sge_init_ecntxt (adapter_t *adapter, unsigned int id, int gts_enable, enum sge_context_type type, int respq, u64 base_addr, unsigned int size, unsigned int token, int gen, unsigned int cidx) |
int | t3_sge_init_flcntxt (adapter_t *adapter, unsigned int id, int gts_enable, u64 base_addr, unsigned int size, unsigned int esize, unsigned int cong_thres, int gen, unsigned int cidx) |
int | t3_sge_init_rspcntxt (adapter_t *adapter, unsigned int id, int irq_vec_idx, u64 base_addr, unsigned int size, unsigned int fl_thres, int gen, unsigned int cidx) |
int | t3_sge_init_cqcntxt (adapter_t *adapter, unsigned int id, u64 base_addr, unsigned int size, int rspq, int ovfl_mode, unsigned int credits, unsigned int credit_thres) |
int | t3_sge_enable_ecntxt (adapter_t *adapter, unsigned int id, int enable) |
int | t3_sge_disable_fl (adapter_t *adapter, unsigned int id) |
int | t3_sge_disable_rspcntxt (adapter_t *adapter, unsigned int id) |
int | t3_sge_disable_cqcntxt (adapter_t *adapter, unsigned int id) |
int | t3_sge_read_ecntxt (adapter_t *adapter, unsigned int id, u32 data[4]) |
int | t3_sge_read_fl (adapter_t *adapter, unsigned int id, u32 data[4]) |
int | t3_sge_read_cq (adapter_t *adapter, unsigned int id, u32 data[4]) |
int | t3_sge_read_rspq (adapter_t *adapter, unsigned int id, u32 data[4]) |
int | t3_sge_cqcntxt_op (adapter_t *adapter, unsigned int id, unsigned int op, unsigned int credits) |
int | t3_elmr_blk_write (adapter_t *adap, int start, const u32 *vals, int n) |
int | t3_elmr_blk_read (adapter_t *adap, int start, u32 *vals, int n) |
int | t3_vsc7323_init (adapter_t *adap, int nports) |
int | t3_vsc7323_set_speed_fc (adapter_t *adap, int speed, int fc, int port) |
int | t3_vsc7323_set_mtu (adapter_t *adap, unsigned int mtu, int port) |
int | t3_vsc7323_set_addr (adapter_t *adap, u8 addr[6], int port) |
int | t3_vsc7323_enable (adapter_t *adap, int port, int which) |
int | t3_vsc7323_disable (adapter_t *adap, int port, int which) |
const struct mac_stats * | t3_vsc7323_update_stats (struct cmac *mac) |
int | t3_i2c_read8 (adapter_t *adapter, int chained, u8 *valp) |
int | t3_i2c_write8 (adapter_t *adapter, int chained, u8 val) |
int | t3_mi1_read (adapter_t *adapter, int phy_addr, int mmd_addr, int reg_addr, unsigned int *valp) |
int | t3_mi1_write (adapter_t *adapter, int phy_addr, int mmd_addr, int reg_addr, unsigned int val) |
int | t3_mv88e1xxx_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_vsc8211_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_vsc8211_fifo_depth (adapter_t *adap, unsigned int mtu, int port) |
int | t3_ael1002_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_ael1006_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_ael2005_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_ael2020_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_qt2045_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_tn1010_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_xaui_direct_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
int | t3_aq100x_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
#define adapter_info | ( | adap | ) | ((adap)->params.info) |
Definition at line 645 of file cxgb_common.h.
#define DUPLEX_INVALID 0xff |
Definition at line 445 of file cxgb_common.h.
Definition at line 642 of file cxgb_common.h.
#define G_TP_VERSION_MAJOR | ( | x | ) | (((x) >> S_TP_VERSION_MAJOR) & M_TP_VERSION_MAJOR) |
Definition at line 83 of file cxgb_common.h.
#define G_TP_VERSION_MICRO | ( | x | ) | (((x) >> S_TP_VERSION_MICRO) & M_TP_VERSION_MICRO) |
Definition at line 95 of file cxgb_common.h.
#define G_TP_VERSION_MINOR | ( | x | ) | (((x) >> S_TP_VERSION_MINOR) & M_TP_VERSION_MINOR) |
Definition at line 89 of file cxgb_common.h.
#define M_TP_VERSION_MAJOR 0xFF |
Definition at line 81 of file cxgb_common.h.
#define M_TP_VERSION_MICRO 0xFF |
Definition at line 93 of file cxgb_common.h.
#define M_TP_VERSION_MINOR 0xFF |
Definition at line 87 of file cxgb_common.h.
#define MAC_STATS_ACCUM_SECS 180 |
Definition at line 623 of file cxgb_common.h.
#define MAX_PHYINTRS 4 |
Definition at line 145 of file cxgb_common.h.
#define MAX_RX_COALESCING_LEN 12288U |
Definition at line 51 of file cxgb_common.h.
#define PCI_VENDOR_ID_CHELSIO 0x1425 |
Definition at line 639 of file cxgb_common.h.
#define S_TP_VERSION_MAJOR 16 |
Definition at line 80 of file cxgb_common.h.
#define S_TP_VERSION_MICRO 0 |
Definition at line 92 of file cxgb_common.h.
#define S_TP_VERSION_MINOR 8 |
Definition at line 86 of file cxgb_common.h.
#define SGE_NUM_GENBITS 2 |
Definition at line 139 of file cxgb_common.h.
#define SPEED_INVALID 0xffff |
Definition at line 444 of file cxgb_common.h.
#define TX_DESC_FLITS 16U |
Definition at line 142 of file cxgb_common.h.
#define V_TP_VERSION_MAJOR | ( | x | ) | ((x) << S_TP_VERSION_MAJOR) |
Definition at line 82 of file cxgb_common.h.
#define V_TP_VERSION_MICRO | ( | x | ) | ((x) << S_TP_VERSION_MICRO) |
Definition at line 94 of file cxgb_common.h.
#define V_TP_VERSION_MINOR | ( | x | ) | ((x) << S_TP_VERSION_MINOR) |
Definition at line 88 of file cxgb_common.h.
#define VSC_STATS_ACCUM_SECS 30 |
Definition at line 626 of file cxgb_common.h.
#define WR_FLITS (TX_DESC_FLITS + 1 - SGE_NUM_GENBITS) |
Definition at line 143 of file cxgb_common.h.
#define XGM_REG | ( | reg_addr, | |
idx | |||
) | ((reg_addr) + (idx) * (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR)) |
Definition at line 628 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
TP_VERSION_MAJOR | |
TP_VERSION_MINOR | |
TP_VERSION_MICRO |
Definition at line 74 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
FW_VERSION_MAJOR | |
FW_VERSION_MINOR | |
FW_VERSION_MICRO |
Definition at line 98 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
LA_CTRL | |
LA_DATA | |
LA_ENTRIES |
Definition at line 104 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
IOQ_ENTRIES |
Definition at line 110 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
SGE_QSETS | |
SGE_RXQ_PER_SET | |
SGE_TXQ_PER_SET |
Definition at line 114 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
AN_PKT_SIZE | |
IMMED_PKT_SIZE |
Definition at line 127 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
DEFAULT_NSERVERS | |
DEFAULT_NFILTERS |
Definition at line 336 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MC5_MODE_144_BIT | |
MC5_MODE_72_BIT |
Definition at line 342 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MC5_MIN_TIDS |
Definition at line 348 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MAX_VPD_BYTES |
Definition at line 369 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
PCI_VARIANT_PCI | |
PCI_VARIANT_PCIX_MODE1_PARITY | |
PCI_VARIANT_PCIX_MODE1_ECC | |
PCI_VARIANT_PCIX_266_MODE2 | |
PCI_VARIANT_PCIE |
Definition at line 379 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
T3_REV_A | |
T3_REV_B | |
T3_REV_B2 | |
T3_REV_C |
Definition at line 407 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MAC_DIRECTION_RX | |
MAC_DIRECTION_TX | |
MAC_RXFIFO_SIZE |
Definition at line 495 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MDIO_DEV_PMA_PMD | |
MDIO_DEV_WIS | |
MDIO_DEV_PCS | |
MDIO_DEV_XGXS | |
MDIO_DEV_ANEG | |
MDIO_DEV_VEND1 | |
MDIO_DEV_VEND2 |
Definition at line 502 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
RX_ALARM_CTRL | |
TX_ALARM_CTRL | |
LASI_CTRL | |
RX_ALARM_STAT | |
TX_ALARM_STAT | |
LASI_STAT |
Definition at line 513 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
PHY_LOOPBACK_TX | |
PHY_LOOPBACK_RX |
Definition at line 523 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
cphy_cause_link_change | |
cphy_cause_fifo_error | |
cphy_cause_module_change | |
cphy_cause_alarm |
Definition at line 529 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
phy_modtype_none | |
phy_modtype_sr | |
phy_modtype_lr | |
phy_modtype_lrm | |
phy_modtype_twinax | |
phy_modtype_twinax_long | |
phy_modtype_unknown |
Definition at line 537 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
PHY_LINK_DOWN | |
PHY_LINK_UP | |
PHY_LINK_PARTIAL |
Definition at line 547 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
MAX_FRAME_SIZE | |
EEPROMSIZE | |
SERNUM_LEN | |
ECNUM_LEN | |
RSS_TABLE_SIZE | |
TCB_SIZE | |
NMTUS | |
NCCTRL_WIN | |
NTX_SCHED | |
PROTO_SRAM_LINES | |
EXACT_ADDR_FILTERS |
Definition at line 37 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
PAUSE_RX | |
PAUSE_TX | |
PAUSE_AUTONEG |
Definition at line 53 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
SUPPORTED_LINK_IRQ | |
SUPPORTED_MISC_IRQ | |
SUPPORTED_IRQ |
Definition at line 59 of file cxgb_common.h.
anonymous enum |
Enumerator | |
---|---|
STAT_ULP_CH0_PBL_OOB | |
STAT_ULP_CH1_PBL_OOB | |
STAT_PCI_CORR_ECC | |
IRQ_NUM_STATS |
Definition at line 66 of file cxgb_common.h.
enum sge_context_type |
Enumerator | |
---|---|
SGE_CNTXT_RDMA | |
SGE_CNTXT_ETH | |
SGE_CNTXT_OFLD | |
SGE_CNTXT_CTRL |
Definition at line 120 of file cxgb_common.h.
|
inlinestatic |
Definition at line 662 of file cxgb_common.h.
References vpd_params::cclk, adapter::params, and adapter_params::vpd.
Referenced by cxgb_extension_ioctl(), dack_ticks_to_usec(), t3_get_tx_sched(), t3_set_sched_ipg(), and t3_sge_init().
|
inlinestatic |
Definition at line 605 of file cxgb_common.h.
References cphy::adapter, adapter, cphy::addr, cphy::caps, cphy::desc, cphy::mdio_read, cphy::mdio_write, cphy::ops, phy, cphy::pinfo, mdio_ops::read, and mdio_ops::write.
Referenced by t3_ael1002_phy_prep(), t3_ael1006_phy_prep(), t3_ael2005_phy_prep(), t3_ael2020_phy_prep(), t3_aq100x_phy_prep(), t3_mv88e1xxx_phy_prep(), t3_qt2045_phy_prep(), t3_tn1010_phy_prep(), t3_vsc8211_phy_prep(), and t3_xaui_direct_phy_prep().
|
inlinestatic |
Definition at line 667 of file cxgb_common.h.
References core_ticks_per_usec(), tp_params::dack_re, adapter::params, and adapter_params::tp.
Referenced by cxgb_extension_ioctl(), t3_read_pace_tbl(), and t3_set_pace_tbl().
void early_hw_init | ( | adapter_t * | adapter, |
const struct adapter_info * | ai | ||
) |
early_hw_init - HW initialization done at card detection time @adapter: the adapter @ai: contains information about the adapter type and properties
Perfoms the part of HW initialization that is done early on when the driver first detecs the card. Most of the HW state is initialized lazily later on when a port or an offload function are first used.
Definition at line 4359 of file cxgb_t3_hw.c.
References A_I2C_CFG, A_MC5_DB_SERVER_INDEX, A_SG_OCO_BASE, A_T3DBG_GPIO_EN, A_XGM_PORT_CFG, vpd_params::cclk, F_CLKDIVRESET_, F_ENRGMII, F_GPIO0_OEN, F_GPIO0_OUT_VAL, adapter_info::gpio_out, is_10G(), mi1_init(), adapter_params::nports, adapter::params, adapter_params::rev, t3_read_reg(), t3_write_reg(), uses_xaui(), V_BASE1, V_I2C_CLKDIV, V_PORTSPEED, adapter_params::vpd, and XGM_REG.
Referenced by t3_prep_adapter(), and t3_reinit_adapter().
|
inlinestatic |
Definition at line 652 of file cxgb_common.h.
References adapter_info, and SUPPORTED_10000baseT_Full.
Referenced by cxgb_extension_ioctl(), early_hw_init(), mac_prep(), t3_link_start(), t3_mac_set_mtu(), t3_prep_adapter(), and xgm_reset_ctrl().
|
inlinestatic |
Definition at line 657 of file cxgb_common.h.
References adapter_params::offload, and adapter::params.
Referenced by cxgb_controller_attach(), cxgb_extension_ioctl(), cxgb_port_attach(), cxgb_up(), t3_prep_adapter(), t3_sge_prep(), t3_tp_set_offload_mode(), and tp_init().
|
inlinestatic |
Definition at line 673 of file cxgb_common.h.
References adapter::params, adapter_params::pci, PCI_VARIANT_PCIE, and pci_params::variant.
Referenced by cxgb_get_regs(), t3_init_hw(), t3_intr_clear(), t3_intr_enable(), t3_reset_adapter(), and t3_slow_intr_handler().
Definition at line 4319 of file cxgb_t3_hw.c.
References A_XGM_PORT_CFG, A_XGM_SERDES_CTRL, cmac::adapter, adapter, cmac::ext_port, F_ENRGMII, is_10G(), mac, cmac::multiport, adapter_params::nports, cmac::nucast, cmac::offset, adapter::params, adapter_params::rev, t3_os_pci_read_config_2(), t3_set_reg_field(), t3_write_reg(), uses_xaui(), adapter_params::vpd, vpd_params::xauicfg, XGMAC0_0_BASE_ADDR, and XGMAC0_1_BASE_ADDR.
Referenced by t3_prep_adapter().
|
inlinestatic |
Definition at line 592 of file cxgb_common.h.
References cphy::adapter, cphy::addr, cphy::mdio_read, and phy.
Referenced by ael2005_get_module_type(), ael2005_intr_handler(), ael2005_reset(), ael2020_get_module_type(), ael2020_intr_clear(), ael2020_intr_handler(), ael2020_reset(), ael_i2c_rd(), ael_i2c_wr(), aq100x_get_link_status(), aq100x_intr_handler(), aq100x_power_down(), aq100x_temperature(), aq100x_vendor_intr(), get_link_status_r(), get_link_status_x(), mv88e1xxx_get_link_status(), mv88e1xxx_intr_clear(), mv88e1xxx_intr_handler(), t3_aq100x_phy_prep(), t3_mdio_change_bits(), t3_phy_advertise(), t3_phy_lasi_intr_clear(), t3_phy_lasi_intr_handler(), t3_phy_reset(), t3_qt2045_phy_prep(), t3_set_phy_speed_duplex(), t3_vsc8211_fifo_depth(), t3_vsc8211_phy_prep(), tn1010_get_link_status(), vsc8211_get_link_status(), vsc8211_get_link_status_fiber(), vsc8211_intr_clear(), and vsc8211_intr_handler().
|
inlinestatic |
Definition at line 598 of file cxgb_common.h.
References cphy::adapter, cphy::addr, cphy::mdio_write, and phy.
Referenced by ael1002_power_down(), ael1002_reset(), ael2005_intr_clear(), ael2005_intr_disable(), ael2005_intr_enable(), ael2005_intr_handler(), ael2005_setup_sr_edc(), ael2005_setup_twinax_edc(), ael2020_setup_twinax_edc(), ael_i2c_rd(), ael_i2c_wr(), aq100x_set_defaults(), mv88e1xxx_intr_disable(), mv88e1xxx_intr_enable(), set_phy_regs(), t3_mdio_change_bits(), t3_mv88e1xxx_phy_prep(), t3_phy_advertise(), t3_phy_advertise_fiber(), t3_phy_lasi_intr_disable(), t3_phy_lasi_intr_enable(), t3_set_phy_speed_duplex(), t3_vsc8211_fifo_depth(), t3_vsc8211_phy_prep(), tn1010_advertise(), vsc8211_intr_disable(), vsc8211_intr_enable(), and vsc8211_set_automdi().
Definition at line 345 of file cxgb_ael1002.c.
References port_info::adapter, ael1002_get_module_type(), ael1002_ops, ael100x_txon(), ael_laser_down(), cphy_init(), cphy::modtype, phy, port_info::phy, cphy::pinfo, SUPPORTED_10000baseT_Full, SUPPORTED_AUI, and SUPPORTED_FIBRE.
Definition at line 427 of file cxgb_ael1002.c.
References port_info::adapter, ael1006_ops, ael100x_txon(), cphy_init(), cphy::modtype, phy, port_info::phy, phy_modtype_sr, cphy::pinfo, SUPPORTED_10000baseT_Full, SUPPORTED_AUI, and SUPPORTED_FIBRE.
Definition at line 1385 of file cxgb_ael1002.c.
References port_info::adapter, ael2005_get_module_type(), ael2005_ops, ael_laser_down(), AEL_OPT_SETTINGS, cphy_init(), MDIO_DEV_PMA_PMD, cphy::modtype, msleep, phy, port_info::phy, cphy::pinfo, SUPPORTED_10000baseT_Full, SUPPORTED_AUI, SUPPORTED_FIBRE, SUPPORTED_IRQ, and t3_mdio_change_bits().
Definition at line 2137 of file cxgb_ael1002.c.
References port_info::adapter, ael2020_get_module_type(), ael2020_ops, ael2020_reset_regs, ael_laser_down(), cphy_init(), cphy::modtype, msleep, phy, port_info::phy, cphy::pinfo, set_phy_regs(), SUPPORTED_10000baseT_Full, SUPPORTED_AUI, SUPPORTED_FIBRE, and SUPPORTED_IRQ.
Definition at line 465 of file cxgb_aq100x.c.
References A_T3DBG_GPIO_EN, port_info::adapter, aq100x_ops, aq100x_set_defaults(), AQ_FW_VERSION, AQ_XAUI_KX_CFG, AQ_XAUI_RX_CFG, AQ_XAUI_TX_CFG, CH_WARN, cphy_init(), F_GPIO10_OUT_VAL, F_GPIO6_OUT_VAL, MDIO_DEV_PMA_PMD, MDIO_DEV_VEND1, MDIO_DEV_XGXS, mdio_read(), msleep, phy, port_info::phy, cphy::pinfo, SUPPORTED_10000baseT_Full, SUPPORTED_1000baseT_Full, SUPPORTED_AUI, SUPPORTED_Autoneg, SUPPORTED_MISC_IRQ, SUPPORTED_TP, and t3_set_reg_field().
int t3_check_fw_version | ( | adapter_t * | adapter | ) |
t3_check_fw_version - check if the FW is compatible with this driver @adapter: the adapter
Checks if an adapter's FW is compatible with the driver. Returns 0 if the versions are compatible, a negative error otherwise.
Definition at line 1232 of file cxgb_t3_hw.c.
References CH_WARN, FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_T3, G_FW_VERSION_MAJOR, G_FW_VERSION_MINOR, G_FW_VERSION_TYPE, and t3_get_fw_version().
Referenced by cxgb_controller_attach().
t3_check_tpsram - check if provided protocol SRAM is compatible with this driver @adapter: the adapter @tp_sram: the firmware image to write @size: image size
Checks if an adapter's tp sram is compatible with the driver. Returns 0 if the versions are compatible, a negative error otherwise.
Definition at line 1184 of file cxgb_t3_hw.c.
References CH_ERR.
Referenced by update_tpeeprom(), and update_tpsram().
int t3_check_tpsram_version | ( | adapter_t * | adapter | ) |
t3_check_tpsram_version - read the tp sram version @adapter: the adapter
Definition at line 1145 of file cxgb_t3_hw.c.
References A_TP_EMBED_OP_FIELD1, CH_ERR, G_TP_VERSION_MAJOR, G_TP_VERSION_MINOR, adapter::params, adapter_params::rev, t3_get_tp_version(), t3_read_reg(), T3_REV_A, TP_VERSION_MAJOR, and TP_VERSION_MINOR.
Referenced by cxgb_controller_attach().
int t3_cim_ctl_blk_read | ( | adapter_t * | adap, |
unsigned int | addr, | ||
unsigned int | n, | ||
unsigned int * | valp | ||
) |
t3_cim_ctl_blk_read - read a block from CIM control region @adap: the adapter @addr: the start address within the CIM control region
: number of words to read @valp: where to store the result
Reads a block of 4-byte words from the CIM control region.
Definition at line 1420 of file cxgb_t3_hw.c.
References A_CIM_HOST_ACC_CTRL, A_CIM_HOST_ACC_DATA, CIM_CTL_BASE, F_HOSTBUSY, t3_read_reg(), t3_wait_op_done(), and t3_write_reg().
Referenced by t3_fatal_err().
void t3_config_rss | ( | adapter_t * | adapter, |
unsigned int | rss_config, | ||
const u8 * | cpus, | ||
const u16 * | rspq | ||
) |
t3_config_rss - configure Rx packet steering @adapter: the adapter @rss_config: RSS settings (written to TP_RSS_CONFIG) @cpus: values for the CPU lookup table (0xff terminated) @rspq: values for the response queue lookup table (0xffff terminated)
Programs the receive packet steering logic. @cpus and @rspq provide the values for the CPU and response queue lookup tables. If they provide fewer values than the size of the tables the supplied values are used repeatedly until the tables are fully populated.
Definition at line 2956 of file cxgb_t3_hw.c.
References A_TP_RSS_CONFIG, A_TP_RSS_LKP_TABLE, A_TP_RSS_MAP_TABLE, RSS_TABLE_SIZE, and t3_write_reg().
Referenced by setup_rss().
int t3_config_sched | ( | adapter_t * | adap, |
unsigned int | kbps, | ||
int | sched | ||
) |
t3_config_sched - configure a HW traffic scheduler @adap: the adapter @kbps: target rate in Kbps @sched: the scheduler index
Configure a Tx HW scheduler for the target rate.
Definition at line 3692 of file cxgb_t3_hw.c.
References A_TP_TM_PIO_ADDR, A_TP_TM_PIO_DATA, A_TP_TX_MOD_Q1_Q0_RATE_LIMIT, vpd_params::cclk, adapter::params, t3_read_reg(), t3_write_reg(), and adapter_params::vpd.
Referenced by cxgb_extension_ioctl().
void t3_config_trace_filter | ( | adapter_t * | adapter, |
const struct trace_params * | tp, | ||
int | filter_index, | ||
int | invert, | ||
int | enable | ||
) |
t3_config_trace_filter - configure one of the tracing filters @adapter: the adapter @tp: the desired trace filter parameters @filter_index: which filter to configure @invert: if set non-matching packets are traced instead of matching ones @enable: whether to enable or disable the filter
Configures one of the tracing filters available in HW.
Definition at line 3607 of file cxgb_t3_hw.c.
References A_TP_PIO_DATA, A_TP_RX_TRC_KEY0, A_TP_TX_TRC_KEY0, trace_params::dip, trace_params::dip_mask, trace_params::dport, trace_params::dport_mask, trace_params::intf, trace_params::intf_mask, trace_params::proto, trace_params::proto_mask, trace_params::sip, trace_params::sip_mask, trace_params::sport, trace_params::sport_mask, t3_read_reg(), tp_wr_indirect(), trace_params::vlan, and trace_params::vlan_mask.
Referenced by cxgb_extension_ioctl().
void t3_disable_filters | ( | adapter_t * | adap | ) |
t3_disable_filters - disable the HW filters @adap: the adapter
Disables the HW filters for NIC traffic.
Definition at line 3071 of file cxgb_t3_hw.c.
References A_MC5_DB_CONFIG, A_TP_GLOBAL_CONFIG, A_TP_INGRESS_CONFIG, F_FILTEREN, F_LOOKUPEVERYPKT, M_FIVETUPLELOOKUP, t3_set_reg_field(), tp_wr_bits_indirect(), and V_FIVETUPLELOOKUP.
Definition at line 76 of file cxgb_vsc7323.c.
References adapter_info, ELMR_ADDR, ELMR_DATA_HI, ELMR_DATA_LO, ELMR_LOCK, ELMR_MDIO_ADDR, ELMR_STAT, ELMR_UNLOCK, mdio_ops::read, udelay, and mdio_ops::write.
Referenced by t3_vsc7323_disable(), t3_vsc7323_enable(), and t3_vsc7323_update_stats().
Definition at line 53 of file cxgb_vsc7323.c.
References adapter_info, ELMR_ADDR, ELMR_DATA_HI, ELMR_DATA_LO, ELMR_LOCK, ELMR_MDIO_ADDR, ELMR_UNLOCK, and mdio_ops::write.
Referenced by elmr_write(), and t3_vsc7323_init().
void t3_enable_filters | ( | adapter_t * | adap | ) |
t3_enable_filters - enable the HW filters @adap: the adapter
Enables the HW filters for NIC traffic.
Definition at line 3057 of file cxgb_t3_hw.c.
References A_MC5_DB_CONFIG, A_TP_GLOBAL_CONFIG, A_TP_IN_CONFIG, A_TP_INGRESS_CONFIG, F_FILTEREN, F_LOOKUPEVERYPKT, F_NICMODE, t3_set_reg_field(), tp_wr_bits_indirect(), and V_FIVETUPLELOOKUP.
Referenced by setup_hw_filters().
void t3_failover_clear | ( | adapter_t * | adapter | ) |
Definition at line 4668 of file cxgb_t3_hw.c.
References A_MPS_CFG, F_PORT0ACTIVE, F_PORT1ACTIVE, and t3_set_reg_field().
void t3_failover_done | ( | adapter_t * | adapter, |
int | port | ||
) |
Definition at line 4662 of file cxgb_t3_hw.c.
References A_MPS_CFG, F_PORT0ACTIVE, F_PORT1ACTIVE, and t3_set_reg_field().
void t3_fatal_err | ( | adapter_t * | adapter | ) |
Definition at line 1134 of file cxgb_main.c.
References A_XGM_RX_CTRL, A_XGM_TX_CTRL, adapter::dev, adapter::flags, FULL_INIT_DONE, t3_cim_ctl_blk_read(), t3_intr_disable(), t3_sge_stop(), t3_write_reg(), and XGM_REG.
Referenced by cim_intr_handler(), cplsw_intr_handler(), mac_intr_handler(), mc7_intr_handler(), mps_intr_handler(), pci_intr_handler(), pcie_intr_handler(), pmrx_intr_handler(), pmtx_intr_handler(), t3_mc5_intr_handler(), t3_sge_err_intr_handler(), tp_intr_handler(), ulprx_intr_handler(), and ulptx_intr_handler().
const struct adapter_info * t3_get_adapter_info | ( | unsigned int | board_id | ) |
Definition at line 587 of file cxgb_t3_hw.c.
References ARRAY_SIZE, and t3_adap_info.
Referenced by cxgb_get_adapter_info().
void t3_get_cong_cntl_tab | ( | adapter_t * | adap, |
unsigned short | incr[NMTUS][NCCTRL_WIN] | ||
) |
t3_get_cong_cntl_tab - reads the congestion control table @adap: the adapter @incr: where to store the alpha values
Reads the additive increments programmed into the HW congestion control table.
Definition at line 3482 of file cxgb_t3_hw.c.
References A_TP_CCTRL_TABLE, NCCTRL_WIN, NMTUS, t3_read_reg(), and t3_write_reg().
t3_get_fw_version - read the firmware version @adapter: the adapter @vers: where to place the version
Reads the FW version from flash. Note that we had to move the version due to FW size. If we don't find a valid FW version in the new location we fall back and read the old location.
Definition at line 1216 of file cxgb_t3_hw.c.
References FW_VERS_ADDR, FW_VERS_ADDR_PRE8, and t3_read_flash().
Referenced by cxgb_controller_attach(), cxgb_extension_ioctl(), t3_check_fw_version(), and upgrade_fw().
t3_get_tp_version - read the tp sram version @adapter: the adapter @vers: where to place the version
Reads the protocol sram version from sram.
Definition at line 1124 of file cxgb_t3_hw.c.
References A_TP_EMBED_OP_FIELD0, A_TP_EMBED_OP_FIELD1, t3_read_reg(), t3_wait_op_done(), and t3_write_reg().
Referenced by t3_check_tpsram_version().
void t3_get_tx_sched | ( | adapter_t * | adap, |
unsigned int | sched, | ||
unsigned int * | kbps, | ||
unsigned int * | ipg | ||
) |
t3_get_tx_sched - get the configuration of a Tx HW traffic scheduler @adap: the adapter @sched: the scheduler index @kbps: the byte rate in Kbps @ipg: the interpacket delay in tenths of nanoseconds
Return the current configuration of a HW Tx scheduler.
Definition at line 3766 of file cxgb_t3_hw.c.
References A_TP_TM_PIO_ADDR, A_TP_TM_PIO_DATA, A_TP_TX_MOD_Q1_Q0_RATE_LIMIT, A_TP_TX_MOD_Q1_Q0_TIMER_SEPARATOR, vpd_params::cclk, core_ticks_per_usec(), adapter::params, t3_read_reg(), t3_write_reg(), and adapter_params::vpd.
Definition at line 4766 of file cxgb_t3_hw.c.
References IOQ_ENTRIES, and t3_cim_hac_read().
Referenced by cxgb_extension_ioctl().
Definition at line 4703 of file cxgb_t3_hw.c.
References LA_CTRL, LA_DATA, LA_ENTRIES, t3_cim_hac_read(), t3_cim_hac_write(), and udelay.
Referenced by cxgb_extension_ioctl().
int t3_get_vpd_len | ( | adapter_t * | adapter, |
struct generic_vpd * | vpd | ||
) |
t3_get_vpd_len - computes the length of a vpd structure @adapter: the adapter @vpd: contains the offset of first byte of vpd
Computes the lentgh of the vpd structure starting at vpd->offset.
Definition at line 808 of file cxgb_t3_hw.c.
References get_desc_len(), is_end_tag(), MAX_VPD_BYTES, and generic_vpd::offset.
Definition at line 208 of file cxgb_t3_hw.c.
References A_I2C_DATA, A_I2C_OP, F_I2C_ACK, F_I2C_BUSY, F_I2C_CONT, F_I2C_READ, G_I2C_DATA, I2C_ATTEMPTS, MDIO_LOCK, MDIO_UNLOCK, t3_read_reg(), t3_wait_op_done_val(), and t3_write_reg().
Definition at line 232 of file cxgb_t3_hw.c.
References A_I2C_DATA, A_I2C_OP, F_I2C_ACK, F_I2C_BUSY, F_I2C_CONT, F_I2C_WRITE, I2C_ATTEMPTS, MDIO_LOCK, MDIO_UNLOCK, t3_wait_op_done_val(), t3_write_reg(), and V_I2C_DATA.
t3_init_hw - initialize and configure T3 HW modules @adapter: the adapter @fw_params: initial parameters to pass to firmware (optional)
Initialize and configure T3 HW modules. This performs the initialization steps that need to be done once after a card is reset. MAC and PHY initialization is handled separarely whenever a port is enabled.
@fw_params are passed to FW and their value is platform dependent. Only the top 8 bits are available for use, the rest must be 0.
Definition at line 4147 of file cxgb_t3_hw.c.
References A_CIM_BOOT_CFG, A_CIM_HOST_ACC_DATA, A_PCIX_CFG, A_PL_RST, A_PM1_RX_CFG, A_PM1_RX_MODE, A_PM1_TX_MODE, A_T3DBG_GPIO_ACT_LOW, A_ULPTX_CONFIG, adap2pinfo(), calc_gpio_intr(), calibrate_xgm(), calibrate_xgm_t3b(), CH_ERR, chan_init_hw(), adapter_params::chan_map, clear_sge_ctxt(), adapter::cm, config_pcie(), F_CFG_CQE_SOP_MASK, F_CLIDECEN, F_CQ, F_DMASTOPEN, F_FATALPERREN, FW_FLASH_BOOT_ADDR, is_pcie(), mac, sge_params::max_pkt_size, MAX_RX_COALESCING_LEN, adapter_params::mc5, adapter::mc5, mc7_init(), vpd_params::mclk, vpd_params::mem_timing, msleep, mc5_params::nfilters, adapter_params::nports, mc5_params::nroutes, mc5_params::nservers, adapter::params, partition_mem(), adapter::pmrx, adapter::pmtx, adapter_params::rev, adapter_params::sge, t3_mac_init(), t3_mc5_init(), t3_read_reg(), T3_REV_C, t3_set_reg_field(), t3_sge_init(), t3_tp_set_coalescing_size(), t3_tp_set_max_rxsize(), t3_write_reg(), adapter_params::tp, tp_init(), vpd_params::uclk, ulp_config(), V_BOOTADDR, and adapter_params::vpd.
Referenced by cxgb_up().
void t3_intr_clear | ( | adapter_t * | adapter | ) |
t3_intr_clear - clear all interrupts @adapter: the adapter whose interrupts should be cleared
Clears all interrupts.
Definition at line 2384 of file cxgb_t3_hw.c.
References A_CIM_HOST_INT_CAUSE, A_CPL_INTR_CAUSE, A_MC5_DB_INT_CAUSE, A_MC7_INT_CAUSE, A_MPS_INT_CAUSE, A_PCIE_PEX_ERR, A_PCIX_INT_CAUSE, A_PL_INT_CAUSE0, A_PM1_RX_INT_CAUSE, A_PM1_TX_INT_CAUSE, A_SG_INT_CAUSE, A_SG_RSPQ_FL_STATUS, A_T3DBG_INT_CAUSE, A_TP_INT_CAUSE, A_ULPRX_INT_CAUSE, A_ULPTX_INT_CAUSE, ARRAY_SIZE, for_each_port, is_pcie(), MC7_CM_BASE_ADDR, MC7_PMRX_BASE_ADDR, MC7_PMTX_BASE_ADDR, t3_port_intr_clear(), t3_read_reg(), and t3_write_reg().
Referenced by cxgb_controller_attach(), and cxgb_up().
void t3_intr_disable | ( | adapter_t * | adapter | ) |
t3_intr_disable - disable a card's interrupts @adapter: the adapter whose interrupts should be disabled
Disable interrupts. We only disable the top-level interrupt concentrator and the SGE data interrupts.
Definition at line 2371 of file cxgb_t3_hw.c.
References A_PL_INT_ENABLE0, adapter::slow_intr_mask, t3_read_reg(), and t3_write_reg().
Referenced by cxgb_down(), and t3_fatal_err().
void t3_intr_enable | ( | adapter_t * | adapter | ) |
t3_intr_enable - enable interrupts @adapter: the adapter whose interrupts should be enabled
Enable interrupts by setting the interrupt enable registers of the various HW modules and then enabling the top-level interrupt concentrator.
Definition at line 2320 of file cxgb_t3_hw.c.
References A_CIM_HOST_INT_ENABLE, A_CPL_INTR_ENABLE, A_MC5_DB_INT_ENABLE, A_MC7_INT_ENABLE, A_MPS_INT_ENABLE, A_PCIE_INT_ENABLE, A_PCIX_INT_ENABLE, A_PL_INT_ENABLE0, A_PM1_RX_INT_ENABLE, A_PM1_TX_INT_ENABLE, A_SG_INT_ENABLE, A_T3DBG_INT_ENABLE, A_TP_INT_ENABLE, A_ULPRX_INT_ENABLE, A_ULPTX_INT_ENABLE, ARRAY_SIZE, calc_gpio_intr(), CIM_INTR_MASK, CPLSW_INTR_MASK, F_CIM_OVFL_ERROR, F_PBL_BOUND_ERR_CH0, F_PBL_BOUND_ERR_CH1, is_pcie(), MC5_INTR_MASK, MC7_CM_BASE_ADDR, MC7_INTR_MASK, MC7_PMRX_BASE_ADDR, MC7_PMTX_BASE_ADDR, MPS_INTR_MASK, adapter::params, PCIE_INTR_MASK, PCIX_INTR_MASK, PL_INTR_MASK, PMRX_INTR_MASK, PMTX_INTR_MASK, adapter_params::rev, SGE_INTR_MASK, adapter::slow_intr_mask, t3_read_reg(), T3_REV_C, t3_write_reg(), t3_write_regs(), ULPRX_INTR_MASK, and ULPTX_INTR_MASK.
Referenced by cxgb_up().
void t3_led_ready | ( | adapter_t * | adapter | ) |
Definition at line 4647 of file cxgb_t3_hw.c.
References A_T3DBG_GPIO_EN, F_GPIO0_OUT_VAL, and t3_set_reg_field().
Referenced by cxgb_controller_attach().
void t3_link_changed | ( | adapter_t * | adapter, |
int | port_id | ||
) |
t3_link_changed - handle interface link changes @adapter: the adapter @port_id: the port index that changed link state
Called when a port's link settings change to propagate the new values to the associated PHY and MAC. After performing the common tasks it invokes an OS-specific handler.
Definition at line 1522 of file cxgb_t3_hw.c.
References A_XGM_INT_ENABLE, A_XGM_RX_CTRL, A_XGM_STAT_CTRL, A_XGM_TX_CTRL, A_XGM_TXFIFO_CFG, A_XGM_XAUI_ACT_CTRL, adap2pinfo(), link_config::autoneg, AUTONEG_ENABLE, link_config::duplex, DUPLEX_INVALID, F_CLRSTATS, F_ENDROPPKT, F_RXEN, F_TXACTENABLE, F_TXEN, F_XGM_INT, link_config::fc, cphy_ops::get_link_status, LF_MAYBE, LF_NO, LF_YES, port_info::link_config, link_fault, port_info::link_fault, mac_stats::link_faults, link_config::link_ok, mac, port_info::mac, MAC_DIRECTION_RX, MAC_DIRECTION_TX, adapter_params::nports, cmac::offset, cphy::ops, adapter::params, PAUSE_AUTONEG, PAUSE_RX, PAUSE_TX, phy, port_info::phy, PHY_LINK_PARTIAL, PHY_LINK_UP, port_id, port_info::port_id, link_config::requested_fc, cphy_ops::reset, adapter_params::rev, cphy::rst, link_config::speed, SPEED_INVALID, cmac::stats, t3_clear_faults(), t3_detect_link_fault(), t3_mac_disable(), t3_mac_enable(), t3_mac_set_speed_duplex_fc(), t3_os_link_changed(), T3_REV_C, t3_set_reg_field(), t3_write_reg(), t3_xgm_intr_disable(), t3b_pcs_reset(), t3c_pcs_force_los(), uses_xaui(), and cmac::was_reset.
Referenced by check_link_status().
int t3_link_start | ( | struct cphy * | phy, |
struct cmac * | mac, | ||
struct link_config * | lc | ||
) |
t3_link_start - apply link configuration to MAC/PHY @phy: the PHY to setup @mac: the MAC to setup @lc: the requested link configuration
Set up a port's MAC and PHY according to a desired link configuration.
Definition at line 1674 of file cxgb_t3_hw.c.
References cphy::adapter, cphy_ops::advertise, ADVERTISED_Asym_Pause, ADVERTISED_Pause, link_config::advertising, link_config::autoneg, AUTONEG_DISABLE, cphy_ops::autoneg_enable, link_config::duplex, link_config::fc, is_10G(), link_config::link_ok, mac, cphy::ops, PAUSE_RX, PAUSE_TX, phy, cphy_ops::power_down, link_config::requested_duplex, link_config::requested_fc, link_config::requested_speed, cphy_ops::reset, cphy_ops::set_speed_duplex, link_config::speed, link_config::supported, SUPPORTED_Autoneg, and t3_mac_set_speed_duplex_fc().
Referenced by check_t3b2_mac(), and cxgb_init_locked().
Definition at line 1361 of file cxgb_t3_hw.c.
References BOOT_FLASH_BOOT_ADDR, BOOT_MAX_SIZE, BOOT_SIGNATURE, BOOT_SIZE_INC, CH_ERR, le16_to_cpu, boot_header_s::length, boot_header_s::signature, t3_flash_erase_sectors(), and t3_write_flash().
Referenced by cxgb_extension_ioctl().
Definition at line 1297 of file cxgb_t3_hw.c.
References CH_ERR, FW_FLASH_BOOT_ADDR, FW_MAX_SIZE, FW_MAX_SIZE_PRE8, FW_MIN_SIZE, FW_VERS_ADDR, FW_VERS_ADDR_PRE8, G_FW_VERSION_MAJOR, t3_flash_erase_sectors(), and t3_write_flash().
Referenced by cxgb_extension_ioctl(), and upgrade_fw().
void t3_load_mtus | ( | adapter_t * | adap, |
unsigned short | mtus[NMTUS], | ||
unsigned short | alpha[NCCTRL_WIN], | ||
unsigned short | beta[NCCTRL_WIN], | ||
unsigned short | mtu_cap | ||
) |
t3_load_mtus - write the MTU and congestion control HW tables @adap: the adapter @mtus: the unrestricted values for the MTU table @alpha: the values for the congestion control alpha parameter @beta: the values for the congestion control beta parameter @mtu_cap: the maximum permitted effective MTU
Write the MTU table with the supplied MTUs capping each at &mtu_cap. Update the high-speed congestion control table with the supplied alpha, beta, and MTUs.
Definition at line 3422 of file cxgb_t3_hw.c.
References A_TP_CCTRL_TABLE, A_TP_MTU_TABLE, CC_MIN_INCR, NCCTRL_WIN, NMTUS, and t3_write_reg().
int t3_mac_disable | ( | struct cmac * | mac, |
int | which | ||
) |
t3_mac_disable - disable the MAC in the given directions @mac: the MAC to configure @which: bitmap indicating which directions to disable
Disables the MAC in the given directions. MAC_DIRECTION_TX disables the Tx direction, and MAC_DIRECTION_RX disables the Rx one.
Definition at line 700 of file cxgb_xgmac.c.
References A_XGM_RESET_CTRL, A_XGM_RX_CTRL, A_XGM_TX_CTRL, cmac::adapter, cmac::ext_port, F_PCS_RESET_, mac, MAC_DIRECTION_RX, MAC_DIRECTION_TX, msleep, cmac::multiport, cmac::offset, t3_set_reg_field(), t3_vsc7323_disable(), t3_write_reg(), cmac::txen, and xgm_reset_ctrl().
Referenced by cxgb_uninit_synchronized(), and t3_link_changed().
void t3_mac_disable_exact_filters | ( | struct cmac * | mac | ) |
Definition at line 367 of file cxgb_xgmac.c.
References A_XGM_RX_EXACT_MATCH_LOW_1, cmac::adapter, EXACT_ADDR_FILTERS, mac, cmac::offset, t3_read_reg(), and t3_write_reg().
Referenced by t3_gate_rx_traffic(), and t3_mac_set_mtu().
int t3_mac_enable | ( | struct cmac * | mac, |
int | which | ||
) |
t3_mac_enable - enable the MAC in the given directions @mac: the MAC to configure @which: bitmap indicating which directions to enable
Enables the MAC for operation in the given directions. MAC_DIRECTION_TX enables the Tx direction, and MAC_DIRECTION_RX enables the Rx one.
Definition at line 648 of file cxgb_xgmac.c.
References A_TP_PIO_ADDR, A_TP_PIO_DATA, A_TP_TX_DROP_CFG_CH0, A_TP_TX_DROP_CNT_CH0, A_TP_TX_DROP_MODE, A_XGM_RX_CTRL, A_XGM_RX_SPI4_SOP_EOP_CNT, A_XGM_TX_CTRL, A_XGM_TX_SPI4_SOP_EOP_CNT, cmac::adapter, cmac::ext_port, F_RXEN, F_TXEN, G_TXDROPCNTCH0RCVD, G_TXSPI4SOPCNT, mac, MAC_DIRECTION_RX, MAC_DIRECTION_TX, macidx(), cmac::multiport, cmac::offset, adapter::params, adapter_params::rev, mac_stats::rx_fifo_ovfl, mac_stats::rx_frames, cmac::rx_mcnt, cmac::rx_ocnt, mac_stats::rx_pause, cmac::rx_pause, cmac::rx_xcnt, cmac::stats, t3_read_reg(), T3_REV_C, t3_set_reg_field(), t3_vsc7323_enable(), t3_write_reg(), cmac::toggle_cnt, mac_stats::tx_frames, cmac::tx_mcnt, cmac::tx_tcnt, cmac::tx_xcnt, and cmac::txen.
Referenced by check_t3b2_mac(), cxgb_init_locked(), and t3_link_changed().
void t3_mac_enable_exact_filters | ( | struct cmac * | mac | ) |
Definition at line 378 of file cxgb_xgmac.c.
References A_XGM_RX_EXACT_MATCH_HIGH_1, A_XGM_RX_EXACT_MATCH_LOW_1, cmac::adapter, EXACT_ADDR_FILTERS, mac, cmac::offset, t3_read_reg(), and t3_write_reg().
Referenced by t3_mac_set_mtu(), and t3_open_rx_traffic().
int t3_mac_init | ( | struct cmac * | mac | ) |
t3_mac_init - initialize a MAC @mac: the MAC to initialize
Initialize the given MAC.
Definition at line 141 of file cxgb_xgmac.c.
References A_XGM_RESET_CTRL, A_XGM_RX_CFG, A_XGM_RX_CTRL, A_XGM_RX_EXACT_MATCH_LOW_1, A_XGM_RX_EXACT_MATCH_LOW_2, A_XGM_RX_EXACT_MATCH_LOW_3, A_XGM_RX_EXACT_MATCH_LOW_4, A_XGM_RX_EXACT_MATCH_LOW_5, A_XGM_RX_EXACT_MATCH_LOW_6, A_XGM_RX_EXACT_MATCH_LOW_7, A_XGM_RX_EXACT_MATCH_LOW_8, A_XGM_RX_HASH_HIGH, A_XGM_RX_HASH_LOW, A_XGM_RX_MAX_PKT_SIZE, A_XGM_RXFIFO_CFG, A_XGM_SERDES_CTRL, A_XGM_SERDES_STATUS1, A_XGM_STAT_CTRL, A_XGM_TX_CTRL, A_XGM_TXFIFO_CFG, cmac::adapter, ARRAY_SIZE, CH_ERR, F_CLRSTATS, F_CMULOCK, F_COPYPREAMBLE, F_DISERRFRAMES, F_DISPAUSEFRAMES, F_DISPREAMBLE, F_EN1536BFRAMES, F_ENHASHMCAST, F_ENJUMBO, F_ENNON802_3PREAMBLE, F_MAC_RESET_, F_PCS_RESET_, F_RMFCS, F_RXEN, F_RXENABLE, F_RXENFRAMER, F_RXSTRFRWRD, F_SERDESRESET_, F_TXEN, F_TXENABLE, F_UNDERUNFIX, M_RXMAXFRAMERSIZE, M_TXFIFOTHRESH, mac, macidx(), MAX_FRAME_SIZE, msleep, cmac::multiport, cmac::offset, adapter::params, adapter_params::rev, cmac::stats, t3_read_reg(), t3_set_reg_field(), t3_wait_op_done(), t3_write_reg(), t3_write_regs(), t3b_pcs_reset(), uses_xaui(), V_RXMAXFRAMERSIZE, V_RXMAXPKTSIZE, V_TXFIFOTHRESH, addr_val_pair::val, xaui_serdes_reset(), and xgm_reset_ctrl().
Referenced by cxgb_init_locked(), t3_init_hw(), and t3_mac_reset().
t3_mac_set_address - set one of the station's unicast MAC addresses @mac: the MAC handle @idx: index of the exact address match filter to use @addr: the Ethernet address
Set one of the station's unicast MAC addresses.
Definition at line 335 of file cxgb_xgmac.c.
References cmac::adapter, cmac::ext_port, mac, cmac::multiport, adapter_params::nports, cmac::nucast, adapter::params, set_addr_filter(), and t3_vsc7323_set_addr().
Referenced by cxgb_update_mac_settings().
int t3_mac_set_mtu | ( | struct cmac * | mac, |
unsigned int | mtu | ||
) |
t3_mac_set_mtu - set the MAC MTU @mac: the MAC to configure @mtu: the MTU
Sets the MAC MTU and adjusts the FIFO PAUSE watermarks accordingly.
Definition at line 475 of file cxgb_xgmac.c.
References A_XGM_RX_CFG, A_XGM_RX_CTRL, A_XGM_RX_MAX_PKT_SIZE, A_XGM_RX_MAX_PKT_SIZE_ERR_CNT, A_XGM_RXFIFO_CFG, A_XGM_TXFIFO_CFG, cmac::adapter, vpd_params::cclk, cmac::ext_port, F_COPYALLFRAMES, F_DISBCAST, F_ENHASHMCAST, F_RXEN, F_RXFIFO_EMPTY, G_RXFIFOPAUSEHWM, is_10G(), M_RXFIFOPAUSEHWM, M_RXFIFOPAUSELWM, M_RXMAXPKTSIZE, M_TXFIFOTHRESH, M_TXIPG, mac, MAC_RXFIFO_SIZE, macidx(), MAX_FRAME_SIZE, cmac::multiport, cmac::offset, adapter::params, vpd_params::port_type, port_type, adapter_params::rev, rx_fifo_hwm(), t3_mac_disable_exact_filters(), t3_mac_enable_exact_filters(), t3_read_reg(), T3_REV_B2, T3_REV_C, t3_set_reg_field(), t3_vsc7323_set_mtu(), t3_vsc8211_fifo_depth(), t3_wait_op_done(), t3_write_reg(), V_RXFIFOPAUSEHWM, V_RXFIFOPAUSELWM, V_RXMAXPKTSIZE, V_TXFIFOTHRESH, V_TXIPG, and adapter_params::vpd.
Referenced by cxgb_update_mac_settings().
int t3_mac_set_num_ucast | ( | struct cmac * | mac, |
unsigned char | n | ||
) |
t3_mac_set_num_ucast - set the number of unicast addresses needed @mac: the MAC handle
: number of unicast addresses needed
Specify the number of exact address filters that should be reserved for unicast addresses. Caller should reload the unicast and multicast addresses after calling this.
Generally, this is 1 with the first one used for the station address, and the rest are available for multicast addresses.
Definition at line 359 of file cxgb_xgmac.c.
References EXACT_ADDR_FILTERS, mac, and cmac::nucast.
int t3_mac_set_rx_mode | ( | struct cmac * | mac, |
struct t3_rx_mode * | rm | ||
) |
Definition at line 434 of file cxgb_xgmac.c.
References A_XGM_RX_CFG, A_XGM_RX_HASH_HIGH, A_XGM_RX_HASH_LOW, cmac::adapter, allmulti_rx_mode, cmac::ext_port, F_COPYALLFRAMES, t3_mcaddr_ctx::hash_hi, t3_mcaddr_ctx::hash_lo, port_info::ifp, t3_mcaddr_ctx::mac, mac, cmac::multiport, cmac::offset, t3_rx_mode::port, cmac::promisc_map, promisc_rx_mode, t3_hash_maddr(), t3_set_reg_field(), and t3_write_reg().
Referenced by cxgb_update_mac_settings().
int t3_mac_set_speed_duplex_fc | ( | struct cmac * | mac, |
int | speed, | ||
int | duplex, | ||
int | fc | ||
) |
t3_mac_set_speed_duplex_fc - set MAC speed, duplex and flow control @mac: the MAC to configure @speed: the desired speed (10/100/1000/10000) @duplex: the desired duplex @fc: desired Tx/Rx PAUSE configuration
Set the MAC speed, duplex (actually only full-duplex is supported), and flow control. If a parameter value is negative the corresponding MAC setting is left at its current value.
Definition at line 570 of file cxgb_xgmac.c.
References A_XGM_PAUSE_TIMER, A_XGM_PORT_CFG, A_XGM_RX_MAX_PKT_SIZE, A_XGM_RXFIFO_CFG, A_XGM_TX_CFG, A_XGM_TX_PAUSE_QUANTA, cmac::adapter, DUPLEX_FULL, cmac::ext_port, F_TXPAUSEEN, G_RXMAXPKTSIZE, M_PORTSPEED, M_RXFIFOPAUSEHWM, mac, MAC_RXFIFO_SIZE, cmac::multiport, cmac::offset, adapter::params, PAUSE_RX, PAUSE_TX, adapter_params::rev, rx_fifo_hwm(), SPEED_10, SPEED_100, SPEED_1000, SPEED_10000, t3_mac_reset(), t3_read_reg(), T3_REV_C, t3_set_reg_field(), t3_vsc7323_set_speed_fc(), t3_write_reg(), uses_xaui(), V_PORTSPEED, V_RXFIFOPAUSEHWM, and cmac::was_reset.
Referenced by t3_link_changed(), and t3_link_start().
t3_mac_update_stats - accumulate MAC statistics @mac: the MAC handle
This function is called periodically to accumulate the current values of the RMON counters into the port statistics. Since the packet counters are only 32 bits they can overflow in ~286 secs at 10G, so the function should be called more frequently than that. The byte counters are 45-bit wide, they would overflow in ~7.8 hours.
Definition at line 800 of file cxgb_xgmac.c.
References A_TP_MIB_INDEX, A_TP_MIB_RDATA, A_XGM_RX_MAX_PKT_SIZE_ERR_CNT, cmac::adapter, mac, cmac::multiport, cmac::offset, adapter::params, adapter_params::rev, RMON_READ, RMON_UPDATE, RMON_UPDATE64, mac_stats::rx_bcast_frames, mac_stats::rx_cong_drops, mac_stats::rx_fcs_errs, mac_stats::rx_frames, mac_stats::rx_frames_1024_1518, mac_stats::rx_frames_128_255, mac_stats::rx_frames_1519_max, mac_stats::rx_frames_256_511, mac_stats::rx_frames_512_1023, mac_stats::rx_frames_64, mac_stats::rx_frames_65_127, mac_stats::rx_jabber, mac_stats::rx_mcast_frames, mac_stats::rx_octets, mac_stats::rx_pause, mac_stats::rx_short, mac_stats::rx_symbol_errs, mac_stats::rx_too_long, cmac::stats, t3_read_reg(), T3_REV_B2, t3_vsc7323_update_stats(), t3_write_reg(), mac_stats::tx_bcast_frames, mac_stats::tx_frames, mac_stats::tx_frames_1024_1518, mac_stats::tx_frames_128_255, mac_stats::tx_frames_1519_max, mac_stats::tx_frames_256_511, mac_stats::tx_frames_512_1023, mac_stats::tx_frames_64, mac_stats::tx_frames_65_127, mac_stats::tx_mcast_frames, mac_stats::tx_octets, mac_stats::tx_pause, and mac_stats::tx_underrun.
Referenced by cxgb_extension_ioctl(), and cxgb_refresh_stats().
int t3_mc5_init | ( | struct mc5 * | mc5, |
unsigned int | nservers, | ||
unsigned int | nfilters, | ||
unsigned int | nroutes | ||
) |
t3_mc5_init - initialize MC5 and the TCAM @mc5: the MC5 handle @nservers: desired number the TCP servers (listening ports) @nfilters: desired number of HW filters (classifiers) @nroutes: desired number of routes
Initialize MC5 and the TCAM and partition the TCAM for the requested number of servers, filters, and routes. The number of routes is typically 0 except for specialized uses of the T3 adapters.
Definition at line 329 of file cxgb_mc5.c.
References A_MC5_DB_CONFIG, A_MC5_DB_DBGI_REQ_ADDR1, A_MC5_DB_DBGI_REQ_ADDR2, A_MC5_DB_FILTER_TABLE, A_MC5_DB_ROUTING_TABLE_INDEX, A_MC5_DB_SERVER_INDEX, mc5::adapter, CH_ERR, F_COMPEN, F_TMMODE, F_TMRDY, F_TMRST, IDT75N43102, IDT75P52100, init_idt43102(), init_idt52100(), MAX_ROUTES, mc5_dbgi_mode_disable(), mc5_dbgi_mode_enable(), MC5_MODE_72_BIT, mc5::mode, mc5::parity_enabled, mc5::part_type, t3_set_reg_field(), t3_wait_op_done(), t3_write_reg(), mc5::tcam_size, V_COMPEN, and V_TMMODE.
Referenced by t3_init_hw().
void t3_mc5_intr_handler | ( | struct mc5 * | mc5 | ) |
t3_mc5_intr_handler - MC5 interrupt handler @mc5: the MC5 handle
The MC5 interrupt handler.
Definition at line 430 of file cxgb_mc5.c.
References A_MC5_DB_INT_CAUSE, mc5_stats::active_rgn_full, mc5::adapter, CH_ALERT, mc5_stats::del_act_empty, mc5_stats::dispq_parity_err, F_ACTRGNFULL, F_DELACTEMPTY, F_DISPQPARERR, F_NFASRCHFAIL, F_PARITYERR, F_REQQPARERR, F_UNKNOWNCMD, MC5_INT_FATAL, mc5_stats::nfa_srch_err, mc5::parity_enabled, mc5_stats::parity_err, mc5_stats::reqq_parity_err, mc5::stats, t3_fatal_err(), t3_read_reg(), t3_write_reg(), and mc5_stats::unknown_cmd.
Referenced by t3_slow_intr_handler().
t3_mc5_prep - initialize the SW state for MC5 @adapter: the adapter @mc5: the MC5 handle @mode: whether the TCAM will be in 72- or 144-bit mode
Initialize the SW state associated with MC5. Among other things this determines the size of the attached TCAM.
Definition at line 473 of file cxgb_mc5.c.
References A_MC5_DB_CONFIG, mc5::adapter, adapter, F_TMTYPEHI, G_TMPARTSIZE, G_TMTYPE, K, MC5_MODE_144_BIT, mc5::mode, mc5::parity_enabled, mc5::part_type, t3_read_reg(), and mc5::tcam_size.
Referenced by t3_prep_adapter().
|
inlinestatic |
Definition at line 456 of file cxgb_common.h.
References mc5::tcam_size.
Referenced by cxgb_up(), partition_mem(), and set_filter().
t3_mc7_bd_read - read from MC7 through backdoor accesses @mc7: identifies MC7 to read from @start: index of first 64-bit word to read
: number of 64-bit words to read @buf: where to store the read result
Read n 64-bit words from MC7 starting at word start, using backdoor accesses.
Definition at line 144 of file cxgb_t3_hw.c.
References A_MC7_BD_ADDR, A_MC7_BD_DATA0, A_MC7_BD_DATA1, A_MC7_BD_OP, mc7::adapter, F_BUSY, mc7::offset, mc7::size, t3_read_reg(), t3_write_reg(), and mc7::width.
Referenced by cxgb_extension_ioctl().
|
inlinestatic |
Definition at line 470 of file cxgb_common.h.
References mc7::size.
Referenced by t3_prep_adapter().
int t3_mdio_change_bits | ( | struct cphy * | phy, |
int | mmd, | ||
int | reg, | ||
unsigned int | clear, | ||
unsigned int | set | ||
) |
t3_mdio_change_bits - modify the value of a PHY register @phy: the PHY to operate on @mmd: the device address @reg: the register address @clear: what part of the register value to mask off @set: what part of the register value to set
Changes the value of a PHY register by applying a mask to its current value and ORing the result with a new value.
Definition at line 372 of file cxgb_t3_hw.c.
References mdio_read(), mdio_write(), and phy.
Referenced by ael1002_power_down(), ael1002_reset(), ael1006_reset(), aq100x_advertise(), aq100x_autoneg_enable(), aq100x_power_down(), aq100x_set_loopback(), aq100x_set_speed_duplex(), mv88e1xxx_autoneg_enable(), mv88e1xxx_autoneg_restart(), mv88e1xxx_crossover_set(), mv88e1xxx_downshift_set(), mv88e1xxx_power_down(), mv88e1xxx_set_loopback(), set_phy_regs(), t3_ael2005_phy_prep(), t3_phy_reset(), tn1010_autoneg_enable(), tn1010_autoneg_restart(), tn1010_power_down(), vsc8211_autoneg_enable(), vsc8211_autoneg_restart(), and vsc8211_power_down().
int t3_mi1_read | ( | adapter_t * | adapter, |
int | phy_addr, | ||
int | mmd_addr, | ||
int | reg_addr, | ||
unsigned int * | valp | ||
) |
Definition at line 264 of file cxgb_t3_hw.c.
References A_MI1_ADDR, A_MI1_CFG, A_MI1_DATA, A_MI1_OP, F_BUSY, M_ST, MDIO_ATTEMPTS, MDIO_LOCK, MDIO_UNLOCK, t3_read_reg(), t3_set_reg_field(), t3_wait_op_done(), t3_write_reg(), V_MDI_OP, V_PHYADDR, V_REGADDR, and V_ST.
int t3_mi1_write | ( | adapter_t * | adapter, |
int | phy_addr, | ||
int | mmd_addr, | ||
int | reg_addr, | ||
unsigned int | val | ||
) |
Definition at line 284 of file cxgb_t3_hw.c.
References A_MI1_ADDR, A_MI1_CFG, A_MI1_DATA, A_MI1_OP, F_BUSY, M_ST, MDIO_ATTEMPTS, MDIO_LOCK, MDIO_UNLOCK, t3_set_reg_field(), t3_wait_op_done(), t3_write_reg(), V_MDI_OP, V_PHYADDR, V_REGADDR, and V_ST.
int t3_mps_set_active_ports | ( | adapter_t * | adap, |
unsigned int | port_mask | ||
) |
t3_mps_set_active_ports - configure port failover @adap: the adapter @port_mask: bitmap of active ports
Sets the active ports according to the supplied bitmap.
Definition at line 3832 of file cxgb_t3_hw.c.
References A_MPS_CFG, F_PORT0ACTIVE, F_PORT1ACTIVE, adapter_params::nports, adapter::params, S_PORT0ACTIVE, and t3_set_reg_field().
Definition at line 299 of file cxgb_mv88e1xxx.c.
References port_info::adapter, cphy_init(), mdio_write(), mv88e1xxx_downshift_set(), MV88E1XXX_EXTENDED_ADDR, MV88E1XXX_EXTENDED_DATA, mv88e1xxx_ops, phy, port_info::phy, cphy::pinfo, SUPPORTED_1000baseT_Full, SUPPORTED_100baseT_Full, SUPPORTED_10baseT_Full, SUPPORTED_Autoneg, SUPPORTED_IRQ, SUPPORTED_MII, and SUPPORTED_TP.
int t3_phy_advertise | ( | struct cphy * | phy, |
unsigned int | advert | ||
) |
t3_phy_advertise - set the PHY advertisement registers for autoneg @phy: the PHY to operate on @advert: bitmap of capabilities the PHY should advertise
Sets a 10/100/1000 PHY's advertisement registers to advertise the requested capabilities.
Definition at line 425 of file cxgb_t3_hw.c.
References ADVERTISE_1000FULL, ADVERTISE_1000HALF, ADVERTISE_100FULL, ADVERTISE_100HALF, ADVERTISE_10FULL, ADVERTISE_10HALF, ADVERTISE_PAUSE_ASYM, ADVERTISE_PAUSE_CAP, ADVERTISED_1000baseT_Full, ADVERTISED_1000baseT_Half, ADVERTISED_100baseT_Full, ADVERTISED_100baseT_Half, ADVERTISED_10baseT_Full, ADVERTISED_10baseT_Half, ADVERTISED_Asym_Pause, ADVERTISED_Pause, mdio_read(), mdio_write(), MII_ADVERTISE, MII_CTRL1000, and phy.
int t3_phy_advertise_fiber | ( | struct cphy * | phy, |
unsigned int | advert | ||
) |
t3_phy_advertise_fiber - set fiber PHY advertisement register @phy: the PHY to operate on @advert: bitmap of capabilities the PHY should advertise
Sets a fiber PHY's advertisement register to advertise the requested capabilities.
Definition at line 468 of file cxgb_t3_hw.c.
References ADVERTISE_1000XFULL, ADVERTISE_1000XHALF, ADVERTISE_1000XPAUSE, ADVERTISE_1000XPSE_ASYM, ADVERTISED_1000baseT_Full, ADVERTISED_1000baseT_Half, ADVERTISED_Asym_Pause, ADVERTISED_Pause, mdio_write(), MII_ADVERTISE, and phy.
int t3_phy_lasi_intr_clear | ( | struct cphy * | phy | ) |
Definition at line 528 of file cxgb_t3_hw.c.
References LASI_STAT, MDIO_DEV_PMA_PMD, mdio_read(), and phy.
Referenced by ael2005_intr_clear(), and ael2020_intr_clear().
int t3_phy_lasi_intr_disable | ( | struct cphy * | phy | ) |
Definition at line 523 of file cxgb_t3_hw.c.
References LASI_CTRL, MDIO_DEV_PMA_PMD, mdio_write(), and phy.
Referenced by ael2005_intr_disable(), and ael2020_intr_disable().
int t3_phy_lasi_intr_enable | ( | struct cphy * | phy | ) |
Definition at line 518 of file cxgb_t3_hw.c.
References LASI_CTRL, MDIO_DEV_PMA_PMD, mdio_write(), and phy.
Referenced by ael2005_intr_enable(), and ael2020_intr_enable().
int t3_phy_lasi_intr_handler | ( | struct cphy * | phy | ) |
Definition at line 535 of file cxgb_t3_hw.c.
References cphy_cause_link_change, LASI_STAT, MDIO_DEV_PMA_PMD, mdio_read(), and phy.
Referenced by ael2005_intr_handler(), and ael2020_intr_handler().
int t3_phy_reset | ( | struct cphy * | phy, |
int | mmd, | ||
int | wait | ||
) |
t3_phy_reset - reset a PHY block @phy: the PHY to operate on @mmd: the device address of the PHY block to reset @wait: how long to wait for the reset to complete in 1ms increments
Resets a PHY block and optionally waits for the reset to complete. @mmd should be 0 for 10/100/1000 PHYs and the device address to reset for 10G PHYs.
Definition at line 396 of file cxgb_t3_hw.c.
References mdio_read(), msleep, phy, and t3_mdio_change_bits().
Referenced by ael1006_reset(), ael2005_reset(), ael2020_reset(), aq100x_reset(), mv88e1xxx_reset(), tn1010_reset(), and vsc8211_reset().
void t3_port_failover | ( | adapter_t * | adapter, |
int | port | ||
) |
Definition at line 4653 of file cxgb_t3_hw.c.
References A_MPS_CFG, F_PORT0ACTIVE, F_PORT1ACTIVE, and t3_set_reg_field().
void t3_port_intr_clear | ( | adapter_t * | adapter, |
int | idx | ||
) |
t3_port_intr_clear - clear port-specific interrupts @adapter: associated adapter @idx: index of port whose interrupts to clear
Clear port-specific (i.e., MAC and PHY) interrupts for the given adapter port.
Definition at line 2475 of file cxgb_t3_hw.c.
References A_XGM_INT_CAUSE, adap2pinfo(), cphy_ops::intr_clear, port_info::mac, cmac::offset, cphy::ops, port_info::phy, and t3_write_reg().
Referenced by t3_intr_clear().
void t3_port_intr_disable | ( | adapter_t * | adapter, |
int | idx | ||
) |
t3_port_intr_disable - disable port-specific interrupts @adapter: associated adapter @idx: index of port whose interrupts should be disabled
Disable port-specific (i.e., MAC and PHY) interrupts for the given adapter port.
Definition at line 2459 of file cxgb_t3_hw.c.
References A_XGM_INT_ENABLE, adap2pinfo(), cphy_ops::intr_disable, port_info::mac, cmac::offset, cphy::ops, port_info::phy, and t3_write_reg().
Referenced by cxgb_uninit_synchronized().
void t3_port_intr_enable | ( | adapter_t * | adapter, |
int | idx | ||
) |
t3_port_intr_enable - enable port-specific interrupts @adapter: associated adapter @idx: index of port whose interrupts should be enabled
Enable port-specific (i.e., MAC and PHY) interrupts for the given adapter port.
Definition at line 2443 of file cxgb_t3_hw.c.
References A_XGM_INT_ENABLE, adap2pinfo(), cphy_ops::intr_enable, port_info::mac, cmac::offset, cphy::ops, port_info::phy, t3_write_reg(), and XGM_INTR_MASK.
Referenced by check_t3b2_mac(), and cxgb_init_locked().
int t3_prep_adapter | ( | adapter_t * | adapter, |
const struct adapter_info * | ai, | ||
int | reset | ||
) |
t3_prep_adapter - prepare SW and HW for operation @adapter: the adapter @ai: contains information about the adapter type and properties
Initialize adapter SW state for the various HW modules, set initial values for some adapter tunables, take PHYs out of reset, and initialize the MDIO interface.
Definition at line 4461 of file cxgb_t3_hw.c.
References A_PL_REV, adapter_params::a_wnd, adap2pinfo(), ARRAY_SIZE, adapter_params::b_wnd, cphy::caps, vpd_params::cclk, adapter_params::chan_map, tp_params::chan_rx_size, tp_params::chan_tx_size, adapter::cm, tp_params::cm_size, tp_params::dack_re, DEFAULT_NSERVERS, early_hw_init(), vpd_params::eth_base, for_each_port, get_pci_mode(), get_vpd_params(), hw_addr, adapter_params::info, init_cong_ctrl(), init_link_config(), init_mtus(), init_parity(), is_10G(), is_offload(), port_info::link_config, adapter_params::linkpoll_period, port_info::mac, mac_prep(), MAC_STATS_ACCUM_SECS, adapter_params::mc5, adapter::mc5, MC5_MODE_144_BIT, MC7_CM_BASE_ADDR, MC7_PMRX_BASE_ADDR, MC7_PMTX_BASE_ADDR, mc7_prep(), vpd_params::mclk, adapter_info::mdio_ops, adapter_params::mtus, tp_params::nchan, mc5_params::nfilters, adapter_params::nports, adapter_info::nports0, adapter_info::nports1, mc5_params::nroutes, mc5_params::nservers, tp_params::ntimer_qs, adapter_params::offload, cphy::ops, adapter::params, adapter_params::pci, PCI_CAP_ID_VPD, port_info::phy, adapter_info::phy_base_addr, port_type_info::phy_prep, pm_num_pages(), adapter::pmrx, tp_params::pmrx_size, adapter::pmtx, tp_params::pmtx_size, vpd_params::port_type, port_type, port_types, cphy_ops::power_down, adapter_params::rev, tp_params::rx_num_pgs, tp_params::rx_pg_size, adapter_params::sge, adapter_params::stats_update_period, SUPPORTED_IRQ, t3_mc5_prep(), t3_mc7_size(), t3_os_find_pci_capability(), t3_os_set_hw_addr(), t3_read_reg(), t3_reset_adapter(), t3_sge_prep(), t3_vsc7323_init(), adapter_params::tp, TP_TMR_RES, tp_params::tre, tp_params::tx_num_pgs, tp_params::tx_pg_size, adapter_params::vpd, pci_params::vpd_cap_addr, and VSC_STATS_ACCUM_SECS.
Referenced by cxgb_controller_attach().
Definition at line 2216 of file cxgb_ael1002.c.
References port_info::adapter, cphy::addr, cphy_init(), MDIO_DEV_PMA_PMD, mdio_read(), phy, port_info::phy, cphy::pinfo, qt2045_ops, SUPPORTED_10000baseT_Full, SUPPORTED_AUI, and SUPPORTED_TP.
void t3_query_trace_filter | ( | adapter_t * | adapter, |
struct trace_params * | tp, | ||
int | filter_index, | ||
int * | inverted, | ||
int * | enabled | ||
) |
t3_query_trace_filter - query a tracing filter @adapter: the adapter @tp: the current trace filter parameters @filter_index: which filter to query @inverted: non-zero if the filter is inverted @enabled: non-zero if the filter is enabled
Returns the current settings of the specified HW tracing filter.
Definition at line 3649 of file cxgb_t3_hw.c.
References A_TP_RX_TRC_KEY0, A_TP_TX_TRC_KEY0, trace_params::dip, trace_params::dip_mask, trace_params::dport, trace_params::dport_mask, trace_params::intf, trace_params::intf_mask, trace_params::proto, trace_params::proto_mask, trace_params::sip, trace_params::sip_mask, trace_params::sport, trace_params::sport_mask, tp_rd_indirect(), trace_params::vlan, and trace_params::vlan_mask.
int t3_read_flash | ( | adapter_t * | adapter, |
unsigned int | addr, | ||
unsigned int | nwords, | ||
u32 * | data, | ||
int | byte_oriented | ||
) |
t3_read_flash - read words from serial flash @adapter: the adapter @addr: the start address for the read @nwords: how many 32-bit words to read @data: where to store the read data @byte_oriented: whether to store data as bytes or as words
Read the specified number of 32-bit words from the serial flash. If @byte_oriented is set the read data is stored as a byte array (i.e., big-endian), otherwise as 32-bit words in the platform's natural endianness.
Definition at line 1037 of file cxgb_t3_hw.c.
References sf1_read(), sf1_write(), SF_RD_DATA_FAST, SF_SIZE, and swab32.
Referenced by t3_get_fw_version(), and t3_write_flash().
void t3_read_hw_mtus | ( | adapter_t * | adap, |
unsigned short | mtus[NMTUS] | ||
) |
t3_read_hw_mtus - returns the values in the HW MTU table @adap: the adapter @mtus: where to store the HW MTU values
Reads the HW MTU table.
Definition at line 3461 of file cxgb_t3_hw.c.
References A_TP_MTU_TABLE, NMTUS, t3_read_reg(), and t3_write_reg().
read_mc5_range - dump a part of the memory managed by MC5 @mc5: the MC5 handle @start: the start address for the dump
: number of 72-bit words to read @buf: result buffer
Read n 72-bit words from MC5 memory from the given start location.
Definition at line 392 of file cxgb_mc5.c.
References A_MC5_DB_DBGI_REQ_ADDR0, mc5::adapter, dbgi_rd_rsp3(), IDT4_CMD_READ, IDT75N43102, IDT75P52100, IDT_CMD_READ, mc5_cmd_write(), mc5_dbgi_mode_disable(), mc5_dbgi_mode_enable(), mc5::part_type, and t3_write_reg().
Referenced by cxgb_extension_ioctl().
void t3_read_pace_tbl | ( | adapter_t * | adap, |
unsigned int | pace_vals[NTX_SCHED] | ||
) |
t3_read_pace_tbl - read the pace table @adap: the adapter @pace_vals: holds the returned values
Returns the values of TP's pace table in nanoseconds.
Definition at line 3516 of file cxgb_t3_hw.c.
References A_TP_PACE_TABLE, dack_ticks_to_usec(), NTX_SCHED, t3_read_reg(), and t3_write_reg().
t3_read_rss - read the contents of the RSS tables @adapter: the adapter @lkup: holds the contents of the RSS lookup table @map: holds the contents of the RSS map table
Reads the contents of the receive packet steering tables.
Definition at line 2992 of file cxgb_t3_hw.c.
References A_TP_RSS_LKP_TABLE, A_TP_RSS_MAP_TABLE, RSS_TABLE_SIZE, t3_read_reg(), and t3_write_reg().
int t3_read_vpd | ( | adapter_t * | adapter, |
struct generic_vpd * | vpd | ||
) |
t3_read_vpd - reads the stream of bytes containing a vpd structure @adapter: the adapter @vpd: contains a buffer that would hold the stream of bytes
Reads the vpd structure starting at vpd->offset into vpd->data, the length of the byte stream to read is vpd->len.
Definition at line 840 of file cxgb_t3_hw.c.
References generic_vpd::data, generic_vpd::len, generic_vpd::offset, and t3_seeprom_read().
int t3_reinit_adapter | ( | adapter_t * | adap | ) |
t3_reinit_adapter - prepare HW for operation again @adapter: the adapter
Put HW in the same state as @t3_prep_adapter without any changes to SW state. This is a cut down version of @t3_prep_adapter intended to be used after events that wipe out HW state but preserve SW state, e.g., EEH. The device must be reset before calling this.
Definition at line 4608 of file cxgb_t3_hw.c.
References adap2pinfo(), cphy::addr, ARRAY_SIZE, early_hw_init(), for_each_port, adapter_params::info, init_parity(), adapter_params::nports, cphy::ops, adapter::params, port_info::phy, port_type_info::phy_prep, vpd_params::port_type, port_type, port_types, cphy_ops::power_down, t3_vsc7323_init(), and adapter_params::vpd.
int t3_reset_adapter | ( | adapter_t * | adapter | ) |
t3_reset_adapter - reset the adapter @adapter: the adapter
Reset the adapter.
Definition at line 4393 of file cxgb_t3_hw.c.
References A_PL_RST, F_CRSTWRM, F_CRSTWRMMODE, is_pcie(), msleep, adapter::params, adapter_params::rev, t3_os_pci_read_config_2(), t3_os_pci_restore_state(), t3_os_pci_save_state(), T3_REV_B2, and t3_write_reg().
Referenced by t3_prep_adapter().
t3_seeprom_read - read a VPD EEPROM location @adapter: adapter to read @addr: EEPROM address @data: where to store the read data
Read a 32-bit word from a location in VPD EEPROM using the card's PCI VPD ROM capability. A zero is written to the flag bit when the address is written to the control register. The hardware device will set the flag to 1 when 4 bytes have been read into the data register.
Definition at line 658 of file cxgb_t3_hw.c.
References CH_ERR, EEPROM_MAX_POLL, EEPROM_STAT_ADDR, EEPROMSIZE, le32_to_cpu, adapter::params, adapter_params::pci, PCI_VPD_ADDR, PCI_VPD_ADDR_F, PCI_VPD_DATA, t3_os_pci_read_config_2(), t3_os_pci_read_config_4(), t3_os_pci_write_config_2(), udelay, and pci_params::vpd_cap_addr.
Referenced by cxgb_extension_ioctl(), get_desc_len(), get_vpd_params(), is_end_tag(), set_eeprom(), t3_read_vpd(), and update_tpeeprom().
int t3_seeprom_wp | ( | adapter_t * | adapter, |
int | enable | ||
) |
t3_seeprom_wp - enable/disable EEPROM write protection @adapter: the adapter @enable: 1 to enable write protection, 0 to disable it
Enables or disables write protection on the serial EEPROM.
Definition at line 723 of file cxgb_t3_hw.c.
References EEPROM_STAT_ADDR, and t3_seeprom_write().
Referenced by set_eeprom().
t3_seeprom_write - write a VPD EEPROM location @adapter: adapter to write @addr: EEPROM address @data: value to write
Write a 32-bit word to a location in VPD EEPROM using the card's PCI VPD ROM capability.
Definition at line 691 of file cxgb_t3_hw.c.
References CH_ERR, cpu_to_le32, EEPROM_MAX_POLL, EEPROM_STAT_ADDR, EEPROMSIZE, msleep, adapter::params, adapter_params::pci, PCI_VPD_ADDR, PCI_VPD_ADDR_F, PCI_VPD_DATA, t3_os_pci_read_config_2(), t3_os_pci_write_config_2(), t3_os_pci_write_config_4(), and pci_params::vpd_cap_addr.
Referenced by set_eeprom(), and t3_seeprom_wp().
void t3_set_pace_tbl | ( | adapter_t * | adap, |
unsigned int * | pace_vals, | ||
unsigned int | start, | ||
unsigned int | n | ||
) |
t3_set_pace_tbl - set the pace table @adap: the adapter @pace_vals: the pace values in nanoseconds @start: index of the first entry in the HW pace table to set
: how many entries to set
Sets (a subset of the) HW pace table.
Definition at line 3535 of file cxgb_t3_hw.c.
References A_TP_PACE_TABLE, dack_ticks_to_usec(), and t3_write_reg().
Referenced by cxgb_extension_ioctl().
int t3_set_phy_speed_duplex | ( | struct cphy * | phy, |
int | speed, | ||
int | duplex | ||
) |
t3_set_phy_speed_duplex - force PHY speed and duplex @phy: the PHY to operate on @speed: requested PHY speed @duplex: requested PHY duplex
Force a 10/100/1000 PHY's speed and duplex. This also disables auto-negotiation except for GigE, where auto-negotiation is mandatory.
Definition at line 492 of file cxgb_t3_hw.c.
References BMCR_ANENABLE, BMCR_FULLDPLX, BMCR_SPEED100, BMCR_SPEED1000, DUPLEX_FULL, mdio_read(), mdio_write(), phy, SPEED_100, and SPEED_1000.
Referenced by mv88e1xxx_set_speed_duplex(), and vsc8211_set_speed_duplex().
t3_set_proto_sram - set the contents of the protocol sram @adapter: the adapter @data: the protocol image
Write the contents of the protocol SRAM.
Definition at line 3578 of file cxgb_t3_hw.c.
References A_TP_EMBED_OP_FIELD0, A_TP_EMBED_OP_FIELD1, A_TP_EMBED_OP_FIELD2, A_TP_EMBED_OP_FIELD3, A_TP_EMBED_OP_FIELD4, A_TP_EMBED_OP_FIELD5, cpu_to_be32, PROTO_SRAM_LINES, t3_wait_op_done(), and t3_write_reg().
Referenced by update_tpsram().
t3_set_reg_field - set a register field to a value @adapter: the adapter to program @addr: the register address @mask: specifies the portion of the register to modify @val: the new value for the register field
Sets a register field specified by the supplied mask to the given value.
Definition at line 103 of file cxgb_t3_hw.c.
References t3_read_reg(), and t3_write_reg().
Referenced by ael1006_reset(), ael100x_txon(), aq100x_vendor_intr(), calibrate_xgm(), calibrate_xgm_t3b(), chan_init_hw(), config_pcie(), cxgb_extension_ioctl(), cxgb_uninit_synchronized(), cxgb_up(), mac_intr_handler(), mac_prep(), mc5_dbgi_mode_disable(), mc5_dbgi_mode_enable(), mc7_init(), mi1_ext_read(), mi1_ext_write(), partition_mem(), t3_aq100x_phy_prep(), t3_clear_faults(), t3_disable_filters(), t3_enable_filters(), t3_failover_clear(), t3_failover_done(), t3_gate_rx_traffic(), t3_init_hw(), t3_led_ready(), t3_link_changed(), t3_mac_disable(), t3_mac_enable(), t3_mac_init(), t3_mac_reset(), t3_mac_set_mtu(), t3_mac_set_rx_mode(), t3_mac_set_speed_duplex_fc(), t3_mc5_init(), t3_mi1_read(), t3_mi1_write(), t3_mps_set_active_ports(), t3_open_rx_traffic(), t3_pkt_timestamp(), t3_port_failover(), t3_set_vlan_accel(), t3_sge_start(), t3_sge_stop(), t3_tp_set_offload_mode(), t3b_pcs_reset(), t3c_pcs_force_los(), tp_config(), and xaui_serdes_reset().
int t3_set_sched_ipg | ( | adapter_t * | adap, |
int | sched, | ||
unsigned int | ipg | ||
) |
t3_set_sched_ipg - set the IPG for a Tx HW packet rate scheduler @adap: the adapter @sched: the scheduler index @ipg: the interpacket delay in tenths of nanoseconds
Set the interpacket delay for a HW packet rate scheduler.
Definition at line 3736 of file cxgb_t3_hw.c.
References A_TP_TM_PIO_ADDR, A_TP_TM_PIO_DATA, A_TP_TX_MOD_Q1_Q0_TIMER_SEPARATOR, core_ticks_per_usec(), t3_read_reg(), and t3_write_reg().
Referenced by cxgb_extension_ioctl().
void t3_set_vlan_accel | ( | adapter_t * | adapter, |
unsigned int | ports, | ||
int | on | ||
) |
t3_set_vlan_accel - control HW VLAN extraction @adapter: the adapter @ports: bitmap of adapter ports to operate on @on: enable (1) or disable (0) HW VLAN extraction
Enables or disables HW extraction of VLAN tags for the given port.
Definition at line 1718 of file cxgb_t3_hw.c.
References A_TP_OUT_CONFIG, S_VLANEXTRACTIONENABLE, and t3_set_reg_field().
Referenced by cxgb_update_mac_settings(), and tp_init().
int t3_sge_cqcntxt_op | ( | adapter_t * | adapter, |
unsigned int | id, | ||
unsigned int | op, | ||
unsigned int | credits | ||
) |
t3_sge_cqcntxt_op - perform an operation on a completion queue context @adapter: the adapter @id: the context id @op: the operation to perform @credits: credits to return to the CQ
Perform the selected operation on an SGE completion queue context. The caller is responsible for ensuring only one context operation occurs at a time.
For most operations the function returns the current HW position in the completion queue.
Definition at line 2822 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, F_CONTEXT_CMD_BUSY, F_CQ, G_CQ_INDEX, adapter::params, adapter_params::rev, SG_CONTEXT_CMD_ATTEMPTS, t3_read_reg(), t3_wait_op_done(), t3_wait_op_done_val(), t3_write_reg(), V_CONTEXT, and V_CONTEXT_CMD_OPCODE.
int t3_sge_disable_cqcntxt | ( | adapter_t * | adapter, |
unsigned int | id | ||
) |
t3_sge_disable_cqcntxt - disable an SGE completion queue @adapter: the adapter @id: the completion queue context id
Disable an SGE completion queue. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2792 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_MASK0, A_SG_CONTEXT_MASK1, A_SG_CONTEXT_MASK2, A_SG_CONTEXT_MASK3, F_CONTEXT_CMD_BUSY, F_CQ, M_CQ_SIZE, SG_CONTEXT_CMD_ATTEMPTS, t3_read_reg(), t3_wait_op_done(), t3_write_reg(), V_CONTEXT, V_CONTEXT_CMD_OPCODE, and V_CQ_SIZE.
int t3_sge_disable_fl | ( | adapter_t * | adapter, |
unsigned int | id | ||
) |
t3_sge_disable_fl - disable an SGE free-buffer list @adapter: the adapter @id: the free list context id
Disable an SGE free-buffer list. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2744 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA2, A_SG_CONTEXT_MASK0, A_SG_CONTEXT_MASK1, A_SG_CONTEXT_MASK2, A_SG_CONTEXT_MASK3, F_CONTEXT_CMD_BUSY, F_FREELIST, M_FL_SIZE, SG_CONTEXT_CMD_ATTEMPTS, t3_read_reg(), t3_wait_op_done(), t3_write_reg(), V_CONTEXT, V_CONTEXT_CMD_OPCODE, and V_FL_SIZE.
Referenced by t3_free_qset().
int t3_sge_disable_rspcntxt | ( | adapter_t * | adapter, |
unsigned int | id | ||
) |
t3_sge_disable_rspcntxt - disable an SGE response queue @adapter: the adapter @id: the response queue context id
Disable an SGE response queue. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2768 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_MASK0, A_SG_CONTEXT_MASK1, A_SG_CONTEXT_MASK2, A_SG_CONTEXT_MASK3, F_CONTEXT_CMD_BUSY, F_RESPONSEQ, M_CQ_SIZE, SG_CONTEXT_CMD_ATTEMPTS, t3_read_reg(), t3_wait_op_done(), t3_write_reg(), V_CONTEXT, V_CONTEXT_CMD_OPCODE, and V_CQ_SIZE.
Referenced by t3_free_qset().
int t3_sge_enable_ecntxt | ( | adapter_t * | adapter, |
unsigned int | id, | ||
int | enable | ||
) |
t3_sge_enable_ecntxt - enable/disable an SGE egress context @adapter: the adapter @id: the egress context id @enable: enable (1) or disable (0) the context
Enable or disable an SGE egress context. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2720 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA3, A_SG_CONTEXT_MASK0, A_SG_CONTEXT_MASK1, A_SG_CONTEXT_MASK2, A_SG_CONTEXT_MASK3, F_CONTEXT_CMD_BUSY, F_EC_VALID, F_EGRESS, SG_CONTEXT_CMD_ATTEMPTS, t3_read_reg(), t3_wait_op_done(), t3_write_reg(), V_CONTEXT, V_CONTEXT_CMD_OPCODE, and V_EC_VALID.
Referenced by t3_free_qset().
void t3_sge_init | ( | adapter_t * | adap, |
struct sge_params * | p | ||
) |
t3_sge_init - initialize SGE @adap: the adapter : the SGE parameters
Performs SGE initialization needed every time after a chip reset. We do not initialize any of the queue sets here, instead the driver top-level must request those individually. We also do not enable DMA here, that should be done after the queues have been set up.
Definition at line 430 of file cxgb_sge.c.
References A_SG_CMDQ_CREDIT_TH, A_SG_CONTROL, A_SG_DRB_PRI_THRESH, A_SG_EGR_RCQ_DRB_THRSH, A_SG_HI_DRB_HI_THRSH, A_SG_HI_DRB_LO_THRSH, A_SG_LO_DRB_HI_THRSH, A_SG_LO_DRB_LO_THRSH, A_SG_OCO_BASE, A_SG_TIMER_TICK, core_ticks_per_usec(), F_AVOIDCQOVFL, F_BIGENDIANINGRESS, F_CONGMODE, F_CQCRDTCTRL, F_DROPPKT, F_EGRGENCTRL, F_FATLPERREN, F_FLMODE, F_ISCSICOALESCING, F_ONEINTMULTQ, F_OPTONEINTMULTQ, F_TNLFLMODE, adapter::flags, adapter::params, adapter_params::rev, T3_REV_C, t3_write_reg(), USING_MSI, USING_MSIX, V_BASE1, V_HIRCQDRBTHRSH, V_HOSTPAGESIZE, V_LORCQDRBTHRSH, V_PKTSHIFT, V_THRESHOLD, V_TIMEOUT, and V_USERSPACESIZE.
Referenced by t3_init_hw().
int t3_sge_init_cqcntxt | ( | adapter_t * | adapter, |
unsigned int | id, | ||
u64 | base_addr, | ||
unsigned int | size, | ||
int | rspq, | ||
int | ovfl_mode, | ||
unsigned int | credits, | ||
unsigned int | credit_thres | ||
) |
t3_sge_init_cqcntxt - initialize an SGE completion queue context @adapter: the adapter to configure @id: the context id @base_addr: base address of queue @size: number of queue entries @rspq: response queue for async notifications @ovfl_mode: CQ overflow mode @credits: completion queue credits @credit_thres: the credit threshold
Initialize an SGE completion queue context and make it ready for use. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2689 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_DATA1, A_SG_CONTEXT_DATA2, A_SG_CONTEXT_DATA3, F_CONTEXT_CMD_BUSY, F_CQ, t3_read_reg(), t3_sge_write_context(), t3_write_reg(), V_CQ_BASE_HI, V_CQ_CREDIT_THRES, V_CQ_CREDITS, V_CQ_ERR, V_CQ_GEN, V_CQ_OVERFLOW_MODE, V_CQ_RSPQ, and V_CQ_SIZE.
int t3_sge_init_ecntxt | ( | adapter_t * | adapter, |
unsigned int | id, | ||
int | gts_enable, | ||
enum sge_context_type | type, | ||
int | respq, | ||
u64 | base_addr, | ||
unsigned int | size, | ||
unsigned int | token, | ||
int | gen, | ||
unsigned int | cidx | ||
) |
t3_sge_init_ecntxt - initialize an SGE egress context @adapter: the adapter to configure @id: the context id @gts_enable: whether to enable GTS for the context @type: the egress context type @respq: associated response queue @base_addr: base address of queue @size: number of queue entries @token: uP token @gen: initial generation value for the context @cidx: consumer pointer
Initialize an SGE egress context and make it ready for use. If the platform allows concurrent context operations, the caller is responsible for appropriate locking.
Definition at line 2564 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_DATA1, A_SG_CONTEXT_DATA2, A_SG_CONTEXT_DATA3, F_CONTEXT_CMD_BUSY, F_EC_VALID, F_EGRESS, FW_WR_NUM, SGE_CNTXT_OFLD, t3_read_reg(), t3_sge_write_context(), t3_write_reg(), V_EC_BASE_HI, V_EC_BASE_LO, V_EC_CREDITS, V_EC_GEN, V_EC_GTS, V_EC_INDEX, V_EC_RESPQ, V_EC_SIZE, V_EC_TYPE, and V_EC_UP_TOKEN.
Referenced by t3_sge_alloc_qset().
int t3_sge_init_flcntxt | ( | adapter_t * | adapter, |
unsigned int | id, | ||
int | gts_enable, | ||
u64 | base_addr, | ||
unsigned int | size, | ||
unsigned int | bsize, | ||
unsigned int | cong_thres, | ||
int | gen, | ||
unsigned int | cidx | ||
) |
t3_sge_init_flcntxt - initialize an SGE free-buffer list context @adapter: the adapter to configure @id: the context id @gts_enable: whether to enable GTS for the context @base_addr: base address of queue @size: number of queue entries @bsize: size of each buffer for this queue @cong_thres: threshold to signal congestion to upstream producers @gen: initial generation value for the context @cidx: consumer pointer
Initialize an SGE free list context and make it ready for use. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2607 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_DATA1, A_SG_CONTEXT_DATA2, A_SG_CONTEXT_DATA3, F_CONTEXT_CMD_BUSY, F_FREELIST, M_FL_ENTRY_SIZE_LO, M_FL_INDEX_LO, S_FL_ENTRY_SIZE_LO, t3_read_reg(), t3_sge_write_context(), t3_write_reg(), V_FL_BASE_HI, V_FL_CONG_THRES, V_FL_ENTRY_SIZE_HI, V_FL_ENTRY_SIZE_LO, V_FL_GEN, V_FL_GTS, V_FL_INDEX_HI, V_FL_INDEX_LO, and V_FL_SIZE.
Referenced by t3_sge_alloc_qset().
int t3_sge_init_rspcntxt | ( | adapter_t * | adapter, |
unsigned int | id, | ||
int | irq_vec_idx, | ||
u64 | base_addr, | ||
unsigned int | size, | ||
unsigned int | fl_thres, | ||
int | gen, | ||
unsigned int | cidx | ||
) |
t3_sge_init_rspcntxt - initialize an SGE response queue context @adapter: the adapter to configure @id: the context id @irq_vec_idx: MSI-X interrupt vector index, 0 if no MSI-X, -1 if no IRQ @base_addr: base address of queue @size: number of queue entries @fl_thres: threshold for selecting the normal or jumbo free list @gen: initial generation value for the context @cidx: consumer pointer
Initialize an SGE response queue context and make it ready for use. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2646 of file cxgb_t3_hw.c.
References A_SG_CONTEXT_CMD, A_SG_CONTEXT_DATA0, A_SG_CONTEXT_DATA1, A_SG_CONTEXT_DATA2, A_SG_CONTEXT_DATA3, A_SG_CONTROL, F_CONTEXT_CMD_BUSY, F_ONEINTMULTQ, F_RESPONSEQ, F_RQ_INTR_EN, t3_read_reg(), t3_sge_write_context(), t3_write_reg(), V_CQ_BASE_HI, V_CQ_INDEX, V_CQ_SIZE, V_RQ_GEN, and V_RQ_MSI_VEC.
Referenced by t3_sge_alloc_qset().
void t3_sge_prep | ( | adapter_t * | adap, |
struct sge_params * | p | ||
) |
Definition at line 550 of file cxgb_sge.c.
References qset_params::coalesce_usecs, qset_params::cong_thres, cxgb_use_16k_clusters, adapter::dev, FL_Q_SIZE, qset_params::fl_size, is_offload(), qset_params::jumbo_buf_size, JUMBO_Q_SIZE, qset_params::jumbo_size, sge_params::max_pkt_size, nmbjumbo16, nmbjumbo9, adapter_params::nports, nqsets, adapter::params, qset_params::polling, sge_params::qset, RSPQ_Q_SIZE, qset_params::rspq_size, SGE_QSETS, TX_CTRL_Q_SIZE, TX_ETH_Q_SIZE, TX_OFLD_Q_SIZE, TXQ_CTRL, TXQ_ETH, TXQ_OFLD, and qset_params::txq_size.
Referenced by t3_prep_adapter().
t3_sge_read_cq - read an SGE CQ context @adapter: the adapter @id: the context id @data: holds the retrieved context
Read an SGE CQ context. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2905 of file cxgb_t3_hw.c.
References F_CQ, and t3_sge_read_context().
Referenced by cxgb_extension_ioctl().
t3_sge_read_ecntxt - read an SGE egress context @adapter: the adapter @id: the context id @data: holds the retrieved context
Read an SGE egress context. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2889 of file cxgb_t3_hw.c.
References F_EGRESS, and t3_sge_read_context().
Referenced by cxgb_extension_ioctl(), and t3_dump_txq_eth().
t3_sge_read_fl - read an SGE free-list context @adapter: the adapter @id: the context id @data: holds the retrieved context
Read an SGE free-list context. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2921 of file cxgb_t3_hw.c.
References F_FREELIST, SGE_QSETS, and t3_sge_read_context().
Referenced by cxgb_extension_ioctl().
t3_sge_read_rspq - read an SGE response queue context @adapter: the adapter @id: the context id @data: holds the retrieved context
Read an SGE response queue context. The caller is responsible for ensuring only one context operation occurs at a time.
Definition at line 2937 of file cxgb_t3_hw.c.
References F_RESPONSEQ, SGE_QSETS, and t3_sge_read_context().
Referenced by cxgb_extension_ioctl(), and t3_dump_rspq().
int t3_slow_intr_handler | ( | adapter_t * | adapter | ) |
t3_slow_intr_handler - control path interrupt handler @adapter: the adapter
T3 interrupt handler for non-data interrupt events, e.g., errors. The designation 'slow' is because it involves register reads, while data interrupts typically don't involve any MMIOs.
Definition at line 2249 of file cxgb_t3_hw.c.
References A_PL_INT_CAUSE0, cim_intr_handler(), adapter::cm, cplsw_intr_handler(), F_CIM, F_CPL_SWITCH, F_MC5A, F_MC7_CM, F_MC7_PMRX, F_MC7_PMTX, F_MPS0, F_PCIM0, F_PM1_RX, F_PM1_TX, F_SGE3, F_T3DBG, F_TP1, F_ULP2_RX, F_ULP2_TX, F_XGMAC0_0, F_XGMAC0_1, is_pcie(), mac_intr_handler(), adapter::mc5, mc7_intr_handler(), mps_intr_handler(), pci_intr_handler(), pcie_intr_handler(), phy_intr_handler(), adapter::pmrx, pmrx_intr_handler(), adapter::pmtx, pmtx_intr_handler(), adapter::slow_intr_mask, t3_mc5_intr_handler(), t3_read_reg(), t3_sge_err_intr_handler(), t3_write_reg(), tp_intr_handler(), ulprx_intr_handler(), and ulptx_intr_handler().
Referenced by sge_slow_intr_handler().
Definition at line 214 of file cxgb_tn1010.c.
References port_info::adapter, cphy_init(), msleep, port_info::phy, SUPPORTED_10000baseT_Full, SUPPORTED_1000baseT_Full, SUPPORTED_AUI, SUPPORTED_Autoneg, SUPPORTED_TP, and tn1010_ops.
void t3_tp_get_mib_stats | ( | adapter_t * | adap, |
struct tp_mib_stats * | tps | ||
) |
t3_tp_get_mib_stats - read TP's MIB counters @adap: the adapter @tps: holds the returned counter values
Returns the values of TP's MIB counters.
Definition at line 3503 of file cxgb_t3_hw.c.
References A_TP_MIB_INDEX, A_TP_MIB_RDATA, and t3_read_indirect().
int t3_tp_set_coalescing_size | ( | adapter_t * | adap, |
unsigned int | size, | ||
int | psh | ||
) |
t3_tp_set_coalescing_size - set receive coalescing size @adap: the adapter @size: the receive coalescing size @psh: whether a set PSH bit should deliver coalesced data
Set the receive coalescing size and PSH bit handling.
Definition at line 3302 of file cxgb_t3_hw.c.
References A_TP_PARA_REG2, A_TP_PARA_REG3, F_RXCOALESCEENABLE, F_RXCOALESCEPSHEN, MAX_RX_COALESCING_LEN, t3_read_reg(), t3_write_reg(), V_MAXRXDATA, and V_RXCOALESCESIZE.
Referenced by t3_init_hw().
void t3_tp_set_max_rxsize | ( | adapter_t * | adap, |
unsigned int | size | ||
) |
t3_tp_set_max_rxsize - set the max receive size @adap: the adapter @size: the max receive size
Set TP's max receive size. This is the limit that applies when receive coalescing is disabled.
Definition at line 3332 of file cxgb_t3_hw.c.
References A_TP_PARA_REG7, t3_write_reg(), V_PMMAXXFERLEN0, and V_PMMAXXFERLEN1.
Referenced by t3_init_hw().
void t3_tp_set_offload_mode | ( | adapter_t * | adap, |
int | enable | ||
) |
t3_tp_set_offload_mode - put TP in NIC/offload mode @adap: the adapter @enable: 1 to select offload mode, 0 for regular NIC
Switches TP to NIC/offload mode.
Definition at line 3027 of file cxgb_t3_hw.c.
References A_TP_IN_CONFIG, F_NICMODE, is_offload(), t3_set_reg_field(), and V_NICMODE.
Referenced by init_tp_parity().
int t3_vsc7323_disable | ( | adapter_t * | adap, |
int | port, | ||
int | which | ||
) |
Definition at line 261 of file cxgb_vsc7323.c.
References elmr_write(), MAC_DIRECTION_RX, MAC_DIRECTION_TX, t3_elmr_blk_read(), and VSC_REG.
Referenced by t3_mac_disable().
int t3_vsc7323_enable | ( | adapter_t * | adap, |
int | port, | ||
int | which | ||
) |
Definition at line 243 of file cxgb_vsc7323.c.
References elmr_write(), MAC_DIRECTION_RX, MAC_DIRECTION_TX, t3_elmr_blk_read(), and VSC_REG.
Referenced by t3_mac_enable().
int t3_vsc7323_init | ( | adapter_t * | adap, |
int | nports | ||
) |
Definition at line 113 of file cxgb_vsc7323.c.
References ARRAY_SIZE, ELMR_BW, ELMR_THRES0, elmr_write(), addr_val_pair::reg_addr, t3_elmr_blk_write(), addr_val_pair::val, and VSC_REG.
Referenced by t3_prep_adapter(), and t3_reinit_adapter().
Definition at line 231 of file cxgb_vsc7323.c.
References elmr_write(), and VSC_REG.
Referenced by t3_mac_set_address().
int t3_vsc7323_set_mtu | ( | adapter_t * | adap, |
unsigned int | mtu, | ||
int | port | ||
) |
Definition at line 226 of file cxgb_vsc7323.c.
References elmr_write(), and VSC_REG.
Referenced by t3_mac_set_mtu().
int t3_vsc7323_set_speed_fc | ( | adapter_t * | adap, |
int | speed, | ||
int | fc, | ||
int | port | ||
) |
Definition at line 195 of file cxgb_vsc7323.c.
References elmr_write(), PAUSE_RX, PAUSE_TX, SPEED_10, SPEED_100, SPEED_1000, and VSC_REG.
Referenced by t3_mac_set_speed_duplex_fc().
Definition at line 286 of file cxgb_vsc7323.c.
References cmac::adapter, ELMR_STAT, cmac::ext_port, mac, NSTATS0, NSTATS1, RMON_UPDATE, mac_stats::rx_bcast_frames, mac_stats::rx_fcs_errs, mac_stats::rx_frames, mac_stats::rx_frames_1024_1518, mac_stats::rx_frames_128_255, mac_stats::rx_frames_1519_max, mac_stats::rx_frames_256_511, mac_stats::rx_frames_512_1023, mac_stats::rx_frames_64, mac_stats::rx_frames_65_127, mac_stats::rx_jabber, mac_stats::rx_mcast_frames, mac_stats::rx_octets, mac_stats::rx_pause, mac_stats::rx_short, mac_stats::rx_symbol_errs, mac_stats::rx_too_long, cmac::stats, STATS0_START, STATS1_START, t3_elmr_blk_read(), mac_stats::tx_bcast_frames, mac_stats::tx_frames, mac_stats::tx_frames_1024_1518, mac_stats::tx_frames_128_255, mac_stats::tx_frames_1519_max, mac_stats::tx_frames_256_511, mac_stats::tx_frames_512_1023, mac_stats::tx_frames_64, mac_stats::tx_frames_65_127, mac_stats::tx_mcast_frames, mac_stats::tx_octets, mac_stats::tx_pause, and mac_stats::tx_underrun.
Referenced by t3_mac_update_stats().
int t3_vsc8211_fifo_depth | ( | adapter_t * | adap, |
unsigned int | mtu, | ||
int | port | ||
) |
Definition at line 394 of file cxgb_vsc8211.c.
References adap2pinfo(), M_VSC8211_RXFIFODEPTH, M_VSC8211_TXFIFODEPTH, mdio_read(), mdio_write(), phy, port_info::phy, V_VSC8211_RXFIFODEPTH, V_VSC8211_TXFIFODEPTH, and VSC8211_PHY_CTRL.
Referenced by t3_mac_set_mtu().
Definition at line 430 of file cxgb_vsc8211.c.
References port_info::adapter, cphy::caps, cphy_init(), cphy::desc, mdio_read(), mdio_write(), msleep, cphy::ops, phy, port_info::phy, cphy::pinfo, SUPPORTED_1000baseT_Full, SUPPORTED_100baseT_Full, SUPPORTED_10baseT_Full, SUPPORTED_Autoneg, SUPPORTED_FIBRE, SUPPORTED_IRQ, SUPPORTED_MII, SUPPORTED_TP, udelay, VSC8211_EXT_CTRL, VSC8211_EXT_PAGE_AXS, vsc8211_fiber_ops, VSC8211_LED_CTRL, vsc8211_ops, vsc8211_reset(), VSC8211_SIGDET_CTRL, VSC_CTRL_CLAUSE37_VIEW, and VSC_CTRL_MEDIA_MODE_HI.
|
inlinestatic |
Definition at line 684 of file cxgb_common.h.
References t3_wait_op_done_val().
Referenced by clear_sge_ctxt(), cxgb_uninit_synchronized(), init_parity(), mc5_cmd_write(), mi1_ext_read(), mi1_ext_write(), sf1_read(), sf1_write(), t3_cim_ctl_blk_read(), t3_get_tp_version(), t3_mac_init(), t3_mac_reset(), t3_mac_set_mtu(), t3_mc5_init(), t3_mi1_read(), t3_mi1_write(), t3_set_proto_sram(), t3_sge_cqcntxt_op(), t3_sge_disable_cqcntxt(), t3_sge_disable_fl(), t3_sge_disable_rspcntxt(), t3_sge_enable_ecntxt(), t3_sge_read_context(), t3_sge_write_context(), and tp_init().
int t3_wait_op_done_val | ( | adapter_t * | adapter, |
int | reg, | ||
u32 | mask, | ||
int | polarity, | ||
int | attempts, | ||
int | delay, | ||
u32 * | valp | ||
) |
t3_wait_op_done_val - wait until an operation is completed @adapter: the adapter performing the operation @reg: the register to check for completion @mask: a single-bit field within @reg that indicates completion @polarity: the value of the field when the operation is completed @attempts: number of check iterations @delay: delay in usecs between iterations @valp: where to store the value of the register at completion time
Wait until an operation is completed by checking a bit in a register up to @attempts times. If @valp is not NULL the value of the register at the time it indicated completion is stored there. Returns 0 if the operation completes and -EAGAIN otherwise.
Definition at line 55 of file cxgb_t3_hw.c.
References t3_read_reg(), and udelay.
Referenced by t3_cim_hac_read(), t3_cim_hac_write(), t3_i2c_read8(), t3_i2c_write8(), t3_sge_cqcntxt_op(), and t3_wait_op_done().
void t3_write_regs | ( | adapter_t * | adapter, |
const struct addr_val_pair * | p, | ||
int | n, | ||
unsigned int | offset | ||
) |
t3_write_regs - write a bunch of registers @adapter: the adapter to program : an array of register address/register value pairs
: the number of address/value pairs @offset: register address offset
Takes an array of register address/register value pairs and writes each value to the corresponding register. Register addresses are adjusted by the supplied offset.
Definition at line 84 of file cxgb_t3_hw.c.
References addr_val_pair::reg_addr, t3_write_reg(), and addr_val_pair::val.
Referenced by t3_intr_enable(), and t3_mac_init().
Definition at line 2297 of file cxgb_ael1002.c.
References port_info::adapter, cphy_init(), port_info::phy, SUPPORTED_10000baseT_Full, SUPPORTED_AUI, SUPPORTED_TP, and xaui_direct_ops.
void t3_xgm_intr_disable | ( | adapter_t * | adapter, |
int | idx | ||
) |
Definition at line 2427 of file cxgb_t3_hw.c.
References A_XGM_XGM_INT_DISABLE, adap2pinfo(), port_info::mac, cmac::offset, and t3_write_reg().
Referenced by t3_clear_faults(), and t3_link_changed().
void t3_xgm_intr_enable | ( | adapter_t * | adapter, |
int | idx | ||
) |
Definition at line 2419 of file cxgb_t3_hw.c.
References A_XGM_XGM_INT_ENABLE, adap2pinfo(), port_info::mac, cmac::offset, t3_write_reg(), and XGM_EXTRA_INTR_MASK.
Referenced by t3_clear_faults(), and t3_detect_link_fault().
int t3b2_mac_watchdog_task | ( | struct cmac * | mac | ) |
Definition at line 723 of file cxgb_xgmac.c.
References A_MPS_CFG, A_TP_PIO_ADDR, A_TP_PIO_DATA, A_TP_TX_DROP_CNT_CH0, A_XGM_STAT_TX_FRAME_LOW, A_XGM_TX_CTRL, A_XGM_TX_SPI4_SOP_EOP_CNT, cmac::adapter, F_ENFORCEPKT, F_PORT0ACTIVE, F_PORT1ACTIVE, G_TXDROPCNTCH0RCVD, G_TXSPI4SOPCNT, mac, macidx(), cmac::multiport, cmac::offset, mac_stats::rx_pause, cmac::rx_pause, cmac::stats, t3_mac_reset(), t3_read_reg(), t3_write_reg(), cmac::toggle_cnt, mac_stats::tx_frames, cmac::tx_mcnt, cmac::tx_tcnt, cmac::tx_xcnt, and cmac::txen.
Referenced by check_t3b2_mac().
void t3b_pcs_reset | ( | struct cmac * | mac | ) |
t3b_pcs_reset - reset the PCS on T3B+ adapters @mac: the XGMAC handle
Reset the XGMAC PCS block on T3B+ adapters.
Definition at line 97 of file cxgb_xgmac.c.
References A_XGM_RESET_CTRL, cmac::adapter, F_PCS_RESET_, mac, cmac::offset, and t3_set_reg_field().
Referenced by t3_link_changed(), t3_mac_init(), and t3_mac_reset().
void t3c_pcs_force_los | ( | struct cmac * | mac | ) |
Definition at line 108 of file cxgb_xgmac.c.
References A_XGM_SERDES_STAT0, A_XGM_SERDES_STAT1, A_XGM_SERDES_STAT2, A_XGM_SERDES_STAT3, cmac::adapter, F_LOWSIGFORCEEN0, F_LOWSIGFORCEEN1, F_LOWSIGFORCEEN2, F_LOWSIGFORCEEN3, F_LOWSIGFORCEVALUE0, F_LOWSIGFORCEVALUE1, F_LOWSIGFORCEVALUE2, F_LOWSIGFORCEVALUE3, mac, cmac::offset, and t3_set_reg_field().
Referenced by t3_link_changed().
|
inlinestatic |
Definition at line 647 of file cxgb_common.h.
References adapter_info, and SUPPORTED_AUI.
Referenced by calibrate_xgm(), calibrate_xgm_t3b(), early_hw_init(), get_vpd_params(), mac_prep(), t3_link_changed(), t3_mac_init(), t3_mac_set_speed_duplex_fc(), and xgm_reset_ctrl().