Commit 80a6a5d62da9ec1a4a949c0f95baa80d7efbfef5
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 0ee1f4734967 ("r8152: napi hangup fix after disconnect") add a check to avoid using napi_disable after netif_napi_del. However, the commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real disconnection") let the check useless. Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect") first, and add another patch to fix it. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file Side-by-side Diff
drivers/net/usb/r8152.c
... | ... | @@ -4021,8 +4021,7 @@ |
4021 | 4021 | #ifdef CONFIG_PM_SLEEP |
4022 | 4022 | unregister_pm_notifier(&tp->pm_notifier); |
4023 | 4023 | #endif |
4024 | - if (!test_bit(RTL8152_UNPLUG, &tp->flags)) | |
4025 | - napi_disable(&tp->napi); | |
4024 | + napi_disable(&tp->napi); | |
4026 | 4025 | clear_bit(WORK_ENABLE, &tp->flags); |
4027 | 4026 | usb_kill_urb(tp->intr_urb); |
4028 | 4027 | cancel_delayed_work_sync(&tp->schedule); |
... | ... | @@ -5353,7 +5352,6 @@ |
5353 | 5352 | return 0; |
5354 | 5353 | |
5355 | 5354 | out1: |
5356 | - netif_napi_del(&tp->napi); | |
5357 | 5355 | usb_set_intfdata(intf, NULL); |
5358 | 5356 | out: |
5359 | 5357 | free_netdev(netdev); |
... | ... | @@ -5368,7 +5366,6 @@ |
5368 | 5366 | if (tp) { |
5369 | 5367 | rtl_set_unplug(tp); |
5370 | 5368 | |
5371 | - netif_napi_del(&tp->napi); | |
5372 | 5369 | unregister_netdev(tp->netdev); |
5373 | 5370 | cancel_delayed_work_sync(&tp->hw_phy_work); |
5374 | 5371 | tp->rtl_ops.unload(tp); |