From 7b011a5ee2687a86fde25bd4e6fa94e9437e9780 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 29 May 2013 18:07:20 +0200 Subject: [PATCH] Fix scsi_cdb_read6() The maximum number of blocks that can be transferred at once via a READ6 command is 256 instead of 265. Signed-off-by: Bart Van Assche --- lib/scsi-lowlevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scsi-lowlevel.c b/lib/scsi-lowlevel.c index b953e94..483dc89 100644 --- a/lib/scsi-lowlevel.c +++ b/lib/scsi-lowlevel.c @@ -1400,7 +1400,7 @@ scsi_cdb_read6(uint32_t lba, uint32_t xferlen, int blocksize) int num_blocks; num_blocks = xferlen/blocksize; - if (num_blocks > 265) { + if (num_blocks > 256) { return NULL; }