aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jon.mason@exar.com>2010-12-10 09:03:00 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 19:08:23 -0500
commit9c1638871671721e8f3693a0dfbb0e2e05b08742 (patch)
tree476716914dc988ffe8f91435f2b25db05ef2896b
parent2e41f6449c561e6e3f572e11d0f2240bd51104db (diff)
vxge: hotplug stall
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/vxge/vxge-main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 3ec80684cd5f..b771e4b2ca9e 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)
3439 3439
3440 strncpy(buf, dev->name, IFNAMSIZ); 3440 strncpy(buf, dev->name, IFNAMSIZ);
3441 3441
3442 flush_scheduled_work();
3443
3442 /* in 2.6 will call stop() if device is up */ 3444 /* in 2.6 will call stop() if device is up */
3443 unregister_netdev(dev); 3445 unregister_netdev(dev);
3444 3446
3445 flush_scheduled_work();
3446
3447 vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered", 3447 vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered",
3448 buf); 3448 buf);
3449 vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d Exiting...", buf, 3449 vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d Exiting...", buf,