Commit 041b4ddb authored by Sebastian Hesselbarth's avatar Sebastian Hesselbarth Committed by David S. Miller

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: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e18503f4
...@@ -1131,15 +1131,13 @@ static void mib_counters_update(struct mv643xx_eth_private *mp) ...@@ -1131,15 +1131,13 @@ static void mib_counters_update(struct mv643xx_eth_private *mp)
p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT); p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT);
p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT); p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT);
spin_unlock_bh(&mp->mib_counters_lock); spin_unlock_bh(&mp->mib_counters_lock);
mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ);
} }
static void mib_counters_timer_wrapper(unsigned long _mp) static void mib_counters_timer_wrapper(unsigned long _mp)
{ {
struct mv643xx_eth_private *mp = (void *)_mp; struct mv643xx_eth_private *mp = (void *)_mp;
mib_counters_update(mp); mib_counters_update(mp);
mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment