aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-02-06 14:49:32 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:02:51 -0500
commit730c32f58ba81b3a4fe6d19c7d9e9829dd96d363 (patch)
tree79149d002b095ca27582d4d7ef00c8eefec67170 /drivers/firewire/fw-sbp2.c
parent72e318e07e1fa9840bfdd5788421fc6dc51a93de (diff)
firewire: Implement proper transaction cancelation.
Drivers such as fw-sbp2 had no way to properly cancel in-progress transactions, which could leave a pending transaction or an unset packet in the low-level queues after kfree'ing the containing structure. fw_cancel_transaction() lets drivers cancel a submitted transaction. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 54cad3a5dfb8..bb133398feec 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -348,6 +348,9 @@ static void sbp2_cancel_orbs(struct fw_unit *unit)
348 spin_unlock_irqrestore(&device->card->lock, flags); 348 spin_unlock_irqrestore(&device->card->lock, flags);
349 349
350 list_for_each_entry_safe(orb, next, &list, link) { 350 list_for_each_entry_safe(orb, next, &list, link) {
351 if (fw_cancel_transaction(device->card, &orb->t) == 0)
352 continue;
353
351 orb->rcode = RCODE_CANCELLED; 354 orb->rcode = RCODE_CANCELLED;
352 orb->callback(orb, NULL); 355 orb->callback(orb, NULL);
353 } 356 }