Message ID | 1380711442-24735-2-git-send-email-sebastian.hesselbarth@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 02, 2013 at 12:57:20PM +0200, Sebastian Hesselbarth wrote: > 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> > --- > Cc: David Miller <davem@davemloft.net> > Cc: Lennert Buytenhek <buytenh@wantstofly.org> > Cc: Jason Cooper <jason@lakedaemon.net> > Cc: netdev@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Acked-by: Jason Cooper <jason@lakedaemon.net> Introduced by: 4ff3495a mv643xx_eth: enforce frequent hardware statistics polling which goes all the way back to v2.6.28 thx, Jason.
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 7fb5677..44a87e4 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) p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT); p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT); 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) { struct mv643xx_eth_private *mp = (void *)_mp; - mib_counters_update(mp); + mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); }
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> --- Cc: David Miller <davem@davemloft.net> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)