]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
firewire: fw-sbp2: always enable IRQs before calling command ORB callback
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 25 Aug 2007 08:40:42 +0000 (10:40 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 16 Oct 2007 22:00:02 +0000 (00:00 +0200)
On IOMMU-less noncoherent architectures, orb->callback will memcpy the
whole SCSI command buffer for READ-like SCSI commands.  It is therefore
friendlier to enable IRQs before the call, like before patch "Add
ref-counting for sbp2 orbs".

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
drivers/firewire/fw-sbp2.c

index 238730f75db197f857636ef224736d205cd2b571..7ecc154a82746f7e43f046483410ed1827430ae7 100644 (file)
@@ -361,11 +361,12 @@ complete_transaction(struct fw_card *card, int rcode,
                orb->rcode = rcode;
        if (orb->rcode != RCODE_COMPLETE) {
                list_del(&orb->link);
+               spin_unlock_irqrestore(&card->lock, flags);
                orb->callback(orb, NULL);
+       } else {
+               spin_unlock_irqrestore(&card->lock, flags);
        }
 
-       spin_unlock_irqrestore(&card->lock, flags);
-
        kref_put(&orb->kref, free_orb);
 }