From 6fa1b3a596a317b521d620c3093ed91e44926adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 4 Nov 2010 18:01:46 +0000 Subject: [PATCH] actually use the 64bits value when doing comparing, previously SCSI_6 were wronly used for some io requests. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39301 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/generic/scsi_periph/io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/generic/scsi_periph/io.cpp b/src/add-ons/kernel/generic/scsi_periph/io.cpp index 6779622dfb..98348f47d1 100644 --- a/src/add-ons/kernel/generic/scsi_periph/io.cpp +++ b/src/add-ons/kernel/generic/scsi_periph/io.cpp @@ -136,13 +136,13 @@ read_write(scsi_periph_device_info *device, scsi_ccb *request, numBlocks = 0x100; // no way to break the 21 bit address limit - if (pos > 0x200000) + if (offset > 0x200000) return B_BAD_VALUE; // don't allow transfer cross the 24 bit address limit // (I'm not sure whether this is allowed, but this way we // are sure to not ask for trouble) - if (pos < 0x100000) + if (offset < 0x100000) numBlocks = min_c(numBlocks, 0x100000 - pos); } @@ -164,7 +164,7 @@ read_write(scsi_periph_device_info *device, scsi_ccb *request, (request->flags & SCSI_ORDERED_QTAG) != 0 ? "yes" : "no"); // use shortest commands whenever possible - if (pos + numBlocks < 0x200000 && numBlocks <= 0x100) { + if (offset + numBlocks < 0x200000LL && numBlocks <= 0x100) { scsi_cmd_rw_6 *cmd = (scsi_cmd_rw_6 *)request->cdb; isReadWrite10 = false;