bnx2x: Missing smp_wmb for statistics state machine
authorEilon Greenstein <eilong@broadcom.com>
Wed, 12 Aug 2009 08:23:56 +0000 (08:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2009 06:02:55 +0000 (23:02 -0700)
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>
drivers/net/bnx2x_main.c

index edd7b137b76c754ff61a65d1f17574173a45ae63..1e8e7e1efbd6ea7fabfe035bd5b94d39e46a9ba1 100644 (file)
@@ -4412,6 +4412,9 @@ static void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event)
        bnx2x_stats_stm[state][event].action(bp);
        bp->stats_state = bnx2x_stats_stm[state][event].next_state;
 
+       /* Make sure the state has been "changed" */
+       smp_wmb();
+
        if ((event != STATS_EVENT_UPDATE) || (bp->msglevel & NETIF_MSG_TIMER))
                DP(BNX2X_MSG_STATS, "state %d -> event %d -> state %d\n",
                   state, event, bp->stats_state);