summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/netvsc.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2020-06-16 18:25:03 +0200
committerTony Lindgren <tony@atomide.com>2020-06-16 18:25:03 +0200
commit07c7b547a79605f1041d55b84d91a4a4d9c5b363 (patch)
treed98c1adacc8c65b475c325b427e54b8205b0013d /drivers/net/hyperv/netvsc.c
parentRevert "bus: ti-sysc: Increase max softreset wait" (diff)
parentLinux 5.8-rc1 (diff)
downloadlinux-07c7b547a79605f1041d55b84d91a4a4d9c5b363.tar.xz
linux-07c7b547a79605f1041d55b84d91a4a4d9c5b363.zip
Merge tag 'v5.8-rc1' into fixes
Linux 5.8-rc1
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r--drivers/net/hyperv/netvsc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index ca68aa1df801..41f5cf0bb997 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -636,9 +636,12 @@ void netvsc_device_remove(struct hv_device *device)
RCU_INIT_POINTER(net_device_ctx->nvdev, NULL);
- /* And disassociate NAPI context from device */
- for (i = 0; i < net_device->num_chn; i++)
+ /* Disable NAPI and disassociate its context from the device. */
+ for (i = 0; i < net_device->num_chn; i++) {
+ /* See also vmbus_reset_channel_cb(). */
+ napi_disable(&net_device->chan_table[i].napi);
netif_napi_del(&net_device->chan_table[i].napi);
+ }
/*
* At this point, no one should be accessing net_device