diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-10-02 06:57:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 17:11:37 -0400 |
commit | 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c (patch) | |
tree | 5f8f98d9ea44e00df08a701368d00a350cac35c4 /drivers/net/ethernet/marvell/mv643xx_eth.c | |
parent | e18503f41f9b12132c95d7c31ca6ee5155e44e5c (diff) |
net: mv643xx_eth: update statistics timer from timer context only
Each port driver installs a periodic timer to update port statistics
by calling mib_counters_update. As mib_counters_update is also called
from non-timer context, we should not reschedule the timer there but
rather move it to timer-only context.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mv643xx_eth.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mv643xx_eth.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 7fb5677451f9..44a87e4469e0 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -1131,15 +1131,13 @@ static void mib_counters_update(struct mv643xx_eth_private *mp) | |||
1131 | p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT); | 1131 | p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT); |
1132 | p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT); | 1132 | p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT); |
1133 | spin_unlock_bh(&mp->mib_counters_lock); | 1133 | spin_unlock_bh(&mp->mib_counters_lock); |
1134 | |||
1135 | mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); | ||
1136 | } | 1134 | } |
1137 | 1135 | ||
1138 | static void mib_counters_timer_wrapper(unsigned long _mp) | 1136 | static void mib_counters_timer_wrapper(unsigned long _mp) |
1139 | { | 1137 | { |
1140 | struct mv643xx_eth_private *mp = (void *)_mp; | 1138 | struct mv643xx_eth_private *mp = (void *)_mp; |
1141 | |||
1142 | mib_counters_update(mp); | 1139 | mib_counters_update(mp); |
1140 | mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); | ||
1143 | } | 1141 | } |
1144 | 1142 | ||
1145 | 1143 | ||