]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "r8152: napi hangup fix after disconnect"
authorHayes Wang <hayeswang@realtek.com>
Wed, 28 Aug 2019 01:51:41 +0000 (09:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 23:02:32 +0000 (16:02 -0700)
This reverts commit e38755ac17ec36c91a20931ceb1aa47820d4f98e.

The commit e38755ac17ec ("r8152: napi hangup fix after
disconnect") adds a check about RTL8152_UNPLUG to determine
if calling napi_disable() is invalid in rtl8152_close(),
when rtl8152_disconnect() is called. This avoids to use
napi_disable() after calling netif_napi_del().

Howver, commit 87e1d9bae5a4 ("r8152: set RTL8152_UNPLUG
only for real disconnection") causes that RTL8152_UNPLUG
is not always set when calling rtl8152_disconnect().
Therefore, I have to revert commit e38755ac17ec ("r8152:
napi hangup fix after disconnect"), first. And submit
another patch to fix it.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index eee0f5007ee3a4b8f9892098ebaeb20f9be17ddf..ad3abe26b51b93a0b5df89135b5a3925332a6b3c 100644 (file)
@@ -4021,8 +4021,7 @@ static int rtl8152_close(struct net_device *netdev)
 #ifdef CONFIG_PM_SLEEP
        unregister_pm_notifier(&tp->pm_notifier);
 #endif
-       if (!test_bit(RTL8152_UNPLUG, &tp->flags))
-               napi_disable(&tp->napi);
+       napi_disable(&tp->napi);
        clear_bit(WORK_ENABLE, &tp->flags);
        usb_kill_urb(tp->intr_urb);
        cancel_delayed_work_sync(&tp->schedule);