2.1.103 patch to remove spin loop in aha1542 detection

Keith Owens (kaos@ocs.com.au)
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-kernel" in
the body of a message to majordomo@vger.rutgers.edu