aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-card.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-04-27 03:07:00 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-05-18 18:26:30 -0400
commit5c40cbfefa828208c671e2f58789e4dd04f79563 (patch)
treeaa7c38eb0c9e19ee0153a1764b24c67abaf5746d /drivers/firewire/core-card.c
parent753a8970f68594ea69c5fc13fbca18dbd9402996 (diff)
firewire: core: use separate timeout for each transaction
Using a single timeout for all transaction that need to be flushed does not work if the submission of new transactions can defer the timeout indefinitely into the future. We need to have timeouts that do not change due to other transactions; the simplest way to do this is with a separate timer for each transaction. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (+ one lockdep annotation)
Diffstat (limited to 'drivers/firewire/core-card.c')
-rw-r--r--drivers/firewire/core-card.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index 42cf911b73cf..9dcb30466ec0 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -30,7 +30,6 @@
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/spinlock.h> 32#include <linux/spinlock.h>
33#include <linux/timer.h>
34#include <linux/workqueue.h> 33#include <linux/workqueue.h>
35 34
36#include <asm/atomic.h> 35#include <asm/atomic.h>
@@ -408,13 +407,6 @@ static void fw_card_bm_work(struct work_struct *work)
408 fw_card_put(card); 407 fw_card_put(card);
409} 408}
410 409
411static void flush_timer_callback(unsigned long data)
412{
413 struct fw_card *card = (struct fw_card *)data;
414
415 fw_flush_transactions(card);
416}
417
418void fw_card_initialize(struct fw_card *card, 410void fw_card_initialize(struct fw_card *card,
419 const struct fw_card_driver *driver, 411 const struct fw_card_driver *driver,
420 struct device *device) 412 struct device *device)
@@ -433,8 +425,6 @@ void fw_card_initialize(struct fw_card *card,
433 init_completion(&card->done); 425 init_completion(&card->done);
434 INIT_LIST_HEAD(&card->transaction_list); 426 INIT_LIST_HEAD(&card->transaction_list);
435 spin_lock_init(&card->lock); 427 spin_lock_init(&card->lock);
436 setup_timer(&card->flush_timer,
437 flush_timer_callback, (unsigned long)card);
438 428
439 card->local_node = NULL; 429 card->local_node = NULL;
440 430
@@ -559,7 +549,6 @@ void fw_core_remove_card(struct fw_card *card)
559 wait_for_completion(&card->done); 549 wait_for_completion(&card->done);
560 550
561 WARN_ON(!list_empty(&card->transaction_list)); 551 WARN_ON(!list_empty(&card->transaction_list));
562 del_timer_sync(&card->flush_timer);
563} 552}
564EXPORT_SYMBOL(fw_core_remove_card); 553EXPORT_SYMBOL(fw_core_remove_card);
565 554