Skip to content

Commit 244c10f

Browse files
dcuigregkh
authored andcommitted
hv_netvsc: Fix a network regression after ifdown/ifup
[ 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]>
1 parent 5320e03 commit 244c10f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ static int netvsc_open(struct net_device *net)
123123
}
124124

125125
rdev = nvdev->extension;
126-
if (!rdev->link_state)
126+
if (!rdev->link_state) {
127127
netif_carrier_on(net);
128+
netif_tx_wake_all_queues(net);
129+
}
128130

129131
if (vf_netdev) {
130132
/* Setting synthetic device up transparently sets

0 commit comments

Comments
 (0)