summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_scsi_host.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-10-16 13:25:30 -0500
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 11:14:33 -0500
commit0281e02c5671f50701924465744edd3e2feb5d6f (patch)
treebd4f8ceeb0d9d3c47a227d495f2d4ac918a24d6e /drivers/scsi/libsas/sas_scsi_host.c
parent528fd55200ec135548e71aee43650bca92a041aa (diff)
downloadlinux-stable-0281e02c5671f50701924465744edd3e2feb5d6f.tar.gz
linux-stable-0281e02c5671f50701924465744edd3e2feb5d6f.tar.bz2
linux-stable-0281e02c5671f50701924465744edd3e2feb5d6f.zip
[SCSI] libsas: fixup NCQ for SATA disks
We actually had two problems: the one with the tag (which is fixed by zeroing the tag before sending the taskfile to the sequencer) but the other with the fact that we sent our first NCQ command to the device before the sequencer had been informed of the NCQ tagging capabilities. I fixed the latter by moving the rphy_add() to the correct point in the code after the NCQ capabilities are set up. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_scsi_host.c')
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 5ff14ed9baf6..0dc7c02b3837 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -812,6 +812,12 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
task->task_proto = SAS_PROTOCOL_STP;
task->task_done = sas_ata_task_done;
+ if (qc->tf.command == ATA_CMD_FPDMA_WRITE ||
+ qc->tf.command == ATA_CMD_FPDMA_READ) {
+ /* Need to zero out the tag libata assigned us */
+ qc->tf.nsect = 0;
+ }
+
ata_tf_to_fis(&qc->tf, (u8*)&task->ata_task.fis, 0);
task->uldd_task = qc;
if (is_atapi_taskfile(&qc->tf)) {