public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-scsi@vger.kernel.org, "James E.J. Bottomley" <JBottomley@odin.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Don Brace <don.brace@pmcs.com>,
	iss_storagedev@hp.com, storagedev@pmcs.com
Subject: [PATCH 1/7] hpsa: fix transfer length 0 for 6-byte r/w commands
Date: Sat, 16 May 2015 16:17:47 +0900	[thread overview]
Message-ID: <1431760673-7180-2-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1431760673-7180-1-git-send-email-akinobu.mita@gmail.com>

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: Don Brace <don.brace@pmcs.com>
Cc: iss_storagedev@hp.com
Cc: storagedev@pmcs.com
Cc: linux-scsi@vger.kernel.org
---
 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


  reply	other threads:[~2015-05-16  7:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-16  7:17 [PATCH 0/7] scsi: Fix transfer length 0 for 6-byte r/w commands Akinobu Mita
2015-05-16  7:17 ` Akinobu Mita [this message]
2015-05-16  7:17 ` [PATCH 2/7] 3w-xxxx: fix " Akinobu Mita
2015-05-16  7:17 ` [PATCH 3/7] 3w-9xxx: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 4/7] scsi: trace: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 5/7] staging: rts5208: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 6/7] megaraid_mbox: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 7/7] megaraid: " Akinobu Mita
2015-05-16 16:46 ` [PATCH 0/7] scsi: Fix " James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431760673-7180-2-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=JBottomley@odin.com \
    --cc=don.brace@pmcs.com \
    --cc=iss_storagedev@hp.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=storagedev@pmcs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox