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 <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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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

+3-1
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)