diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-30 04:18:55 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-18 12:15:55 -0400 |
commit | fe059f122fb9d1bd3a629d4215a4dde11df66f98 (patch) | |
tree | 7b857e0f57f64432e658cfd16dfe6531868bfca2 /drivers/scsi/libsas | |
parent | 5986c3d305f497d3ff33d65e4d9ff6d00121407b (diff) |
[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 <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | 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 e164f58f3859..b6535b073bf1 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) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | qc->lldd_task = NULL; | 121 | qc->lldd_task = NULL; |
122 | if (qc->scsicmd) | ||
123 | ASSIGN_SAS_TASK(qc->scsicmd, NULL); | ||
122 | ata_qc_complete(qc); | 124 | ata_qc_complete(qc); |
123 | spin_unlock_irqrestore(dev->sata_dev.ap->lock, flags); | 125 | spin_unlock_irqrestore(dev->sata_dev.ap->lock, flags); |
124 | 126 | ||
@@ -184,6 +186,9 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
184 | break; | 186 | break; |
185 | } | 187 | } |
186 | 188 | ||
189 | if (qc->scsicmd) | ||
190 | ASSIGN_SAS_TASK(qc->scsicmd, task); | ||
191 | |||
187 | if (sas_ha->lldd_max_execute_num < 2) | 192 | if (sas_ha->lldd_max_execute_num < 2) |
188 | res = i->dft->lldd_execute_task(task, 1, GFP_ATOMIC); | 193 | res = i->dft->lldd_execute_task(task, 1, GFP_ATOMIC); |
189 | else | 194 | else |
@@ -193,6 +198,8 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
193 | if (res) { | 198 | if (res) { |
194 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); | 199 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); |
195 | 200 | ||
201 | if (qc->scsicmd) | ||
202 | ASSIGN_SAS_TASK(qc->scsicmd, NULL); | ||
196 | sas_free_task(task); | 203 | sas_free_task(task); |
197 | return AC_ERR_SYSTEM; | 204 | return AC_ERR_SYSTEM; |
198 | } | 205 | } |