RE: [PATCH] In the ioaccel path, the calculation of the starting

2016-09-16 Thread Don Brace
> -Original Message-
> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-
> ow...@vger.kernel.org] On Behalf Of Don Brace
> Sent: Friday, September 16, 2016 2:56 PM
> To: j...@linux.vnet.ibm.com; John Hall; Kevin Barnett; Mahesh
> Rajashekhara; h...@infradead.org; Scott Teel; Viswas G; Justin Lindley; Scott
> Benesh; elli...@hpe.com
> Cc: linux-scsi@vger.kernel.org
> Subject: [PATCH] In the ioaccel path, the calculation of the starting
> 
> EXTERNAL EMAIL
> 
> 
> From: kevin Barnett 
> 
> LBA for READ(6)/WRITE(6) SCSI commands does not take
> into account the most significant 5 bits of the
> LBA: it only uses the least significant 16 bits of
> the starting LBA.
> 
> Reported-by: Mahesh Rajashekhara
> 
> Signed-off-by: Kevin Barnett 
> Signed-off-by: Don Brace 
> ---
Sorry forgot title, resending as V1

> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] In the ioaccel path, the calculation of the starting

2016-09-16 Thread Don Brace
From: kevin Barnett 

LBA for READ(6)/WRITE(6) SCSI commands does not take
into account the most significant 5 bits of the
LBA: it only uses the least significant 16 bits of
the starting LBA.

Reported-by: Mahesh Rajashekhara 
Signed-off-by: Kevin Barnett 
Signed-off-by: Don Brace 
---
 drivers/scsi/smartpqi/smartpqi_init.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c 
b/drivers/scsi/smartpqi/smartpqi_init.c
index 52cfa26..a535b26 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -1954,7 +1954,8 @@ static int pqi_raid_bypass_submit_scsi_cmd(struct 
pqi_ctrl_info *ctrl_info,
is_write = true;
/* fall through */
case READ_6:
-   first_block = (u64)get_unaligned_be16(&scmd->cmnd[2]);
+   first_block = (u64)(((scmd->cmnd[1] & 0x1f) << 16) |
+   (scmd->cmnd[2] << 8) | scmd->cmnd[3]);
block_cnt = (u32)scmd->cmnd[4];
if (block_cnt == 0)
block_cnt = 256;

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html