diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-02-28 03:37:10 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 21:14:48 (GMT) |
commit | 63135281af8c7fb2b7c84b63f5f974238b7d843e (patch) | |
tree | 91f594b3015f9b0b9454975f803d67d8ec6fe5a2 /drivers/net | |
parent | ff80ee029b562c21ca40724dfe9a63e0e0e0ce3d (diff) | |
download | linux-fsl-qoriq-63135281af8c7fb2b7c84b63f5f974238b7d843e.tar.xz |
bnx2x: perform statistics "action" before state transition.
Signed-off-by: Dmitry Kravkov <dmitry@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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index bda60d5..3445ded 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -1239,14 +1239,14 @@ void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event) if (unlikely(bp->panic)) return; + bnx2x_stats_stm[bp->stats_state][event].action(bp); + /* Protect a state change flow */ spin_lock_bh(&bp->stats_lock); state = bp->stats_state; bp->stats_state = bnx2x_stats_stm[state][event].next_state; spin_unlock_bh(&bp->stats_lock); - bnx2x_stats_stm[state][event].action(bp); - if ((event != STATS_EVENT_UPDATE) || netif_msg_timer(bp)) DP(BNX2X_MSG_STATS, "state %d -> event %d -> state %d\n", state, event, bp->stats_state); |