Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:28 +0200
commit448e55fe77925e3a787d60a42405589334e27e44 (patch)
tree4c6b0b554a76ea40f0a164674d9390332137afe0
parent90d838a75126f228ead0bc3ad5b8bb72f5ddfaa7 (diff)
hv_netvsc: Fix rndis_filter_close error during netvsc_remove
-rw-r--r--patches.suse/msft-hv-1449-hv_netvsc-Fix-rndis_filter_close-error-during-netvsc.patch48
-rw-r--r--series.conf1
2 files changed, 49 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1449-hv_netvsc-Fix-rndis_filter_close-error-during-netvsc.patch b/patches.suse/msft-hv-1449-hv_netvsc-Fix-rndis_filter_close-error-during-netvsc.patch
new file mode 100644
index 0000000000..ed71f30a29
--- /dev/null
+++ b/patches.suse/msft-hv-1449-hv_netvsc-Fix-rndis_filter_close-error-during-netvsc.patch
@@ -0,0 +1,48 @@
+From: Haiyang Zhang <haiyangz@microsoft.com>
+Date: Thu, 24 Aug 2017 11:50:02 -0700
+Patch-mainline: v4.14-rc1
+Subject: hv_netvsc: Fix rndis_filter_close error during netvsc_remove
+Git-commit: c6f71c418fcc46f59fc87ac93ce9336c12d7898b
+References: fate#323887
+
+We now remove rndis filter before unregister_netdev(), which calls
+device close. It involves closing rndis filter already removed.
+
+This patch fixes this error.
+
+Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/net/hyperv/netvsc_drv.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
+--- a/drivers/net/hyperv/netvsc_drv.c
++++ b/drivers/net/hyperv/netvsc_drv.c
+@@ -119,12 +119,16 @@ static int netvsc_close(struct net_device *net)
+ struct net_device *vf_netdev
+ = rtnl_dereference(net_device_ctx->vf_netdev);
+ struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev);
+- int ret;
++ int ret = 0;
+ u32 aread, i, msec = 10, retry = 0, retry_max = 20;
+ struct vmbus_channel *chn;
+
+ netif_tx_disable(net);
+
++ /* No need to close rndis filter if it is removed already */
++ if (!nvdev)
++ goto out;
++
+ ret = rndis_filter_close(nvdev);
+ if (ret != 0) {
+ netdev_err(net, "unable to close device (ret %d).\n", ret);
+@@ -163,6 +167,7 @@ static int netvsc_close(struct net_device *net)
+ ret = -ETIMEDOUT;
+ }
+
++out:
+ if (vf_netdev)
+ dev_close(vf_netdev);
+
diff --git a/series.conf b/series.conf
index 8ed2997f6f..0d8a7975d6 100644
--- a/series.conf
+++ b/series.conf
@@ -1699,6 +1699,7 @@
patches.suse/msft-hv-1446-hv_netvsc-Clean-up-unused-parameter-from-netvsc_get_.patch
patches.suse/msft-hv-1447-hv_netvsc-Clean-up-unused-parameter-from-netvsc_get_.patch
patches.suse/msft-hv-1448-hv_netvsc-Add-ethtool-handler-to-set-and-get-UDP-has.patch
+ patches.suse/msft-hv-1449-hv_netvsc-Fix-rndis_filter_close-error-during-netvsc.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch