From: Eilon Greenstein Date: Wed, 12 Aug 2009 08:23:56 +0000 (+0000) Subject: bnx2x: Missing smp_wmb for statistics state machine X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8924665a7d77bb79ee895b98864e3201507f6ef2;p=openwrt%2Fstaging%2Fblogic.git bnx2x: Missing smp_wmb for statistics state machine Signed-off-by: Vladislav Zolotarov Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index edd7b137b76c..1e8e7e1efbd6 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -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);