Re: [PATCH v2 4/5] ata: libata-scsi: support reporting options 2 in REPORT SUPPORTED OPERATION CODES
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: > Add support for the reporting options value 2 of the in REPORT SUPPORTED > OPERATION CODES command in ata_scsi_report_supported_opcodes(). With this > reporting option, the specified opcode to check must have a service > action. Use ata_scsi_supported_cmd_has_sa() to check for this and fill the > command reply buffer using the one command format based on the command > support. > > Signed-off-by: Damien Le Moal <[email protected]> > --- > drivers/ata/libata-scsi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > index 86ac41a7d81a..e75ed573e234 100644 > --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -3737,6 +3737,13 @@ static unsigned int ata_scsi_report_supported_opcodes(struct ata_device *dev, > return 0; > } > break; > + case 2: > + /* One command format, must have sa. */ > + if (!ata_scsi_supported_cmd_use_sa(cdb[3])) { > + ata_scsi_set_invalid_field(dev, cmd, 3, 0xff); > + return 0; > + } > + fallthrough; > case 3: > /* One command format */ > sa = get_unaligned_be16(&cdb[4]); 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