Re: [PATCH v6 18/19] ata: libata: set read/write commands CDL index

Hannes Reinecke
2023-04-11T06:46:38Z

On 4/6/23 13:32, Niklas Cassel wrote:
> From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
>
> For devices supporting the command duration limits feature, translate
> the dld field of read and write operation to set the command duration
> limit index field of the command task file when the duration limit
> feature is enabled.
>
> The function ata_set_tf_cdl() is introduced to do this. For unqueued
> (non NCQ) read and write operations, this function sets the command
> duration limit index set as the lower 3 bits of the feature field.
> For queued NCQ read/write commands, the index is set as the lower
> 3 bits of the auxiliary field.
>
> The flag ATA_QCFLAG_HAS_CDL is introduced to indicate that a command
> taskfile has a non zero cdl field.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Co-developed-by: Niklas Cassel <niklas.cassel@wdc.com>
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
> ---
> drivers/ata/libata-core.c | 32 +++++++++++++++++++++++++++++---
> drivers/ata/libata-scsi.c | 16 +++++++++++++++-
> drivers/ata/libata.h | 2 +-
> include/linux/libata.h | 1 +
> 4 files changed, 46 insertions(+), 5 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman