diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-12-29 20:00:03 +0300 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-01-04 07:41:16 +0300 |
commit | 002c487119f2c740bad0a3acbd356d4a57d237c3 (patch) | |
tree | 697b5a549b3c78006f482a4d1bd669a4dcafd155 /drivers/ata | |
parent | 7574a8377c7afc5e5ccbb62d9602d25c033a0f1b (diff) | |
download | linux-002c487119f2c740bad0a3acbd356d4a57d237c3.tar.xz |
ata: libata-scsi: improve ata_scsiop_maint_in()
Allow translation of REPORT_SUPPORTED_OPERATION_CODES commands using
the command format 0x3, that is, checking support for commands that are
identified using an opcode and a service action.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e1c43f9f6bb2..46109bde8a04 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3266,11 +3266,12 @@ static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf) u8 supported = 0; unsigned int err = 0; - if (cdb[2] != 1) { + if (cdb[2] != 1 && cdb[2] != 3) { ata_dev_warn(dev, "invalid command format %d\n", cdb[2]); err = 2; goto out; } + switch (cdb[3]) { case INQUIRY: case MODE_SENSE: |