Message ID | 20090215092719.GB12280@Chamillionaire.breakpoint.cc |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
* Sebastian Andrzej Siewior | 2009-02-15 10:27:19 [+0100]: >because mib_counters_update() also restarts the timer. >So the timer is dequeued, the stats are read and then the timer is >enqueued again. This is okay, unless someone unloads the module. I got to NAK that one myself. I make a new one which does not break sth. else .) Sebastian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 6977abe..3c6847a 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -2213,8 +2213,6 @@ static int mv643xx_eth_stop(struct net_device *dev) wrlp(mp, INT_MASK, 0x00000000); rdlp(mp, INT_MASK); - del_timer_sync(&mp->mib_counters_timer); - napi_disable(&mp->napi); del_timer_sync(&mp->rx_oom); @@ -2226,6 +2224,7 @@ static int mv643xx_eth_stop(struct net_device *dev) port_reset(mp); mv643xx_eth_get_stats(dev); mib_counters_update(mp); + del_timer_sync(&mp->mib_counters_timer); skb_queue_purge(&mp->rx_recycle);
because mib_counters_update() also restarts the timer. So the timer is dequeued, the stats are read and then the timer is enqueued again. This is okay, unless someone unloads the module. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> --- drivers/net/mv643xx_eth.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)