diff options
author | Ariel Elior <ariele@broadcom.com> | 2012-01-26 10:01:53 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-26 22:39:52 +0400 |
commit | 7a752993fe90adf8e150cc1a85beef5f782429e7 (patch) | |
tree | ce11b217e4d6fa9e77ae10a4236d3c6ddf99427e /drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |
parent | 95c6c6165eaf5a031bcf31606e081c72e4acdeb8 (diff) | |
download | linux-7a752993fe90adf8e150cc1a85beef5f782429e7.tar.xz |
bnx2x: Recoverable and unrecoverable error statistics
Add statistics for tracking parity errors from which we successfully
recovered and those which were deemed unrecoverable.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index c945df061618..cdce7663efd5 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -784,6 +784,7 @@ void bnx2x_panic_dump(struct bnx2x *bp) #endif bp->stats_state = STATS_STATE_DISABLED; + bp->eth_stats.unrecoverable_error++; DP(BNX2X_MSG_STATS, "stats_state - DISABLED\n"); BNX2X_ERR("begin crash dump -----------------\n"); @@ -5441,6 +5442,7 @@ static void bnx2x_init_eth_fp(struct bnx2x *bp, int fp_idx) /* init shortcut */ fp->ustorm_rx_prods_offset = bnx2x_rx_ustorm_prods_offset(fp); + /* Setup SB indicies */ fp->rx_cons_sb = BNX2X_RX_SB_INDEX; @@ -8563,6 +8565,7 @@ static inline void bnx2x_recovery_failed(struct bnx2x *bp) static void bnx2x_parity_recover(struct bnx2x *bp) { bool global = false; + u32 error_recovered, error_unrecovered; bool is_parity; DP(NETIF_MSG_HW, "Handling parity\n"); @@ -8678,9 +8681,14 @@ static void bnx2x_parity_recover(struct bnx2x *bp) return; } + error_recovered = + bp->eth_stats.recoverable_error; + error_unrecovered = + bp->eth_stats.unrecoverable_error; bp->recovery_state = BNX2X_RECOVERY_NIC_LOADING; if (bnx2x_nic_load(bp, LOAD_NORMAL)) { + error_unrecovered++; netdev_err(bp->dev, "Recovery failed. " "Power cycle " @@ -8694,8 +8702,13 @@ static void bnx2x_parity_recover(struct bnx2x *bp) } else { bp->recovery_state = BNX2X_RECOVERY_DONE; + error_recovered++; smp_mb(); } + bp->eth_stats.recoverable_error = + error_recovered; + bp->eth_stats.unrecoverable_error = + error_unrecovered; return; } |