]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
firewire: warn on unfinished transactions during card removal
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 12 Jul 2008 12:51:18 +0000 (14:51 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 14 Jul 2008 11:06:04 +0000 (13:06 +0200)
After card->done and card->work are completed, any remaining pending
request would be a bug.  We cannot safely complete a transaction at
that point anymore.

IOW card users must not drop their last fw_card reference (usually
indirect references through fw_device references) before their last
outbound transaction through that card was finished.

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

index da873d795aad94bccf9e88a58a4b9bde9821daf1..bbd73a406e537106a2eeda4ba4a2ba1a543b030d 100644 (file)
@@ -539,7 +539,7 @@ fw_core_remove_card(struct fw_card *card)
        wait_for_completion(&card->done);
 
        cancel_delayed_work_sync(&card->work);
-       fw_flush_transactions(card);
+       WARN_ON(!list_empty(&card->transaction_list));
        del_timer_sync(&card->flush_timer);
 }
 EXPORT_SYMBOL(fw_core_remove_card);