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

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

diff -u --recursive --new-file v1.3.34/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -113,18 +113,14 @@
     Scsi_Cmnd * SCpnt;
     
     SCpnt = allocate_device(NULL, dev, 1);
-    scsi_do_cmd(SCpnt,  cmd, NULL,  0,
-		scsi_ioctl_done,  MAX_TIMEOUT,
-		MAX_RETRIES);
-    
-    if (SCpnt->request.rq_status != RQ_SCSI_DONE){
+    {
 	struct semaphore sem = MUTEX_LOCKED;
 	SCpnt->request.sem = &sem;
+	scsi_do_cmd(SCpnt,  cmd, NULL,  0,
+		    scsi_ioctl_done,  MAX_TIMEOUT,
+		    MAX_RETRIES);
 	down(&sem);
-	/* Hmm.. Have to ask about this one */
-	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
-	    schedule();
-    };
+    }
     
     if(driver_byte(SCpnt->result) != 0)
 	switch(SCpnt->sense_buffer[2] & 0xf) {
@@ -248,19 +244,14 @@
 #ifndef DEBUG_NO_CMD
     
     SCpnt = allocate_device(NULL, dev, 1);
-    
-    scsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
-		MAX_RETRIES);
-    
-    if (SCpnt->request.rq_status != RQ_SCSI_DONE){
+
+    {
 	struct semaphore sem = MUTEX_LOCKED;
 	SCpnt->request.sem = &sem;
+	scsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
+		    MAX_RETRIES);
 	down(&sem);
-	/* Hmm.. Have to ask about this one */
-	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
-	    schedule();
     }
-    
     
     /* 
      * If there was an error condition, pass the info back to the user. 

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