]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
authorNiklas Cassel <niklas.cassel@wdc.com>
Mon, 18 Sep 2023 20:24:50 +0000 (22:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 11:18:22 +0000 (13:18 +0200)
commit70df8b9c59bce2c239e24cdd792487b10a26ddc4
treefa042eb0753387f18c756dccaf31d1734ccb0d59
parenta7e0c10a8c33028811bf9592c1d27abbe174c796
ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES

commit 3ef600923521616ebe192c893468ad0424de2afb upstream.

For REPORT SUPPORTED OPERATION CODES command, the service action field is
defined as bits 0-4 in the second byte in the CDB. Bits 5-7 in the second
byte are reserved.

Only look at the service action field in the second byte when determining
if the MAINTENANCE IN opcode is a REPORT SUPPORTED OPERATION CODES command.

This matches how we only look at the service action field in the second
byte when determining if the SERVICE ACTION IN(16) opcode is a READ
CAPACITY(16) command (reserved bits 5-7 in the second byte are ignored).

Fixes: 7b2030942859 ("libata: Add support for SCT Write Same")
Cc: stable@vger.kernel.org
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/libata-scsi.c