Skip to content

Commit 80a6a5d

Browse files
committed
Merge branch 'r8152-fix-side-effect'
Hayes Wang says: ==================== r8152: fix side effect v3: Update the commit message for patch #1. v2: Replace patch #2 with "r8152: remove calling netif_napi_del". v1: The commit 0ee1f47 ("r8152: napi hangup fix after disconnect") add a check to avoid using napi_disable after netif_napi_del. However, the commit ffa9fec ("r8152: set RTL8152_UNPLUG only for real disconnection") let the check useless. Therefore, I revert commit 0ee1f47 ("r8152: napi hangup fix after disconnect") first, and add another patch to fix it. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 092e22e + 973dc6c commit 80a6a5d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,8 +4021,7 @@ static int rtl8152_close(struct net_device *netdev)
40214021
#ifdef CONFIG_PM_SLEEP
40224022
unregister_pm_notifier(&tp->pm_notifier);
40234023
#endif
4024-
if (!test_bit(RTL8152_UNPLUG, &tp->flags))
4025-
napi_disable(&tp->napi);
4024+
napi_disable(&tp->napi);
40264025
clear_bit(WORK_ENABLE, &tp->flags);
40274026
usb_kill_urb(tp->intr_urb);
40284027
cancel_delayed_work_sync(&tp->schedule);
@@ -5353,7 +5352,6 @@ static int rtl8152_probe(struct usb_interface *intf,
53535352
return 0;
53545353

53555354
out1:
5356-
netif_napi_del(&tp->napi);
53575355
usb_set_intfdata(intf, NULL);
53585356
out:
53595357
free_netdev(netdev);
@@ -5368,7 +5366,6 @@ static void rtl8152_disconnect(struct usb_interface *intf)
53685366
if (tp) {
53695367
rtl_set_unplug(tp);
53705368

5371-
netif_napi_del(&tp->napi);
53725369
unregister_netdev(tp->netdev);
53735370
cancel_delayed_work_sync(&tp->hw_phy_work);
53745371
tp->rtl_ops.unload(tp);

0 commit comments

Comments
 (0)