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: Kashyap Desai <kashyap.desai@xxxxxxxxxxxxx> Cc: Sumit Saxena <sumit.saxena@xxxxxxxxxxxxx> Cc: Uday Lingala <uday.lingala@xxxxxxxxxxxxx> Cc: megaraidlinux.pdl@xxxxxxxxxxxxx Cc: linux-scsi@xxxxxxxxxxxxxxx --- drivers/scsi/megaraid/megaraid_mbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index f0987f2..bed00d4 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -1691,6 +1691,8 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) */ if (scp->cmd_len == 6) { mbox->numsectors = (uint32_t)scp->cmnd[4]; + if (mbox->numsectors == 0) + mbox->numsectors = 256; mbox->lba = ((uint32_t)scp->cmnd[1] << 16) | ((uint32_t)scp->cmnd[2] << 8) | -- 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