Skip to content

Commit

Permalink
hv_netvsc: Fix a network regression after ifdown/ifup
Browse files Browse the repository at this point in the history
[ Upstream commit 52acf73 ]

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: 7b2ee50 ("hv_netvsc: common detach logic")
Signed-off-by: Dexuan Cui <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
dcui authored and gregkh committed Jun 26, 2018
1 parent 5320e03 commit 244c10f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,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
Expand Down

0 comments on commit 244c10f

Please sign in to comment.