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

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

diff -u --recursive --new-file v1.3.27/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -100,7 +100,7 @@
     struct request * req;
     
     req = &SCpnt->request;
-    req->dev = 0xfffe; /* Busy, but indicate request done */
+    req->rq_status = RQ_SCSI_DONE; /* Busy, but indicate request done */
     
     if (req->sem != NULL) {
 	up(req->sem);
@@ -117,12 +117,13 @@
 		scsi_ioctl_done,  MAX_TIMEOUT,
 		MAX_RETRIES);
     
-    if (SCpnt->request.dev != 0xfffe){
+    if (SCpnt->request.rq_status != RQ_SCSI_DONE){
 	struct semaphore sem = MUTEX_LOCKED;
 	SCpnt->request.sem = &sem;
 	down(&sem);
 	/* Hmm.. Have to ask about this one */
-	while (SCpnt->request.dev != 0xfffe) schedule();
+	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
+	    schedule();
     };
     
     if(driver_byte(SCpnt->result) != 0)
@@ -157,7 +158,7 @@
 	};
     
     result = SCpnt->result;
-    SCpnt->request.dev = -1;
+    SCpnt->request.rq_status = RQ_INACTIVE;
     wake_up(&SCpnt->device->device_wait);
     return result;
 }
@@ -251,12 +252,13 @@
     scsi_do_cmd(SCpnt,  cmd,  buf, needed,  scsi_ioctl_done,  MAX_TIMEOUT, 
 		MAX_RETRIES);
     
-    if (SCpnt->request.dev != 0xfffe){
+    if (SCpnt->request.rq_status != RQ_SCSI_DONE){
 	struct semaphore sem = MUTEX_LOCKED;
 	SCpnt->request.sem = &sem;
 	down(&sem);
 	/* Hmm.. Have to ask about this one */
-	while (SCpnt->request.dev != 0xfffe) schedule();
+	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
+	    schedule();
     }
     
     
@@ -277,7 +279,9 @@
         memcpy_tofs ((void *) cmd_in,  buf,  outlen);
     }
     result = SCpnt->result;
-    SCpnt->request.dev = -1;  /* Mark as not busy */
+
+    SCpnt->request.rq_status = RQ_INACTIVE;
+
     if (buf) scsi_free(buf, buf_needed);
     
     if(SCpnt->device->scsi_request_fn)
@@ -324,7 +328,7 @@
 	put_user(dev->id 
                  + (dev->lun << 8) 
                  + (dev->channel << 16)
-                 + ((dev->host->hostt->low_ino & 0xff) << 24),
+                 + ((dev->host->hostt->proc_dir->low_ino & 0xff) << 24),
 		    (unsigned long *) arg);
         put_user( dev->host->unique_id, (unsigned long *) arg+1);
 	return 0;

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