diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2012-09-11 04:34:08 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-13 16:37:51 -0400 |
commit | bef05406ac0ea6f468e1e25e9934f3011ea9259b (patch) | |
tree | cc52c25b2066fc2e5f25b43a666455b30db5217a /drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |
parent | 8624dd2a3e33b647cd672211b54ba276ddee2a2c (diff) |
bnx2x: Avoid sending multiple statistics queries
During traffic when DCB is enabled, it is possible for multiple instances
of statistics queries to be sent to the chip - this may cause the FW to assert.
This patch prevents the sending of an additional instance of statistics query
while the previous query hasn't completed.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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/broadcom/bnx2x/bnx2x_stats.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index 332db64dd5b..d848dc9db7b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c @@ -1151,9 +1151,11 @@ static void bnx2x_stats_update(struct bnx2x *bp) if (bp->port.pmf) bnx2x_hw_stats_update(bp); - if (bnx2x_storm_stats_update(bp) && (bp->stats_pending++ == 3)) { - BNX2X_ERR("storm stats were not updated for 3 times\n"); - bnx2x_panic(); + if (bnx2x_storm_stats_update(bp)) { + if (bp->stats_pending++ == 3) { + BNX2X_ERR("storm stats were not updated for 3 times\n"); + bnx2x_panic(); + } return; } |