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 commit0ee1f47349
("r8152: napi hangup fix after disconnect") add a check to avoid using napi_disable after netif_napi_del. However, the commitffa9fec30c
("r8152: set RTL8152_UNPLUG only for real disconnection") let the check useless. Therefore, I revert commit0ee1f47349
("r8152: napi hangup fix after disconnect") first, and add another patch to fix it. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
80a6a5d62d
|
@ -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);
|
||||
|
@ -5353,7 +5352,6 @@ static int rtl8152_probe(struct usb_interface *intf,
|
|||
return 0;
|
||||
|
||||
out1:
|
||||
netif_napi_del(&tp->napi);
|
||||
usb_set_intfdata(intf, NULL);
|
||||
out:
|
||||
free_netdev(netdev);
|
||||
|
@ -5368,7 +5366,6 @@ static void rtl8152_disconnect(struct usb_interface *intf)
|
|||
if (tp) {
|
||||
rtl_set_unplug(tp);
|
||||
|
||||
netif_napi_del(&tp->napi);
|
||||
unregister_netdev(tp->netdev);
|
||||
cancel_delayed_work_sync(&tp->hw_phy_work);
|
||||
tp->rtl_ops.unload(tp);
|
||||
|
|
Loading…
Reference in New Issue