]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.18/net-mv643xx_eth-update-statistics-timer-from-timer-context-only.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.18 / net-mv643xx_eth-update-statistics-timer-from-timer-context-only.patch
CommitLineData
7f7c74eb
GKH
1From 117aa3e23dcc332b2617bf92dd2890329dd5866a Mon Sep 17 00:00:00 2001
2From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
3Date: Wed, 2 Oct 2013 12:57:20 +0200
4Subject: net: mv643xx_eth: update statistics timer from timer context only
5
6From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
7
8[ Upstream commit 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c ]
9
10Each port driver installs a periodic timer to update port statistics
11by calling mib_counters_update. As mib_counters_update is also called
12from non-timer context, we should not reschedule the timer there but
13rather move it to timer-only context.
14
15Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
16Acked-by: Jason Cooper <jason@lakedaemon.net>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +---
21 1 file changed, 1 insertion(+), 3 deletions(-)
22
23--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
24+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
25@@ -1125,15 +1125,13 @@ static void mib_counters_update(struct m
26 p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT);
27 p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT);
28 spin_unlock_bh(&mp->mib_counters_lock);
29-
30- mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ);
31 }
32
33 static void mib_counters_timer_wrapper(unsigned long _mp)
34 {
35 struct mv643xx_eth_private *mp = (void *)_mp;
36-
37 mib_counters_update(mp);
38+ mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ);
39 }
40
41