netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net,1/2] hyperv: Fix a kernel warning from netvsc_linkstatus_callback()
@ 2013-04-05 21:44 Haiyang Zhang
  2013-04-05 21:44 ` [PATCH net,2/2] hyperv: Fix RNDIS send_completion code path Haiyang Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Haiyang Zhang @ 2013-04-05 21:44 UTC (permalink / raw)
  To: davem, netdev; +Cc: haiyangz, kys, olaf, jasowang, linux-kernel, devel

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>

---
 drivers/net/hyperv/netvsc_drv.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 5f85205..8341b62 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -241,13 +241,11 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
 
 	if (status == 1) {
 		netif_carrier_on(net);
-		netif_wake_queue(net);
 		ndev_ctx = netdev_priv(net);
 		schedule_delayed_work(&ndev_ctx->dwork, 0);
 		schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
 	} else {
 		netif_carrier_off(net);
-		netif_tx_disable(net);
 	}
 }
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-28  3:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05 21:44 [PATCH net,1/2] hyperv: Fix a kernel warning from netvsc_linkstatus_callback() Haiyang Zhang
2013-04-05 21:44 ` [PATCH net,2/2] hyperv: Fix RNDIS send_completion code path Haiyang Zhang
2013-04-08 16:16   ` David Miller
2013-04-08 16:16 ` [PATCH net,1/2] hyperv: Fix a kernel warning from netvsc_linkstatus_callback() David Miller
2013-05-23  8:44 ` [PATCH net, 1/2] " Richard Genoud
2013-05-23 13:14   ` Kernel v3.2 used in SlackWare 14.00 please, backport all needed patches " Victor Miasnikov
2013-05-28  3:10     ` Ben Hutchings
2013-05-23 14:51   ` Haiyang Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).