diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2012-02-02 02:17:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-02 14:35:12 -0500 |
commit | 0a282538cc1977655004cdb2eb25dd2b63f20637 (patch) | |
tree | f9a55f827ff9609c2020b0163d65a6b151845092 /drivers/net/hyperv | |
parent | cb0a178c787d2bdf787d56e364becdb0eb4b4fab (diff) |
net/hyperv: Use netif_tx_disable() instead of netif_stop_queue() when necessary
For code path not on the xmit, use netif_tx_disable() instead of
netif_stop_queue() to ensure other CPUs are not doing xmit.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 9dccc7a3a220..69193fcb7648 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c | |||
@@ -123,7 +123,7 @@ static int netvsc_close(struct net_device *net) | |||
123 | struct hv_device *device_obj = net_device_ctx->device_ctx; | 123 | struct hv_device *device_obj = net_device_ctx->device_ctx; |
124 | int ret; | 124 | int ret; |
125 | 125 | ||
126 | netif_stop_queue(net); | 126 | netif_tx_disable(net); |
127 | 127 | ||
128 | ret = rndis_filter_close(device_obj); | 128 | ret = rndis_filter_close(device_obj); |
129 | if (ret != 0) | 129 | if (ret != 0) |
@@ -256,7 +256,7 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, | |||
256 | schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20)); | 256 | schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20)); |
257 | } else { | 257 | } else { |
258 | netif_carrier_off(net); | 258 | netif_carrier_off(net); |
259 | netif_stop_queue(net); | 259 | netif_tx_disable(net); |
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
@@ -337,7 +337,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu) | |||
337 | 337 | ||
338 | nvdev->start_remove = true; | 338 | nvdev->start_remove = true; |
339 | cancel_delayed_work_sync(&ndevctx->dwork); | 339 | cancel_delayed_work_sync(&ndevctx->dwork); |
340 | netif_stop_queue(ndev); | 340 | netif_tx_disable(ndev); |
341 | rndis_filter_device_remove(hdev); | 341 | rndis_filter_device_remove(hdev); |
342 | 342 | ||
343 | ndev->mtu = mtu; | 343 | ndev->mtu = mtu; |
@@ -460,7 +460,7 @@ static int netvsc_remove(struct hv_device *dev) | |||
460 | cancel_delayed_work_sync(&ndev_ctx->dwork); | 460 | cancel_delayed_work_sync(&ndev_ctx->dwork); |
461 | 461 | ||
462 | /* Stop outbound asap */ | 462 | /* Stop outbound asap */ |
463 | netif_stop_queue(net); | 463 | netif_tx_disable(net); |
464 | 464 | ||
465 | unregister_netdev(net); | 465 | unregister_netdev(net); |
466 | 466 | ||