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>
 
        task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
        task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol);
 
+       if (qc->flags & ATA_QCFLAG_RESULT_TF)
+               task->ata_task.return_fis_on_success = 1;
+
        if (qc->scsicmd)
                ASSIGN_SAS_TASK(qc->scsicmd, task);
 
 
        u8     use_ncq:1;
        u8     set_affil_pol:1;
        u8     stp_affil_pol:1;
+       u8     return_fis_on_success:1;
 
        u8     device_control_reg_update:1;