r8169: remove poll_locked logic
authorStephen Hemminger <shemminger@linux-foundation.org>
Sun, 28 Oct 2007 16:14:06 +0000 (17:14 +0100)
committerFrancois Romieu <romieu@fr.zoreil.com>
Sun, 28 Oct 2007 17:21:06 +0000 (18:21 +0100)
Disabling napi polling early is well enough.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
drivers/net/r8169.c

index c5eaf4931a9189601abd1e7dd5cb3c96274f3cbb..b94fa7ef1955ccc8036a46370102e366fb4b153c 100644 (file)
@@ -2991,13 +2991,16 @@ static void rtl8169_down(struct net_device *dev)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
        void __iomem *ioaddr = tp->mmio_addr;
-       unsigned int poll_locked = 0;
        unsigned int intrmask;
 
        rtl8169_delete_timer(dev);
 
        netif_stop_queue(dev);
 
+#ifdef CONFIG_R8169_NAPI
+       napi_disable(&tp->napi);
+#endif
+
 core_down:
        spin_lock_irq(&tp->lock);
 
@@ -3011,13 +3014,6 @@ core_down:
 
        synchronize_irq(dev->irq);
 
-       if (!poll_locked) {
-#ifdef CONFIG_R8169_NAPI
-               napi_disable(&tp->napi);
-#endif
-               poll_locked++;
-       }
-
        /* Give a racing hard_start_xmit a few cycles to complete. */
        synchronize_sched();  /* FIXME: should this be synchronize_irq()? */