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