Skip to content

Commit 6d11acd

Browse files
vonericsenDamien Le Moal
authored andcommitted
libata: fix translation of concurrent positioning ranges
Fixing the page length in the SCSI translation for the concurrent positioning ranges VPD page. It was writing starting in offset 3 rather than offset 2 where the MSB is supposed to start for the VPD page length. Cc: stable@vger.kernel.org Fixes: fe22e1c ("libata: support concurrent positioning ranges log") Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com> Reviewed-by: Muhammad Ahmad <muhammad.ahmad@seagate.com> Tested-by: Michael English <michael.english@seagate.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
1 parent c745dfc commit 6d11acd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/libata-scsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2125,7 +2125,7 @@ static unsigned int ata_scsiop_inq_b9(struct ata_scsi_args *args, u8 *rbuf)
21252125

21262126
/* SCSI Concurrent Positioning Ranges VPD page: SBC-5 rev 1 or later */
21272127
rbuf[1] = 0xb9;
2128-
put_unaligned_be16(64 + (int)cpr_log->nr_cpr * 32 - 4, &rbuf[3]);
2128+
put_unaligned_be16(64 + (int)cpr_log->nr_cpr * 32 - 4, &rbuf[2]);
21292129

21302130
for (i = 0; i < cpr_log->nr_cpr; i++, desc += 32) {
21312131
desc[0] = cpr_log->cpr[i].num;

0 commit comments

Comments
 (0)