]>
Commit | Line | Data |
---|---|---|
684f36d1 GKH |
1 | From foo@baz Tue May 22 20:10:42 CEST 2018 |
2 | From: Mohammed Gamal <mgamal@redhat.com> | |
3 | Date: Mon, 14 May 2018 15:32:22 -0700 | |
4 | Subject: hv_netvsc: Fix net device attach on older Windows hosts | |
5 | ||
6 | From: Mohammed Gamal <mgamal@redhat.com> | |
7 | ||
8 | [ Commit 55be9f25be1ca5bda75c39808fc77e42691bc07f upstream. ] | |
9 | ||
10 | On older windows hosts the net_device instance is returned to | |
11 | the caller of rndis_filter_device_add() without having the presence | |
12 | bit set first. This would cause any subsequent calls to network device | |
13 | operations (e.g. MTU change, channel change) to fail after the device | |
14 | is detached once, returning -ENODEV. | |
15 | ||
16 | Instead of returning the device instabce, we take the exit path where | |
17 | we call netif_device_attach() | |
18 | ||
19 | Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") | |
20 | Signed-off-by: Mohammed Gamal <mgamal@redhat.com> | |
21 | Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com> | |
22 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | drivers/net/hyperv/rndis_filter.c | 2 +- | |
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
27 | ||
28 | --- a/drivers/net/hyperv/rndis_filter.c | |
29 | +++ b/drivers/net/hyperv/rndis_filter.c | |
30 | @@ -1276,7 +1276,7 @@ struct netvsc_device *rndis_filter_devic | |
31 | rndis_device->link_state ? "down" : "up"); | |
32 | ||
33 | if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5) | |
34 | - return net_device; | |
35 | + goto out; | |
36 | ||
37 | rndis_filter_query_link_speed(rndis_device, net_device); | |
38 |