]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix net device attach on older Windows hosts
authorMohammed Gamal <mgamal@redhat.com>
Wed, 9 May 2018 08:17:34 +0000 (10:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2018 19:37:00 +0000 (15:37 -0400)
commit3df9085b90fe6165b36e5beeaa54c6c0b4a94e6f
tree47291791e5b1ad3165e217a0daa1d4a75bf51529
parent8e8cc0913d1395560a4ff05fa061bb4312ac98c6
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: 467e8847a1ac ("hv_netvsc: common detach logic")
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/rndis_filter.c