summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/rndis_filter.c
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2014-12-01 21:28:39 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-12-09 01:24:11 (GMT)
commitc3582a2c4d0baf1fa3955c8b3d3d61308df474c7 (patch)
treebcff2477cb791564cd2189026c088ec69b1ee217 /drivers/net/hyperv/rndis_filter.c
parent6867b17b26d80cfd419e491141feb75082915979 (diff)
downloadlinux-c3582a2c4d0baf1fa3955c8b3d3d61308df474c7.tar.xz
hyperv: Add support for vNIC hot removal
This patch adds proper handling of the vNIC hot removal event, which includes a rescind-channel-offer message from the host side that triggers vNIC close and removal. In this case, the notices to the host during close and removal is not necessary because the channel is rescinded. This patch blocks these unnecessary messages, and lets vNIC removal process complete normally. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/rndis_filter.c')
-rw-r--r--drivers/net/hyperv/rndis_filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 7b2c5d1..ec0c40a 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -958,6 +958,9 @@ static int rndis_filter_close_device(struct rndis_device *dev)
return 0;
ret = rndis_filter_set_packet_filter(dev, 0);
+ if (ret == -ENODEV)
+ ret = 0;
+
if (ret == 0)
dev->state = RNDIS_DEV_INITIALIZED;