]>
Commit | Line | Data |
---|---|---|
7f7c74eb GKH |
1 | From 117aa3e23dcc332b2617bf92dd2890329dd5866a Mon Sep 17 00:00:00 2001 |
2 | From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | |
3 | Date: Wed, 2 Oct 2013 12:57:20 +0200 | |
4 | Subject: net: mv643xx_eth: update statistics timer from timer context only | |
5 | ||
6 | From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | |
7 | ||
8 | [ Upstream commit 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c ] | |
9 | ||
10 | Each port driver installs a periodic timer to update port statistics | |
11 | by calling mib_counters_update. As mib_counters_update is also called | |
12 | from non-timer context, we should not reschedule the timer there but | |
13 | rather move it to timer-only context. | |
14 | ||
15 | Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | |
16 | Acked-by: Jason Cooper <jason@lakedaemon.net> | |
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
18 | Signed-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 |