Skip to content

Commit 55be9f2

Browse files
Mohammed Gamaldavem330
authored andcommitted
hv_netvsc: Fix net device attach on older Windows hosts
On older windows hosts the net_device instance is returned to the caller of rndis_filter_device_add() without having the presence bit set first. This would cause any subsequent calls to network device operations (e.g. MTU change, channel change) to fail after the device is detached once, returning -ENODEV. Instead of returning the device instabce, we take the exit path where we call netif_device_attach() Fixes: 7b2ee50 ("hv_netvsc: common detach logic") Signed-off-by: Mohammed Gamal <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent df13c59 commit 55be9f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/hyperv/rndis_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev,
12881288
rndis_device->link_state ? "down" : "up");
12891289

12901290
if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5)
1291-
return net_device;
1291+
goto out;
12921292

12931293
rndis_filter_query_link_speed(rndis_device, net_device);
12941294

0 commit comments

Comments
 (0)