hv_netvsc: only wake transmit queue if link is up
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 2 Mar 2018 21:49:02 +0000 (13:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Mar 2018 03:18:20 +0000 (22:18 -0500)
Don't wake transmit queues if link is not up yet.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c

index c5584c2d440e033b649193b39435d0a458aaf694..fa6cf18e77194866a059f8a389e936ef6ffcf833 100644 (file)
@@ -91,12 +91,11 @@ static int netvsc_open(struct net_device *net)
                return ret;
        }
 
-       netif_tx_wake_all_queues(net);
-
        rdev = nvdev->extension;
-
-       if (!rdev->link_state)
+       if (!rdev->link_state) {
                netif_carrier_on(net);
+               netif_tx_wake_all_queues(net);
+       }
 
        if (vf_netdev) {
                /* Setting synthetic device up transparently sets