diff options
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index c5eaf4931a91..b94fa7ef1955 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2991,13 +2991,16 @@ static void rtl8169_down(struct net_device *dev) | |||
2991 | { | 2991 | { |
2992 | struct rtl8169_private *tp = netdev_priv(dev); | 2992 | struct rtl8169_private *tp = netdev_priv(dev); |
2993 | void __iomem *ioaddr = tp->mmio_addr; | 2993 | void __iomem *ioaddr = tp->mmio_addr; |
2994 | unsigned int poll_locked = 0; | ||
2995 | unsigned int intrmask; | 2994 | unsigned int intrmask; |
2996 | 2995 | ||
2997 | rtl8169_delete_timer(dev); | 2996 | rtl8169_delete_timer(dev); |
2998 | 2997 | ||
2999 | netif_stop_queue(dev); | 2998 | netif_stop_queue(dev); |
3000 | 2999 | ||
3000 | #ifdef CONFIG_R8169_NAPI | ||
3001 | napi_disable(&tp->napi); | ||
3002 | #endif | ||
3003 | |||
3001 | core_down: | 3004 | core_down: |
3002 | spin_lock_irq(&tp->lock); | 3005 | spin_lock_irq(&tp->lock); |
3003 | 3006 | ||
@@ -3011,13 +3014,6 @@ core_down: | |||
3011 | 3014 | ||
3012 | synchronize_irq(dev->irq); | 3015 | synchronize_irq(dev->irq); |
3013 | 3016 | ||
3014 | if (!poll_locked) { | ||
3015 | #ifdef CONFIG_R8169_NAPI | ||
3016 | napi_disable(&tp->napi); | ||
3017 | #endif | ||
3018 | poll_locked++; | ||
3019 | } | ||
3020 | |||
3021 | /* Give a racing hard_start_xmit a few cycles to complete. */ | 3017 | /* Give a racing hard_start_xmit a few cycles to complete. */ |
3022 | synchronize_sched(); /* FIXME: should this be synchronize_irq()? */ | 3018 | synchronize_sched(); /* FIXME: should this be synchronize_irq()? */ |
3023 | 3019 | ||