On 4/6/23 03:26, Igor Pylypiv wrote: > On Tue, Apr 04, 2023 at 08:24:23PM +0200, Niklas Cassel wrote: >> From: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> >> >> 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 2 bits of the feature field. >> For queued NCQ read/write commands, the index is set as the lower >> 2 bits of the auxiliary field. > > CDL index is lower 3 bits, not 2 bits. Yes, typo. We will correct that. > >> >> 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@xxxxxxxxxxxxxxxxxx> >> Co-developed-by: Niklas Cassel <niklas.cassel@xxxxxxx> >> Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx> >> --- >> 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: Igor Pylypiv <ipylypiv@xxxxxxxxxx> Thanks.