patch-2.2.0-pre8 linux/drivers/scsi/NCR53c406a.c

Next file: linux/drivers/scsi/aha152x.c
Previous file: linux/drivers/scsi/ChangeLog.ncr53c8xx
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/drivers/scsi/NCR53c406a.c linux/drivers/scsi/NCR53c406a.c
@@ -656,10 +656,10 @@
 static void wait_intr() {
     int i = jiffies + WATCHDOG;
     
-    while(i>jiffies && !(inb(STAT_REG)&0xe0)) /* wait for a pseudo-interrupt */
+    while(time_after(i,jiffies) && !(inb(STAT_REG)&0xe0)) /* wait for a pseudo-interrupt */
         barrier();
     
-    if (i <= jiffies) {		/* Timed out */
+    if (time_before_eq(i,jiffies)) {		/* Timed out */
         rtrc(0);
         current_SC->result = DID_TIME_OUT << 16;
         current_SC->SCp.phase = idle;
@@ -983,9 +983,9 @@
     
     /* Wait for the interrupt to occur */
     i = jiffies + WATCHDOG;
-    while(i > jiffies && !(inb(STAT_REG) & 0x80))
+    while(time_after(i, jiffies) && !(inb(STAT_REG) & 0x80))
         barrier();
-    if (i <= jiffies) {		/* Timed out, must be hardware trouble */
+    if (time_before_eq(i, jiffies)) {		/* Timed out, must be hardware trouble */
         probe_irq_off(irqs);
         return -1;
     }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov