[3994] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

2.1.103 patch to remove spin loop in aha1542 detection

daemon@ATHENA.MIT.EDU (Keith Owens)
Sat May 23 19:55:52 1998

From: Keith Owens <kaos@ocs.com.au>
To: linux-kernel@vger.rutgers.edu, linux-scsi@vger.rutgers.edu
Cc: torvalds@transmeta.com
Date: 	Sun, 24 May 1998 09:44:13 +1000

This is against 2.1.103, it fits pre-2.1.104-1.  AHA1542 detection can
spin because jiffies are not being updated.  Thanks to Ingo Molnar for
the suggestion.

Index: linux/drivers/scsi/aha1542.c
--- linux/drivers/scsi/aha1542.c.orig Thu, 16 Apr 1998 12:37:37 +1000 keith (linux-2.1/u/35_aha1542.c 1.3.1.1 644) 103.3
+++ linux/drivers/scsi/aha1542.c      Sun, 24 May 1998 09:22:22 +1000 keith (linux-2.1/u/35_aha1542.c 1.3.1.1 644) 103.3(w)
@@ -300,7 +300,6 @@
 
 static int aha1542_test_port(int bse, struct Scsi_Host * shpnt)
 {
-    int i;
     unchar inquiry_cmd[] = {CMD_INQUIRY };
     unchar inquiry_result[4];
     unchar *cmdp;
@@ -319,8 +318,7 @@
 
     outb(SRST|IRST/*|SCRST*/, CONTROL(bse));
 
-    i = jiffies + 2;
-    while (i>jiffies); /* Wait a little bit for things to settle down. */
+    udelay(2*10*1000);	/* Wait a little bit for things to settle down. */
     
     debug = 1;
     /* Expect INIT and IDLE, any of the others are bad */


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post