diff mbox

[5/7] vxge: hotplug stall

Message ID 1292025782-16372-5-git-send-email-jon.mason@exar.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jon Mason Dec. 11, 2010, 12:03 a.m. UTC
When hot-unplugging a vxge adapter while running, the driver's remove
routine prints warning and then stalls the calling thread.  This is due
to vxge_remove calling vxge_device_unregister to unregister the netdev
before calling flush_scheduled_work clear any pending work.  Swapping
the order of these two functions resolves the issue.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
---
 drivers/net/vxge/vxge-main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller Dec. 11, 2010, 12:09 a.m. UTC | #1
From: Jon Mason <jon.mason@exar.com>
Date: Fri, 10 Dec 2010 18:03:00 -0600

> When hot-unplugging a vxge adapter while running, the driver's remove
> routine prints warning and then stalls the calling thread.  This is due
> to vxge_remove calling vxge_device_unregister to unregister the netdev
> before calling flush_scheduled_work clear any pending work.  Swapping
> the order of these two functions resolves the issue.
> 
> Signed-off-by: Jon Mason <jon.mason@exar.com>
> Signed-off-by: Ram Vepa <ram.vepa@exar.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 3ec8068..b771e4b 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -3439,11 +3439,11 @@  static void vxge_device_unregister(struct __vxge_hw_device *hldev)
 
 	strncpy(buf, dev->name, IFNAMSIZ);
 
+	flush_scheduled_work();
+
 	/* in 2.6 will call stop() if device is up */
 	unregister_netdev(dev);
 
-	flush_scheduled_work();
-
 	vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered",
 			buf);
 	vxge_debug_entryexit(vdev->level_trace,	"%s: %s:%d  Exiting...", buf,