Commit 6d11acd4 authored by Tyler Erickson's avatar Tyler Erickson Committed by Damien Le Moal

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: fe22e1c2 ("libata: support concurrent positioning ranges log")
Signed-off-by: default avatarTyler Erickson <tyler.erickson@seagate.com>
Reviewed-by: default avatarMuhammad Ahmad <muhammad.ahmad@seagate.com>
Tested-by: default avatarMichael English <michael.english@seagate.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent c745dfc5
......@@ -2125,7 +2125,7 @@ static unsigned int ata_scsiop_inq_b9(struct ata_scsi_args *args, u8 *rbuf)
/* SCSI Concurrent Positioning Ranges VPD page: SBC-5 rev 1 or later */
rbuf[1] = 0xb9;
put_unaligned_be16(64 + (int)cpr_log->nr_cpr * 32 - 4, &rbuf[3]);
put_unaligned_be16(64 + (int)cpr_log->nr_cpr * 32 - 4, &rbuf[2]);
for (i = 0; i < cpr_log->nr_cpr; i++, desc += 32) {
desc[0] = cpr_log->cpr[i].num;
......
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