[haiku-commits] r39301 - haiku/trunk/src/add-ons/kernel/generic/scsi_periph

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 4 Nov 2010 19:01:46 +0100 (CET)

Author: korli
Date: 2010-11-04 19:01:46 +0100 (Thu, 04 Nov 2010)
New Revision: 39301
Changeset: http://dev.haiku-os.org/changeset/39301

Modified:
   haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp
Log:
actually use the 64bits value when doing comparing, previously SCSI_6 were 
wronly used for some io requests.


Modified: haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp   2010-11-04 
16:26:43 UTC (rev 39300)
+++ haiku/trunk/src/add-ons/kernel/generic/scsi_periph/io.cpp   2010-11-04 
18:01:46 UTC (rev 39301)
@@ -136,13 +136,13 @@
                                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 @@
                        (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;


Other related posts:

  • » [haiku-commits] r39301 - haiku/trunk/src/add-ons/kernel/generic/scsi_periph - korli