提交 bd1034f0 编写于 作者: A Ananda Raju 提交者: Jeff Garzik

[PATCH] s2io: additional stats

Hi,
	This patch contains additional statistics counters added to s2io driver
	these statistics are very much usefull in debugging the driver.
Signed-off-by: NAnanda Raju <ananda.raju@neterion.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 c92ca04b
......@@ -167,6 +167,7 @@ typedef struct _XENA_dev_config {
u8 unused4[0x08];
u64 gpio_int_reg;
#define GPIO_INT_REG_DP_ERR_INT BIT(0)
#define GPIO_INT_REG_LINK_DOWN BIT(1)
#define GPIO_INT_REG_LINK_UP BIT(2)
u64 gpio_int_mask;
......@@ -267,6 +268,21 @@ typedef struct _XENA_dev_config {
/* General Configuration */
u64 mdio_control;
#define MDIO_MMD_INDX_ADDR(val) vBIT(val, 0, 16)
#define MDIO_MMD_DEV_ADDR(val) vBIT(val, 19, 5)
#define MDIO_MMD_PMA_DEV_ADDR 0x1
#define MDIO_MMD_PMD_DEV_ADDR 0x1
#define MDIO_MMD_WIS_DEV_ADDR 0x2
#define MDIO_MMD_PCS_DEV_ADDR 0x3
#define MDIO_MMD_PHYXS_DEV_ADDR 0x4
#define MDIO_MMS_PRT_ADDR(val) vBIT(val, 27, 5)
#define MDIO_CTRL_START_TRANS(val) vBIT(val, 56, 4)
#define MDIO_OP(val) vBIT(val, 60, 2)
#define MDIO_OP_ADDR_TRANS 0x0
#define MDIO_OP_WRITE_TRANS 0x1
#define MDIO_OP_READ_POST_INC_TRANS 0x2
#define MDIO_OP_READ_TRANS 0x3
#define MDIO_MDIO_DATA(val) vBIT(val, 32, 16)
u64 dtx_control;
......@@ -546,7 +562,12 @@ typedef struct _XENA_dev_config {
#define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3)
#define RX_PA_CFG_IGNORE_L2_ERR BIT(6)
u8 unused12[0x700 - 0x1D8];
u64 unused_11_1;
u64 ring_bump_counter1;
u64 ring_bump_counter2;
u8 unused12[0x700 - 0x1F0];
u64 rxdma_debug_ctrl;
......
此差异已折叠。
......@@ -31,6 +31,8 @@
#define SUCCESS 0
#define FAILURE -1
#define CHECKBIT(value, nbit) (value & (1 << nbit))
/* Maximum time to flicker LED when asked to identify NIC using ethtool */
#define MAX_FLICKER_TIME 60000 /* 60 Secs */
......@@ -78,6 +80,11 @@ static int debug_level = ERR_DBG;
typedef struct {
unsigned long long single_ecc_errs;
unsigned long long double_ecc_errs;
unsigned long long parity_err_cnt;
unsigned long long serious_err_cnt;
unsigned long long soft_reset_cnt;
unsigned long long fifo_full_cnt;
unsigned long long ring_full_cnt;
/* LRO statistics */
unsigned long long clubbed_frms_cnt;
unsigned long long sending_both;
......@@ -87,6 +94,25 @@ typedef struct {
unsigned long long num_aggregations;
} swStat_t;
/* Xpak releated alarm and warnings */
typedef struct {
u64 alarm_transceiver_temp_high;
u64 alarm_transceiver_temp_low;
u64 alarm_laser_bias_current_high;
u64 alarm_laser_bias_current_low;
u64 alarm_laser_output_power_high;
u64 alarm_laser_output_power_low;
u64 warn_transceiver_temp_high;
u64 warn_transceiver_temp_low;
u64 warn_laser_bias_current_high;
u64 warn_laser_bias_current_low;
u64 warn_laser_output_power_high;
u64 warn_laser_output_power_low;
u64 xpak_regs_stat;
u32 xpak_timer_count;
} xpakStat_t;
/* The statistics block of Xena */
typedef struct stat_block {
/* Tx MAC statistics counters. */
......@@ -263,7 +289,9 @@ typedef struct stat_block {
u32 rmac_accepted_ip_oflow;
u32 reserved_14;
u32 link_fault_cnt;
u8 buffer[20];
swStat_t sw_stat;
xpakStat_t xpak_stat;
} StatInfo_t;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册