summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
diff options
context:
space:
mode:
authorDmitry Kravkov2012-09-11 06:34:08 +0200
committerDavid S. Miller2012-09-13 22:37:51 +0200
commitbef05406ac0ea6f468e1e25e9934f3011ea9259b (patch)
treecc52c25b2066fc2e5f25b43a666455b30db5217a /drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
parentnet: qmi_wwan: call subdriver with control intf only (diff)
downloadkernel-qcow2-linux-bef05406ac0ea6f468e1e25e9934f3011ea9259b.tar.gz
kernel-qcow2-linux-bef05406ac0ea6f468e1e25e9934f3011ea9259b.tar.xz
kernel-qcow2-linux-bef05406ac0ea6f468e1e25e9934f3011ea9259b.zip
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.c8
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 332db64dd5be..d848dc9db7b0 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;
}