]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/hyperv: Use netif_tx_disable() instead of netif_stop_queue() when necessary
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 2 Feb 2012 07:17:59 +0000 (07:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Feb 2012 19:35:12 +0000 (14:35 -0500)
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>
drivers/net/hyperv/netvsc_drv.c

index 9dccc7a3a2202dcf04df0020a1bba4f4a9b584c7..69193fcb7648700da8b41cee49b0e10ae15edf6f 100644 (file)
@@ -123,7 +123,7 @@ static int netvsc_close(struct net_device *net)
        struct hv_device *device_obj = net_device_ctx->device_ctx;
        int ret;
 
-       netif_stop_queue(net);
+       netif_tx_disable(net);
 
        ret = rndis_filter_close(device_obj);
        if (ret != 0)
@@ -256,7 +256,7 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
                schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
        } else {
                netif_carrier_off(net);
-               netif_stop_queue(net);
+               netif_tx_disable(net);
        }
 }
 
@@ -337,7 +337,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
 
        nvdev->start_remove = true;
        cancel_delayed_work_sync(&ndevctx->dwork);
-       netif_stop_queue(ndev);
+       netif_tx_disable(ndev);
        rndis_filter_device_remove(hdev);
 
        ndev->mtu = mtu;
@@ -460,7 +460,7 @@ static int netvsc_remove(struct hv_device *dev)
        cancel_delayed_work_sync(&ndev_ctx->dwork);
 
        /* Stop outbound asap */
-       netif_stop_queue(net);
+       netif_tx_disable(net);
 
        unregister_netdev(net);