Timestamp assertion compares int and unsigned long. Fails on 64 bit machines where unsigned long is 8 bytes instead of 4. Promote int (from scsi_cmnd.this_residual) to unsigned long (jiffies) so it is a proper comparison on both 32 bit and 64 bit architectures.

Tested on AMD64

Signed-off-by: Ken Witherow <[EMAIL PROTECTED]>


--- linux-2.6.23-gentoo-r2/drivers/scsi/advansys.c.orig 2007-11-21 
02:33:00.000000000 -0500
+++ linux-2.6.23-gentoo-r1/drivers/scsi/advansys.c      2007-11-21 
17:37:56.000000000 -0500
@@ -3497,7 +3497,7 @@ typedef struct scsi_cmnd REQ, *REQP;
      * If the request time stamp is less than the system time stamp, then \
      * maybe the system time stamp wrapped. Set the request time to zero.\
      */ \
-    if (REQPTIME(reqp) <= REQTIMESTAMP()) { \
+    if ((unsigned long) REQPTIME(reqp) <= REQTIMESTAMP()) { \
         REQPTIME(reqp) = REQTIMESTAMP() - REQPTIME(reqp); \
     } else { \
         /* Indicate an error occurred with the assertion. */ \
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to