]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: common detach logic
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 20 Mar 2018 22:03:05 +0000 (15:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 16:45:09 +0000 (12:45 -0400)
commitcb3aa3606eeb3d74a08f4217898c854c17e0aa87
tree3056b5d027d819b98ce01e26128b3617b3a23e58
parent1e036cd3c68e70f50999feba05cc8f22cdd2ae69
hv_netvsc: common detach logic

Make common function for detaching internals of device
during changes to MTU and RSS. Make sure no more packets
are transmitted and all packets have been received before
doing device teardown.

Change the wait logic to be common and use usleep_range().

Changes transmit enabling logic so that transmit queues are disabled
during the period when lower device is being changed. And enabled
only after sub channels are setup. This avoids issue where it could
be that a packet was being sent while subchannel was not initialized.

Fixes: b285686f2732 ("hv_netvsc: fix deadlock on hotplug")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/hyperv/rndis_filter.c