Skip to content

Commit 7287501

Browse files
ipylypivmartinkpetersen
authored andcommitted
scsi: libsas: Add return_fis_on_success to sas_ata_task
Set return_fis_on_success when libata requests result taskfile. For Command Duration Limits policy 0xD (command completes without an error) libata needs FIS in order to detect the ATA_SENSE bit and read the Sense Data for Successful NCQ Commands log (0Fh). Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Link: https://lore.kernel.org/r/20230819213040.1101044-2-ipylypiv@google.com Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 06c2afb commit 7287501

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/scsi/libsas/sas_ata.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
207207
task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
208208
task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol);
209209

210+
if (qc->flags & ATA_QCFLAG_RESULT_TF)
211+
task->ata_task.return_fis_on_success = 1;
212+
210213
if (qc->scsicmd)
211214
ASSIGN_SAS_TASK(qc->scsicmd, task);
212215

include/scsi/libsas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ struct sas_ata_task {
550550
u8 use_ncq:1;
551551
u8 set_affil_pol:1;
552552
u8 stp_affil_pol:1;
553+
u8 return_fis_on_success:1;
553554

554555
u8 device_control_reg_update:1;
555556

0 commit comments

Comments
 (0)