Message ID | 1431760673-7180-7-git-send-email-akinobu.mita@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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) |
For 6-byte r/w commands, transfer length 0 means 256 blocks of data, not 0 block. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Kashyap Desai <kashyap.desai@avagotech.com> Cc: Sumit Saxena <sumit.saxena@avagotech.com> Cc: Uday Lingala <uday.lingala@avagotech.com> Cc: megaraidlinux.pdl@avagotech.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/megaraid/megaraid_mbox.c | 2 ++ 1 file changed, 2 insertions(+)