Skip to content

Commit 0d6dd35

Browse files
shemmingerdavem330
authored andcommitted
netvsc: need napi scheduled during removal
Since rndis_halt_device waits until all outstanding sends and receives are completed. Netvsc device needs to still schedule NAPI to see those completions. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 115a731 commit 0d6dd35

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

drivers/net/hyperv/netvsc.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ static void free_netvsc_device(struct netvsc_device *nvdev)
9191
}
9292

9393

94-
static inline bool netvsc_channel_idle(const struct netvsc_device *net_device,
95-
u16 q_idx)
96-
{
97-
const struct netvsc_channel *nvchan = &net_device->chan_table[q_idx];
98-
99-
return atomic_read(&net_device->num_outstanding_recvs) == 0 &&
100-
atomic_read(&nvchan->queue_sends) == 0;
101-
}
102-
10394
static struct netvsc_device *get_outbound_net_device(struct hv_device *device)
10495
{
10596
struct netvsc_device *net_device = hv_device_to_netvsc_device(device);
@@ -1273,13 +1264,10 @@ void netvsc_channel_cb(void *context)
12731264
if (unlikely(!ndev))
12741265
return;
12751266

1276-
net_device = net_device_to_netvsc_device(ndev);
1277-
if (unlikely(net_device->destroy) &&
1278-
netvsc_channel_idle(net_device, q_idx))
1279-
return;
1280-
12811267
/* disable interupts from host */
12821268
hv_begin_read(&channel->inbound);
1269+
1270+
net_device = net_device_to_netvsc_device(ndev);
12831271
napi_schedule(&net_device->chan_table[q_idx].napi);
12841272
}
12851273

0 commit comments

Comments
 (0)