Skip to content

Commit fd5c07a

Browse files
haiyangzdavem330
authored andcommitted
hyperv: Fix a kernel warning from netvsc_linkstatus_callback()
The warning about local_bh_enable inside IRQ happens when disconnecting a virtual NIC. The reason for the warning is -- netif_tx_disable() is called when the NIC is disconnected. And it's called within irq context. netif_tx_disable() calls local_bh_enable() which displays warning if in irq. The fix is to remove the unnecessary netif_tx_disable & wake_queue() in the netvsc_linkstatus_callback(). Reported-by: Richard Genoud <richard.genoud@gmail.com> Tested-by: Long Li <longli@microsoft.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c988d1e commit fd5c07a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,11 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
241241

242242
if (status == 1) {
243243
netif_carrier_on(net);
244-
netif_wake_queue(net);
245244
ndev_ctx = netdev_priv(net);
246245
schedule_delayed_work(&ndev_ctx->dwork, 0);
247246
schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
248247
} else {
249248
netif_carrier_off(net);
250-
netif_tx_disable(net);
251249
}
252250
}
253251

0 commit comments

Comments
 (0)