aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2012-09-11 00:34:09 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-13 16:37:51 -0400
commit217aeb896a4a9f00006ce4b193c216f739234296 (patch)
treedd4139fd95cc0bac543129a92aa20043b6516ebc /drivers/net/ethernet
parentbef05406ac0ea6f468e1e25e9934f3011ea9259b (diff)
bnx2x: fix stats copying logic
FW needs the driver statistics for management. Current logic is broken in that the function that gathers the port statistics does not copy its own statistics to a place where the FW can use it. This patch causes every function that can pass statistics to the FW to do so. Signed-off-by: Yuval Mintz <yuvalmin@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')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index d848dc9db7b..a1d0446b39b 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}