firewire: fix unloading of fw-ohci while devices are attached
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 20 Aug 2007 23:05:14 +0000 (01:05 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 25 Aug 2007 16:00:27 +0000 (18:00 +0200)
Fix panic in run_timer_softirq right after "modprobe -r firewire-ohci"
if a FireWire disk was attached and firewire-sbp2 loaded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-card.c

index 0aeab3218bb6d6b8c503b2f2386133e611f4a5f7..3e9719948a8e7817658496929115fe52bda45473 100644 (file)
@@ -510,9 +510,11 @@ fw_core_remove_card(struct fw_card *card)
        /* Set up the dummy driver. */
        card->driver = &dummy_driver;
 
-       fw_flush_transactions(card);
-
        fw_destroy_nodes(card);
+       flush_scheduled_work();
+
+       fw_flush_transactions(card);
+       del_timer_sync(&card->flush_timer);
 
        fw_card_put(card);
 }