Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit facf1e4

Browse files
damien-lemoalgregkh
authored andcommittedOct 4, 2024
ata: libata-scsi: Fix ata_msense_control() CDL page reporting
commit 0e9a299 upstream. When the user requests the ALL_SUB_MPAGES mode sense page, ata_msense_control() adds the CDL_T2A_SUB_MPAGE twice instead of adding the CDL_T2A_SUB_MPAGE and CDL_T2B_SUB_MPAGE pages information. Correct the second call to ata_msense_control_spgt2() to report the CDL_T2B_SUB_MPAGE page. Fixes: 673b2fe ("scsi: ata: libata-scsi: Add support for CDL pages mode sense") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6ab95e2 commit facf1e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎drivers/ata/libata-scsi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@ static unsigned int ata_msense_control(struct ata_device *dev, u8 *buf,
23902390
case ALL_SUB_MPAGES:
23912391
n = ata_msense_control_spg0(dev, buf, changeable);
23922392
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2A_SUB_MPAGE);
2393-
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2A_SUB_MPAGE);
2393+
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2B_SUB_MPAGE);
23942394
n += ata_msense_control_ata_feature(dev, buf + n);
23952395
return n;
23962396
default:

0 commit comments

Comments
 (0)