Commit 55be9f25 authored by Mohammed Gamal's avatar Mohammed Gamal Committed by David S. Miller

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: 7b2ee50c ("hv_netvsc: common detach logic")
Signed-off-by: default avatarMohammed Gamal <mgamal@redhat.com>
Reviewed-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df13c59b
......@@ -1288,7 +1288,7 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev,
rndis_device->link_state ? "down" : "up");
if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5)
return net_device;
goto out;
rndis_filter_query_link_speed(rndis_device, net_device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment