Skip to content

Commit

Permalink
bnx2x: Avoid sending multiple statistics queries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Sep 13, 2012
1 parent 8624dd2 commit bef0540
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bef0540

Please sign in to comment.