Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe059f122fb9d1bd3a629d4215a4dde11df66f98
Commit:     fe059f122fb9d1bd3a629d4215a4dde11df66f98
Parent:     5986c3d305f497d3ff33d65e4d9ff6d00121407b
Author:     Darrick J. Wong <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 30 01:18:55 2007 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 11:15:55 2007 -0500

    [SCSI] sas_ata: Assign sas_task to scsi_cmnd to enable EH for ATA devices
    
    The SATL should connect the scsi_cmnd to the sas_task (despite the presence
    of libata) so that requests to abort scsi_cmnds headed to the ATA device
    can be processed by the EH and aborted correctly.  The abort status should
    still be propagated from sas -> ata -> scsi.
    
    Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/libsas/sas_ata.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index e164f58..b6535b0 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -119,6 +119,8 @@ static void sas_ata_task_done(struct sas_task *task)
        }
 
        qc->lldd_task = NULL;
+       if (qc->scsicmd)
+               ASSIGN_SAS_TASK(qc->scsicmd, NULL);
        ata_qc_complete(qc);
        spin_unlock_irqrestore(dev->sata_dev.ap->lock, flags);
 
@@ -184,6 +186,9 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd 
*qc)
                break;
        }
 
+       if (qc->scsicmd)
+               ASSIGN_SAS_TASK(qc->scsicmd, task);
+
        if (sas_ha->lldd_max_execute_num < 2)
                res = i->dft->lldd_execute_task(task, 1, GFP_ATOMIC);
        else
@@ -193,6 +198,8 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd 
*qc)
        if (res) {
                SAS_DPRINTK("lldd_execute_task returned: %d\n", res);
 
+               if (qc->scsicmd)
+                       ASSIGN_SAS_TASK(qc->scsicmd, NULL);
                sas_free_task(task);
                return AC_ERR_SYSTEM;
        }
-
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