patch-2.4.14 linux/drivers/scsi/53c7,8xx.c

Next file: linux/drivers/scsi/53c7xx.c
Previous file: linux/drivers/sbus/char/zs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/scsi/53c7,8xx.c linux/drivers/scsi/53c7,8xx.c
@@ -1867,8 +1867,10 @@
 	 */
 
 	timeout = jiffies + 5 * HZ / 10;
-	while ((hostdata->test_completed == -1) && jiffies < timeout)
+	while ((hostdata->test_completed == -1) && jiffies < timeout) {
 		barrier();
+		cpu_relax();
+	}
 
 	failed = 1;
 	if (hostdata->test_completed == -1)
@@ -1951,8 +1953,10 @@
 	    restore_flags(flags);
 
 	    timeout = jiffies + 5 * HZ;	/* arbitrary */
-	    while ((hostdata->test_completed == -1) && jiffies < timeout)
+	    while ((hostdata->test_completed == -1) && jiffies < timeout) {
 	    	barrier();
+		cpu_relax();
+	    }
 	    NCR53c7x0_write32 (DSA_REG, 0);
 
 	    if (hostdata->test_completed == 2) {

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