Skip to content

Commit 0e9a299

Browse files
committed
ata: libata-scsi: Fix ata_msense_control() CDL page reporting
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: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]>
1 parent 03a9cfc commit 0e9a299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libata-scsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,7 +2350,7 @@ static unsigned int ata_msense_control(struct ata_device *dev, u8 *buf,
23502350
case ALL_SUB_MPAGES:
23512351
n = ata_msense_control_spg0(dev, buf, changeable);
23522352
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2A_SUB_MPAGE);
2353-
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2A_SUB_MPAGE);
2353+
n += ata_msense_control_spgt2(dev, buf + n, CDL_T2B_SUB_MPAGE);
23542354
n += ata_msense_control_ata_feature(dev, buf + n);
23552355
return n;
23562356
default:

0 commit comments

Comments
 (0)