Commit 002c4871 authored by Damien Le Moal's avatar Damien Le Moal

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: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
parent 7574a837
...@@ -3266,11 +3266,12 @@ static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf) ...@@ -3266,11 +3266,12 @@ static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf)
u8 supported = 0; u8 supported = 0;
unsigned int err = 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]); ata_dev_warn(dev, "invalid command format %d\n", cdb[2]);
err = 2; err = 2;
goto out; goto out;
} }
switch (cdb[3]) { switch (cdb[3]) {
case INQUIRY: case INQUIRY:
case MODE_SENSE: case MODE_SENSE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment