patch-2.1.95 linux/drivers/scsi/sr.c
Next file: linux/drivers/scsi/u14-34f.c
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Thu Apr 9 13:43:52 1998
- Orig file:
v2.1.94/linux/drivers/scsi/sr.c
- Orig date:
Tue Mar 10 10:03:33 1998
diff -u --recursive --new-file v2.1.94/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
@@ -431,10 +431,7 @@
int flag = 0;
while (1==1){
- spin_lock_irqsave(&io_request_lock, flags);
-
if (CURRENT != NULL && CURRENT->rq_status == RQ_INACTIVE) {
- spin_unlock_irqrestore(&io_request_lock, flags);
return;
};
@@ -450,7 +447,6 @@
*/
if( SDev->host->in_recovery )
{
- spin_unlock_irqrestore(&io_request_lock, flags);
return;
}
@@ -469,8 +465,9 @@
*/
if( SDev->removable && !in_interrupt() )
{
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irq(&io_request_lock); /* FIXME!!!! */
scsi_ioctl(SDev, SCSI_IOCTL_DOORLOCK, 0);
+ spin_lock_irq(&io_request_lock); /* FIXME!!!! */
/* scsi_ioctl may allow CURRENT to change, so start over. */
SDev->was_reset = 0;
continue;
@@ -493,7 +490,6 @@
SCpnt = scsi_allocate_device(&CURRENT,
scsi_CDs[DEVICE_NR(CURRENT->rq_dev)].device, 0);
else SCpnt = NULL;
- spin_unlock_irqrestore(&io_request_lock, flags);
/* This is a performance enhancement. We dig down into the request list and
* try to find a queueable request (i.e. device not busy, and host able to
@@ -505,7 +501,6 @@
if (!SCpnt && sr_template.nr_dev > 1){
struct request *req1;
req1 = NULL;
- spin_lock_irqsave(&io_request_lock, flags);
req = CURRENT;
while(req){
SCpnt = scsi_request_queueable(req,
@@ -520,7 +515,6 @@
else
req1->next = req->next;
}
- spin_unlock_irqrestore(&io_request_lock, flags);
}
if (!SCpnt)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov