patch-2.4.14 linux/drivers/scsi/qlogicfas.c

Next file: linux/drivers/scsi/qlogicfc.c
Previous file: linux/drivers/scsi/osst.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/scsi/qlogicfas.c linux/drivers/scsi/qlogicfas.c
@@ -271,8 +271,10 @@
 int	i,k;
 	k = 0;
 	i = jiffies + WATCHDOG;
-	while ( i > jiffies && !qabort && !((k = inb(qbase + 4)) & 0xe0))
+	while ( i > jiffies && !qabort && !((k = inb(qbase + 4)) & 0xe0)) {
 		barrier();
+		cpu_relax();
+	}
 	if (i <= jiffies)
 		return (DID_TIME_OUT);
 	if (qabort)
@@ -431,6 +433,7 @@
 	i = inb(qbase + 5);	/* should be bus service */
 	while (!qabort && ((i & 0x20) != 0x20)) {
 		barrier();
+		cpu_relax();
 		i |= inb(qbase + 5);
 	}
 rtrc(0)
@@ -513,8 +516,10 @@
 
 	cmd->scsi_done = done;
 /* wait for the last command's interrupt to finish */
-	while (qlcmd != NULL)
+	while (qlcmd != NULL) {
 		barrier();
+		cpu_relax();
+	}
 	ql_icmd(cmd);
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)