Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Commit

Permalink
Merge branch 'r8152-fix-side-effect'
Browse files Browse the repository at this point in the history
Hayes Wang says:

====================
r8152: fix side effect

v3:
Update the commit message for patch GrapheneOS#1.

v2:
Replace patch GrapheneOS#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 <davem@davemloft.net>
  • Loading branch information
davem330 committed Aug 28, 2019
2 parents 092e22e + 973dc6c commit 80a6a5d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 80a6a5d

Please sign in to comment.