diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-02-28 04:37:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 22:14:48 +0100 |
commit | 63135281af8c7fb2b7c84b63f5f974238b7d843e (patch) | |
tree | 91f594b3015f9b0b9454975f803d67d8ec6fe5a2 /drivers | |
parent | bnx2x: properly configure coefficients for MinBW algorithm (NPAR mode). (diff) | |
download | linux-63135281af8c7fb2b7c84b63f5f974238b7d843e.tar.xz linux-63135281af8c7fb2b7c84b63f5f974238b7d843e.zip |
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')
-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 bda60d590fa8..3445ded6674f 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); |