diff options
| author | Tyler Erickson <tyler.erickson@seagate.com> | 2022-06-02 16:51:12 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 18:45:18 +0200 |
| commit | 46557980e54604a5b1f314296031d0c53237bd84 (patch) | |
| tree | 1580141a462cf92a801f2a467f327676b5058322 | |
| parent | 2fff8dad2d0ab0e26e37bf1929dc6912deb423b8 (diff) | |
| download | linux-46557980e54604a5b1f314296031d0c53237bd84.tar.gz linux-46557980e54604a5b1f314296031d0c53237bd84.tar.bz2 linux-46557980e54604a5b1f314296031d0c53237bd84.zip | |
libata: fix translation of concurrent positioning ranges
commit 6d11acd452fd885ef6ace184c9c70bc863a8c72f upstream.
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: fe22e1c2f705 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/ata/libata-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 06c9d90238d9..0ea9c3115529 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2101,7 +2101,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; |
