aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2012-09-11 00:34:08 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-13 16:37:51 -0400
commitbef05406ac0ea6f468e1e25e9934f3011ea9259b (patch)
treecc52c25b2066fc2e5f25b43a666455b30db5217a
parent8624dd2a3e33b647cd672211b54ba276ddee2a2c (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>
-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)
1151 if (bp->port.pmf) 1151 if (bp->port.pmf)
1152 bnx2x_hw_stats_update(bp); 1152 bnx2x_hw_stats_update(bp);
1153 1153
1154 if (bnx2x_storm_stats_update(bp) && (bp->stats_pending++ == 3)) { 1154 if (bnx2x_storm_stats_update(bp)) {
1155 BNX2X_ERR("storm stats were not updated for 3 times\n"); 1155 if (bp->stats_pending++ == 3) {
1156 bnx2x_panic(); 1156 BNX2X_ERR("storm stats were not updated for 3 times\n");
1157 bnx2x_panic();
1158 }
1157 return; 1159 return;
1158 } 1160 }
1159 1161