[PATCH 4/7] scsi: trace: 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: linux-scsi@xxxxxxxxxxxxxxx
---
 drivers/scsi/scsi_trace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
index 08bb47b..104e817 100644
--- a/drivers/scsi/scsi_trace.c
+++ b/drivers/scsi/scsi_trace.c
@@ -35,6 +35,8 @@ scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len)
 	lba |=  (cdb[2] << 8);
 	lba |=   cdb[3];
 	txlen = cdb[4];
+	if (txlen == 0)
+		txlen = 256;
 
 	trace_seq_printf(p, "lba=%llu txlen=%llu",
 			 (unsigned long long)lba, (unsigned long long)txlen);
-- 
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