]> asedeno.scripts.mit.edu Git - linux.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)
commit7b2ee50c0cd513a176a26a71f2989facdd75bfea
tree3056b5d027d819b98ce01e26128b3617b3a23e58
parent0ef58b0a05c127762f975c3dfe8b922e4aa87a29
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: 8195b1396ec8 ("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