Re: [PATCH v2 3/5] ata: libata-scsi: improve service action support in ata_scsi_report_supported_opcodes()

Hannes Reinecke <[email protected]>
Newsgroups org.kernel.vger.linux-ide
Message-ID <[email protected]>
On 7/2/26 8:34 AM, Damien Le Moal wrote:
> ata_scsi_report_supported_opcodes() is ignoring the service action
> specified in the SCSI command CDB, but the one command format must take
> this field into consideration. With the reporting options field set to 1,
> the REPORT SUPPORTED OPERATION CODES command must be failed if the
> specified opcode to check has service actions, while reporting option 3
> must match supported opcodes together with the specified service action.
> 
> Stop ignoring the service action by passing it to
> ata_scsi_cmd_is_supported() and searching for commands in the
> array of supported commands (ata_supported_cmds) using both the command
> opcode and service action.
> 
> Introduce the helper function ata_scsi_supported_cmd_use_sa() to determine
> if a particular command has service actions and use this function to fail
> a REPORT SUPPORTED OPERATION CODES command if such command is specified
> with reporting options 1.
> 
> Signed-off-by: Damien Le Moal <[email protected]>
> ---
>   drivers/ata/libata-scsi.c | 41 ++++++++++++++++++++++++++++++++-------
>   1 file changed, 34 insertions(+), 7 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.