diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-01-09 03:20:34 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-10 00:47:47 +0100 |
commit | 9bcb8018cf7af1f00f35cad4b121897cac077269 (patch) | |
tree | 17e73c7baed203c01208d279b4c357cd6b5b7ee9 /drivers/net | |
parent | bnx2x: Move to D0 before clearing MSI/MSI-X configuration. (diff) | |
download | linux-9bcb8018cf7af1f00f35cad4b121897cac077269.tar.xz linux-9bcb8018cf7af1f00f35cad4b121897cac077269.zip |
bnx2x: Fix the race on bp->stats_pending.
Fix the race on bp->stats_pending between the timer and a LINK_UP event
handler.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_stats.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index 6e4d9b144cc4..bda60d590fa8 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -158,6 +158,11 @@ static void bnx2x_storm_stats_post(struct bnx2x *bp) spin_lock_bh(&bp->stats_lock); + if (bp->stats_pending) { + spin_unlock_bh(&bp->stats_lock); + return; + } + ramrod_data.drv_counter = bp->stats_counter++; ramrod_data.collect_port = bp->port.pmf ? 1 : 0; for_each_eth_queue(bp, i) |