scsi: ata: libata-scsi: Handle CDL bits in ata_scsiop_maint_in()
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 11 May 2023 01:13:48 +0000 (03:13 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 22 May 2023 21:05:20 +0000 (17:05 -0400)
commit0de558015286374443cb1920d32bbf54bd045eb7
tree14be4837c9cd1796d1726c597a3969ec62462834
parent62e4a60e0cdb540b314061469e025fd834ff300c
scsi: ata: libata-scsi: Handle CDL bits in ata_scsiop_maint_in()

For a scsi MAINTENANCE_IN/MI_REPORT_SUPPORTED_OPERATION_CODES operation,
add the translation of the rwcdlp and cdlp bits for the READ 16 and WRITE
16 commands. If the ATA device does not support command duration limits,
these bits are always 0. If the ATA device supports command duration
limits, the rwcdlp bit is set to 1 for READ 16 and WRITE 16 and the cdlp
bits are set to 0x1 for READ 16 and 0x2 for WRITE 16. These correspond to
the T2A mode page containing the read descriptors and to the T2B mode page
containing the write descriptors, as defined in SAT-5.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20230511011356.227789-16-nks@flawful.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-scsi.c