]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
hv_netvsc: only wake transmit queue if link is up
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 14 May 2018 22:32:10 +0000 (15:32 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:28:02 +0000 (12:28 +0200)
BugLink: http://bugs.launchpad.net/bugs/1783418
[ Commit f4950e4586dfc957e0a28226eeb992ddc049b5a2 upstream. ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/hyperv/netvsc_drv.c

index 6e99b2ee20211ed9dcee7425c0460c4ec2e3d952..592270a411c0b2a47a30491ab4906a4797e24a8d 100644 (file)
@@ -88,12 +88,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