diff options
author | Dexuan Cui <decui@microsoft.com> | 2018-06-06 21:32:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-07 16:24:51 -0400 |
commit | 52acf73b6e9a6962045feb2ba5a8921da2201915 (patch) | |
tree | 12b72bd842a25fc676842031e26e3ed47fa0f602 | |
parent | fd3a88625844907151737fc3b4201676effa6d27 (diff) | |
download | linux-52acf73b6e9a6962045feb2ba5a8921da2201915.tar.gz linux-52acf73b6e9a6962045feb2ba5a8921da2201915.tar.bz2 linux-52acf73b6e9a6962045feb2ba5a8921da2201915.zip |
hv_netvsc: Fix a network regression after ifdown/ifup
Recently people reported the NIC stops working after
"ifdown eth0; ifup eth0". It turns out in this case the TX queues are not
enabled, after the refactoring of the common detach logic: when the NIC
has sub-channels, usually we enable all the TX queues after all
sub-channels are set up: see rndis_set_subchannel() ->
netif_device_attach(), but in the case of "ifdown eth0; ifup eth0" where
the number of channels doesn't change, we also must make sure the TX queues
are enabled. The patch fixes the regression.
Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index bef4d55a108c..8eec156418ea 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -127,8 +127,10 @@ static int netvsc_open(struct net_device *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 |