FreeBSD kernel CXGB device code
|
Go to the source code of this file.
Macros | |
#define | msleep t3_os_sleep |
#define | CFG_CHG_INTR_MASK |
#define | INTR_MASK |
#define | S_ACSR_ACTIPHY_TMR 0 |
#define | M_ACSR_ACTIPHY_TMR 0x3 |
#define | V_ACSR_ACTIPHY_TMR(x) ((x) << S_ACSR_ACTIPHY_TMR) |
#define | S_ACSR_SPEED 3 |
#define | M_ACSR_SPEED 0x3 |
#define | G_ACSR_SPEED(x) (((x) >> S_ACSR_SPEED) & M_ACSR_SPEED) |
#define | S_ACSR_DUPLEX 5 |
#define | F_ACSR_DUPLEX (1 << S_ACSR_DUPLEX) |
#define | S_ACSR_ACTIPHY 6 |
#define | F_ACSR_ACTIPHY (1 << S_ACSR_ACTIPHY) |
#define | VSC8211_PHY_CTRL 24 |
#define | S_VSC8211_TXFIFODEPTH 7 |
#define | M_VSC8211_TXFIFODEPTH 0x7 |
#define | V_VSC8211_TXFIFODEPTH(x) ((x) << S_VSC8211_TXFIFODEPTH) |
#define | G_VSC8211_TXFIFODEPTH(x) (((x) >> S_VSC8211_TXFIFODEPTH) & M_VSC8211_TXFIFODEPTH) |
#define | S_VSC8211_RXFIFODEPTH 4 |
#define | M_VSC8211_RXFIFODEPTH 0x7 |
#define | V_VSC8211_RXFIFODEPTH(x) ((x) << S_VSC8211_RXFIFODEPTH) |
#define | G_VSC8211_RXFIFODEPTH(x) (((x) >> S_VSC8211_RXFIFODEPTH) & M_VSC8211_RXFIFODEPTH) |
Enumerations | |
enum | { VSC8211_SIGDET_CTRL = 19 , VSC8211_EXT_CTRL = 23 , VSC8211_PHY_CTRL = 24 , VSC8211_INTR_ENABLE = 25 , VSC8211_INTR_STATUS = 26 , VSC8211_LED_CTRL = 27 , VSC8211_AUX_CTRL_STAT = 28 , VSC8211_EXT_PAGE_AXS = 31 } |
enum | { VSC_INTR_RX_ERR = 1 << 0 , VSC_INTR_MS_ERR = 1 << 1 , VSC_INTR_CABLE = 1 << 2 , VSC_INTR_FALSE_CARR = 1 << 3 , VSC_INTR_MEDIA_CHG = 1 << 4 , VSC_INTR_RX_FIFO = 1 << 5 , VSC_INTR_TX_FIFO = 1 << 6 , VSC_INTR_DESCRAMBL = 1 << 7 , VSC_INTR_SYMBOL_ERR = 1 << 8 , VSC_INTR_NEG_DONE = 1 << 10 , VSC_INTR_NEG_ERR = 1 << 11 , VSC_INTR_DPLX_CHG = 1 << 12 , VSC_INTR_LINK_CHG = 1 << 13 , VSC_INTR_SPD_CHG = 1 << 14 , VSC_INTR_ENABLE = 1 << 15 } |
enum | { VSC_CTRL_CLAUSE37_VIEW = 1 << 4 , VSC_CTRL_MEDIA_MODE_HI = 0xf000 } |
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | vsc8211_reset (struct cphy *cphy, int wait) |
static int | vsc8211_intr_enable (struct cphy *cphy) |
static int | vsc8211_intr_disable (struct cphy *cphy) |
static int | vsc8211_intr_clear (struct cphy *cphy) |
static int | vsc8211_autoneg_enable (struct cphy *cphy) |
static int | vsc8211_autoneg_restart (struct cphy *cphy) |
static int | vsc8211_get_link_status (struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) |
static int | vsc8211_get_link_status_fiber (struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) |
static int | vsc8211_set_automdi (struct cphy *phy, int enable) |
static int | vsc8211_set_speed_duplex (struct cphy *phy, int speed, int duplex) |
static int | vsc8211_power_down (struct cphy *cphy, int enable) |
static int | vsc8211_intr_handler (struct cphy *cphy) |
int | t3_vsc8211_fifo_depth (adapter_t *adap, unsigned int mtu, int port) |
int | t3_vsc8211_phy_prep (pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) |
Variables | |
static struct cphy_ops | vsc8211_ops |
static struct cphy_ops | vsc8211_fiber_ops |
#define CFG_CHG_INTR_MASK |
Definition at line 74 of file cxgb_vsc8211.c.
#define F_ACSR_ACTIPHY (1 << S_ACSR_ACTIPHY) |
Definition at line 93 of file cxgb_vsc8211.c.
#define F_ACSR_DUPLEX (1 << S_ACSR_DUPLEX) |
Definition at line 90 of file cxgb_vsc8211.c.
#define G_ACSR_SPEED | ( | x | ) | (((x) >> S_ACSR_SPEED) & M_ACSR_SPEED) |
Definition at line 87 of file cxgb_vsc8211.c.
#define G_VSC8211_RXFIFODEPTH | ( | x | ) | (((x) >> S_VSC8211_RXFIFODEPTH) & M_VSC8211_RXFIFODEPTH) |
Definition at line 392 of file cxgb_vsc8211.c.
#define G_VSC8211_TXFIFODEPTH | ( | x | ) | (((x) >> S_VSC8211_TXFIFODEPTH) & M_VSC8211_TXFIFODEPTH) |
Definition at line 387 of file cxgb_vsc8211.c.
#define INTR_MASK |
Definition at line 77 of file cxgb_vsc8211.c.
#define M_ACSR_ACTIPHY_TMR 0x3 |
Definition at line 82 of file cxgb_vsc8211.c.
#define M_ACSR_SPEED 0x3 |
Definition at line 86 of file cxgb_vsc8211.c.
#define M_VSC8211_RXFIFODEPTH 0x7 |
Definition at line 390 of file cxgb_vsc8211.c.
#define M_VSC8211_TXFIFODEPTH 0x7 |
Definition at line 385 of file cxgb_vsc8211.c.
#define msleep t3_os_sleep |
Definition at line 37 of file cxgb_vsc8211.c.
#define S_ACSR_ACTIPHY 6 |
Definition at line 92 of file cxgb_vsc8211.c.
#define S_ACSR_ACTIPHY_TMR 0 |
Definition at line 81 of file cxgb_vsc8211.c.
#define S_ACSR_DUPLEX 5 |
Definition at line 89 of file cxgb_vsc8211.c.
#define S_ACSR_SPEED 3 |
Definition at line 85 of file cxgb_vsc8211.c.
#define S_VSC8211_RXFIFODEPTH 4 |
Definition at line 389 of file cxgb_vsc8211.c.
#define S_VSC8211_TXFIFODEPTH 7 |
Definition at line 384 of file cxgb_vsc8211.c.
#define V_ACSR_ACTIPHY_TMR | ( | x | ) | ((x) << S_ACSR_ACTIPHY_TMR) |
Definition at line 83 of file cxgb_vsc8211.c.
#define V_VSC8211_RXFIFODEPTH | ( | x | ) | ((x) << S_VSC8211_RXFIFODEPTH) |
Definition at line 391 of file cxgb_vsc8211.c.
#define V_VSC8211_TXFIFODEPTH | ( | x | ) | ((x) << S_VSC8211_TXFIFODEPTH) |
Definition at line 386 of file cxgb_vsc8211.c.
#define VSC8211_PHY_CTRL 24 |
Definition at line 382 of file cxgb_vsc8211.c.
anonymous enum |
Enumerator | |
---|---|
VSC8211_SIGDET_CTRL | |
VSC8211_EXT_CTRL | |
VSC8211_PHY_CTRL | |
VSC8211_INTR_ENABLE | |
VSC8211_INTR_STATUS | |
VSC8211_LED_CTRL | |
VSC8211_AUX_CTRL_STAT | |
VSC8211_EXT_PAGE_AXS |
Definition at line 40 of file cxgb_vsc8211.c.
anonymous enum |
Definition at line 51 of file cxgb_vsc8211.c.
anonymous enum |
Enumerator | |
---|---|
VSC_CTRL_CLAUSE37_VIEW | |
VSC_CTRL_MEDIA_MODE_HI |
Definition at line 69 of file cxgb_vsc8211.c.
__FBSDID | ( | "$FreeBSD$" | ) |
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.
|
static |
Definition at line 121 of file cxgb_vsc8211.c.
References BMCR_ANENABLE, BMCR_ANRESTART, BMCR_ISOLATE, and t3_mdio_change_bits().
|
static |
Definition at line 127 of file cxgb_vsc8211.c.
References BMCR_ANRESTART, BMCR_ISOLATE, and t3_mdio_change_bits().
|
static |
Definition at line 133 of file cxgb_vsc8211.c.
References ADVERTISE_PAUSE_ASYM, ADVERTISE_PAUSE_CAP, BMCR_ANENABLE, BMCR_FULLDPLX, BMCR_SPEED100, BMCR_SPEED1000, BMSR_ANEGCOMPLETE, BMSR_LSTATUS, DUPLEX_FULL, DUPLEX_HALF, F_ACSR_DUPLEX, G_ACSR_SPEED, mdio_read(), MII_ADVERTISE, MII_LPA, PAUSE_RX, PAUSE_TX, PHY_LINK_DOWN, PHY_LINK_UP, SPEED_10, SPEED_100, SPEED_1000, and VSC8211_AUX_CTRL_STAT.
|
static |
Definition at line 206 of file cxgb_vsc8211.c.
References ADVERTISE_1000XFULL, ADVERTISE_1000XHALF, ADVERTISE_1000XPAUSE, ADVERTISE_1000XPSE_ASYM, BMCR_ANENABLE, BMCR_FULLDPLX, BMCR_SPEED100, BMCR_SPEED1000, BMSR_ANEGCOMPLETE, BMSR_LSTATUS, DUPLEX_FULL, DUPLEX_HALF, mdio_read(), MII_ADVERTISE, MII_LPA, PAUSE_RX, PAUSE_TX, PHY_LINK_DOWN, PHY_LINK_UP, SPEED_10, SPEED_100, and SPEED_1000.
|
static |
Definition at line 113 of file cxgb_vsc8211.c.
References mdio_read(), and VSC8211_INTR_STATUS.
|
static |
Definition at line 108 of file cxgb_vsc8211.c.
References mdio_write(), and VSC8211_INTR_ENABLE.
|
static |
Definition at line 103 of file cxgb_vsc8211.c.
References INTR_MASK, mdio_write(), and VSC8211_INTR_ENABLE.
|
static |
Definition at line 305 of file cxgb_vsc8211.c.
References CFG_CHG_INTR_MASK, cphy_cause_fifo_error, cphy_cause_link_change, INTR_MASK, mdio_read(), VSC8211_INTR_STATUS, VSC_INTR_RX_FIFO, and VSC_INTR_TX_FIFO.
|
static |
Definition at line 299 of file cxgb_vsc8211.c.
References t3_mdio_change_bits().
|
static |
Definition at line 98 of file cxgb_vsc8211.c.
References t3_phy_reset().
Referenced by t3_vsc8211_phy_prep().
|
static |
Definition at line 276 of file cxgb_vsc8211.c.
References mdio_write(), phy, and VSC8211_EXT_PAGE_AXS.
Referenced by vsc8211_set_speed_duplex().
|
static |
Definition at line 289 of file cxgb_vsc8211.c.
References phy, t3_set_phy_speed_duplex(), and vsc8211_set_automdi().
|
static |
Definition at line 367 of file cxgb_vsc8211.c.
Referenced by t3_vsc8211_phy_prep().
|
static |
Definition at line 353 of file cxgb_vsc8211.c.
Referenced by t3_vsc8211_phy_prep().