netvsc: remove unnecessary lock on shutdown
The channel inbound lock was not being used at all by the netvsc device, but the spin_lock was helpful by providing necessary barrier before waiting. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
43c7bd1ffc
commit
00ecfb3b34
|
@ -926,8 +926,6 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
|
||||||
struct rndis_halt_request *halt;
|
struct rndis_halt_request *halt;
|
||||||
struct net_device_context *net_device_ctx = netdev_priv(dev->ndev);
|
struct net_device_context *net_device_ctx = netdev_priv(dev->ndev);
|
||||||
struct netvsc_device *nvdev = net_device_ctx->nvdev;
|
struct netvsc_device *nvdev = net_device_ctx->nvdev;
|
||||||
struct hv_device *hdev = net_device_ctx->device_ctx;
|
|
||||||
ulong flags;
|
|
||||||
|
|
||||||
/* Attempt to do a rndis device halt */
|
/* Attempt to do a rndis device halt */
|
||||||
request = get_rndis_request(dev, RNDIS_MSG_HALT,
|
request = get_rndis_request(dev, RNDIS_MSG_HALT,
|
||||||
|
@ -945,9 +943,10 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
|
||||||
dev->state = RNDIS_DEV_UNINITIALIZED;
|
dev->state = RNDIS_DEV_UNINITIALIZED;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
spin_lock_irqsave(&hdev->channel->inbound_lock, flags);
|
|
||||||
nvdev->destroy = true;
|
nvdev->destroy = true;
|
||||||
spin_unlock_irqrestore(&hdev->channel->inbound_lock, flags);
|
|
||||||
|
/* Force flag to be ordered before waiting */
|
||||||
|
wmb();
|
||||||
|
|
||||||
/* Wait for all send completions */
|
/* Wait for all send completions */
|
||||||
wait_event(nvdev->wait_drain, netvsc_device_idle(nvdev));
|
wait_event(nvdev->wait_drain, netvsc_device_idle(nvdev));
|
||||||
|
|
Loading…
Reference in New Issue