[PATCH 1/7] hpsa: fix transfer length 0 for 6-byte r/w commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For 6-byte r/w commands, transfer length 0 means 256 blocks of data,
not 0 block.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: Don Brace <don.brace@xxxxxxxx>
Cc: iss_storagedev@xxxxxx
Cc: storagedev@xxxxxxxx
Cc: linux-scsi@xxxxxxxxxxxxxxx
---
 drivers/scsi/hpsa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8895bc9..f1d667c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3326,6 +3326,8 @@ static int fixup_ioaccel_cdb(u8 *cdb, int *cdb_len)
 		if (*cdb_len == 6) {
 			block = (((u32) cdb[2]) << 8) | cdb[3];
 			block_cnt = cdb[4];
+			if (block_cnt == 0)
+				block_cnt = 256;
 		} else {
 			BUG_ON(*cdb_len != 12);
 			block = (((u32) cdb[2]) << 24) |
-- 
1.9.1

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux