FreeBSD kernel CXGB device code
|
Go to the source code of this file.
Macros | |
#define | VSC_REG(block, subblock, reg) ((reg) | ((subblock) << 8) | ((block) << 12)) |
#define | STATS0_START 1 |
#define | STATS1_START 0x24 |
#define | NSTATS0 (0x1d - STATS0_START + 1) |
#define | NSTATS1 (0x2a - STATS1_START + 1) |
#define | ELMR_STAT(port, reg) (ELMR_STATS + port * 0x40 + reg) |
#define | RMON_UPDATE(mac, name, hw_stat) mac->stats.name += (u64)((hw_stat) - (u32)(mac->stats.name)) |
Enumerations | |
enum | { ELMR_ADDR = 0 , ELMR_STAT = 1 , ELMR_DATA_LO = 2 , ELMR_DATA_HI = 3 , ELMR_THRES0 = 0xe000 , ELMR_BW = 0xe00c , ELMR_FIFO_SZ = 0xe00d , ELMR_STATS = 0xf000 , ELMR_MDIO_ADDR = 10 } |
Functions | |
__FBSDID ("$FreeBSD$") | |
int | t3_elmr_blk_write (adapter_t *adap, int start, const u32 *vals, int n) |
static int | elmr_write (adapter_t *adap, int addr, u32 val) |
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) |
#define ELMR_STAT | ( | port, | |
reg | |||
) | (ELMR_STATS + port * 0x40 + reg) |
Definition at line 284 of file cxgb_vsc7323.c.
#define NSTATS0 (0x1d - STATS0_START + 1) |
Definition at line 281 of file cxgb_vsc7323.c.
#define NSTATS1 (0x2a - STATS1_START + 1) |
Definition at line 282 of file cxgb_vsc7323.c.
#define RMON_UPDATE | ( | mac, | |
name, | |||
hw_stat | |||
) | mac->stats.name += (u64)((hw_stat) - (u32)(mac->stats.name)) |
#define STATS0_START 1 |
Definition at line 279 of file cxgb_vsc7323.c.
#define STATS1_START 0x24 |
Definition at line 280 of file cxgb_vsc7323.c.
#define VSC_REG | ( | block, | |
subblock, | |||
reg | |||
) | ((reg) | ((subblock) << 8) | ((block) << 12)) |
Definition at line 50 of file cxgb_vsc7323.c.
anonymous enum |
Enumerator | |
---|---|
ELMR_ADDR | |
ELMR_STAT | |
ELMR_DATA_LO | |
ELMR_DATA_HI | |
ELMR_THRES0 | |
ELMR_BW | |
ELMR_FIFO_SZ | |
ELMR_STATS | |
ELMR_MDIO_ADDR |
Definition at line 36 of file cxgb_vsc7323.c.
__FBSDID | ( | "$FreeBSD$" | ) |
Definition at line 71 of file cxgb_vsc7323.c.
References t3_elmr_blk_write().
Referenced by t3_vsc7323_disable(), t3_vsc7323_enable(), t3_vsc7323_init(), t3_vsc7323_set_addr(), t3_vsc7323_set_mtu(), and t3_vsc7323_set_speed_fc().
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().
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().