Commit 80a6a5d6 authored by David S. Miller's avatar David S. Miller

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 0ee1f473 ("r8152: napi hangup fix after disconnect")
add a check to avoid using napi_disable after netif_napi_del. However,
the commit ffa9fec3 ("r8152: set RTL8152_UNPLUG only for real
disconnection") let the check useless.

Therefore, I revert commit 0ee1f473 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 092e22e5 973dc6cf
...@@ -4021,7 +4021,6 @@ static int rtl8152_close(struct net_device *netdev) ...@@ -4021,7 +4021,6 @@ static int rtl8152_close(struct net_device *netdev)
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
unregister_pm_notifier(&tp->pm_notifier); unregister_pm_notifier(&tp->pm_notifier);
#endif #endif
if (!test_bit(RTL8152_UNPLUG, &tp->flags))
napi_disable(&tp->napi); napi_disable(&tp->napi);
clear_bit(WORK_ENABLE, &tp->flags); clear_bit(WORK_ENABLE, &tp->flags);
usb_kill_urb(tp->intr_urb); usb_kill_urb(tp->intr_urb);
...@@ -5353,7 +5352,6 @@ static int rtl8152_probe(struct usb_interface *intf, ...@@ -5353,7 +5352,6 @@ static int rtl8152_probe(struct usb_interface *intf,
return 0; return 0;
out1: out1:
netif_napi_del(&tp->napi);
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
out: out:
free_netdev(netdev); free_netdev(netdev);
...@@ -5368,7 +5366,6 @@ static void rtl8152_disconnect(struct usb_interface *intf) ...@@ -5368,7 +5366,6 @@ static void rtl8152_disconnect(struct usb_interface *intf)
if (tp) { if (tp) {
rtl_set_unplug(tp); rtl_set_unplug(tp);
netif_napi_del(&tp->napi);
unregister_netdev(tp->netdev); unregister_netdev(tp->netdev);
cancel_delayed_work_sync(&tp->hw_phy_work); cancel_delayed_work_sync(&tp->hw_phy_work);
tp->rtl_ops.unload(tp); tp->rtl_ops.unload(tp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment