patch-2.1.102 linux/drivers/scsi/wd7000.c

Next file: linux/drivers/sound/Config.in
Previous file: linux/drivers/scsi/wd33c93.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.101/linux/drivers/scsi/wd7000.c linux/drivers/scsi/wd7000.c
@@ -851,18 +851,18 @@
     save_flags (flags);
     cli ();
     while (busy) {		/* someone else is allocating */
-	sti ();			/* Yes this is really needed here */
+	spin_unlock_irq(&io_request_lock);
 	for (now = jiffies; now == jiffies; );	/* wait a jiffy */
-	cli ();
+	spin_lock_irq(&io_request_lock);
     }
     busy = 1;			/* not busy now; it's our turn */
 
     while (freescbs < needed) {
 	timeout = jiffies + WAITnexttimeout;
 	do {
-	    sti ();		/* Yes this is really needed here */
+	    spin_unlock_irq(&io_request_lock);
 	    for (now = jiffies; now == jiffies; );	/* wait a jiffy */
-	    cli ();
+	    spin_lock_irq(&io_request_lock);
 	} while (freescbs < needed && jiffies <= timeout);
 	/*
 	 *  If we get here with enough free Scbs, we can take them.

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