Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12f26aa1b172a32604fedcb98d68c7aef268d6ad
Commit:     12f26aa1b172a32604fedcb98d68c7aef268d6ad
Parent:     fbb5423c1df99c846677480ce44588176352f7d9
Author:     Kristian Høgsberg <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 10 18:11:20 2007 -0400
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Thu Apr 12 00:18:57 2007 +0200

    firewire: Only free ORBs that completed the initial transaction.
    
    In some situations we can receive the ORB status write before we
    have received the ORB pointer write response.  When this happens,
    we assume that the fw_transaction is finished and free the ORB
    struct containing the fw_transaction.
    
    This fix make the status write logic only accept status writes
    for ORBs where the initial ORB pointer write transaction finished.
    
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-sbp2.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index a752523..c1e9316 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -293,7 +293,8 @@ sbp2_status_write(struct fw_card *card, struct fw_request 
*request,
        spin_lock_irqsave(&card->lock, flags);
        list_for_each_entry(orb, &sd->orb_list, link) {
                if (status_get_orb_high(status) == 0 &&
-                   status_get_orb_low(status) == orb->request_bus) {
+                   status_get_orb_low(status) == orb->request_bus &&
+                   orb->rcode == RCODE_COMPLETE) {
                        list_del(&orb->link);
                        break;
                }
@@ -968,6 +969,8 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, 
scsi_done_fn_t done)
                goto fail_alloc;
        }
 
+       /* Initialize rcode to something not RCODE_COMPLETE. */
+       orb->base.rcode = -1;
        orb->base.request_bus =
                dma_map_single(device->card->device, &orb->request,
                               sizeof orb->request, DMA_TO_DEVICE);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to