Re: [PATCH v1 4/9] ata: libata-scsi: improve ata_get_xlat_func

Hannes Reinecke <[email protected]> Mon, 13 Jul 2026 11:33:38 +0200
Newsgroups gmane.linux.scsi,gmane.linux.ide
Message-ID <[email protected]>
On 7/6/26 8:56 AM, Damien Le Moal wrote:
> ata_get_xlat_func() is given only the opcode of a SCSI command to
> determine the ATA command to translate to. This makes it impossible to
> translate SCSI commands such as SERVICE ACTION IN which need a service
> action field to fully specify the command.
> 
> In preparation for supporting the translation of the SERVICE ACTION IN
> command with service actions different from the SAI_READ_CAPACITY_16 (READ
> CAPACITY 16), change ata_get_xlat_func() to take a pointer to a SCSI
> command CDB so that all fields of the SCSI command to translate can be
> easily inspected.
> 
> Signed-off-by: Damien Le Moal <[email protected]>
> ---
>   drivers/ata/libata-scsi.c | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
> 
Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
[email protected]                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich