patch-1.3.35 linux/drivers/scsi/sr_ioctl.c

Next file: linux/drivers/sound/sb_dsp.c
Previous file: linux/drivers/scsi/sr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.34/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -44,21 +44,16 @@
 {
     Scsi_Cmnd * SCpnt;
     int result;
-    
+
     SCpnt = allocate_device(NULL, scsi_CDs[target].device, 1);
-    scsi_do_cmd(SCpnt,
-		(void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
-		IOCTL_TIMEOUT, IOCTL_RETRIES);
-    
-    
-    if (SCpnt->request.rq_status != RQ_SCSI_DONE){
+    {
 	struct semaphore sem = MUTEX_LOCKED;
 	SCpnt->request.sem = &sem;
+	scsi_do_cmd(SCpnt,
+		    (void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
+		    IOCTL_TIMEOUT, IOCTL_RETRIES);
 	down(&sem);
-	/* Hmm.. Have to ask about this */
-	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
-	  schedule();
-    };
+    }
     
     result = SCpnt->result;
     

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this