diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index 332db64dd5be..a1d0446b39b3 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |||
@@ -101,6 +101,11 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp) | |||
101 | if (CHIP_REV_IS_SLOW(bp)) | 101 | if (CHIP_REV_IS_SLOW(bp)) |
102 | return; | 102 | return; |
103 | 103 | ||
104 | /* Update MCP's statistics if possible */ | ||
105 | if (bp->func_stx) | ||
106 | memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats, | ||
107 | sizeof(bp->func_stats)); | ||
108 | |||
104 | /* loader */ | 109 | /* loader */ |
105 | if (bp->executer_idx) { | 110 | if (bp->executer_idx) { |
106 | int loader_idx = PMF_DMAE_C(bp); | 111 | int loader_idx = PMF_DMAE_C(bp); |
@@ -128,8 +133,6 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp) | |||
128 | 133 | ||
129 | } else if (bp->func_stx) { | 134 | } else if (bp->func_stx) { |
130 | *stats_comp = 0; | 135 | *stats_comp = 0; |
131 | memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats, | ||
132 | sizeof(bp->func_stats)); | ||
133 | bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); | 136 | bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); |
134 | } | 137 | } |
135 | } | 138 | } |
@@ -1151,9 +1154,11 @@ static void bnx2x_stats_update(struct bnx2x *bp) | |||
1151 | if (bp->port.pmf) | 1154 | if (bp->port.pmf) |
1152 | bnx2x_hw_stats_update(bp); | 1155 | bnx2x_hw_stats_update(bp); |
1153 | 1156 | ||
1154 | if (bnx2x_storm_stats_update(bp) && (bp->stats_pending++ == 3)) { | 1157 | if (bnx2x_storm_stats_update(bp)) { |
1155 | BNX2X_ERR("storm stats were not updated for 3 times\n"); | 1158 | if (bp->stats_pending++ == 3) { |
1156 | bnx2x_panic(); | 1159 | BNX2X_ERR("storm stats were not updated for 3 times\n"); |
1160 | bnx2x_panic(); | ||
1161 | } | ||
1157 | return; | 1162 | return; |
1158 | } | 1163 | } |
1159 | 1164 | ||