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

Next file: linux/drivers/scsi/st.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.27/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -29,7 +29,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);
@@ -51,12 +51,13 @@
 		IOCTL_TIMEOUT, IOCTL_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 */
-	while (SCpnt->request.dev != 0xfffe) schedule();
+	while (SCpnt->request.rq_status != RQ_SCSI_DONE)
+	  schedule();
     };
     
     result = SCpnt->result;
@@ -88,7 +89,7 @@
 	};
     
     result = SCpnt->result;
-    SCpnt->request.dev = -1; /* Deallocate */
+    SCpnt->request.rq_status = RQ_INACTIVE; /* Deallocate */
     wake_up(&SCpnt->device->device_wait);
     /* Wake up a process waiting for device*/
     return result;
@@ -98,7 +99,7 @@
 {
     u_char  sr_cmd[10];
     
-    int dev = inode->i_rdev;
+    kdev_t dev = inode->i_rdev;
     int result, target, err;
     
     target = MINOR(dev);
@@ -445,7 +446,7 @@
 	
     case BLKRASET:
 	if(!suser())  return -EACCES;
-	if(!inode->i_rdev) return -EINVAL;
+	if(!(inode->i_rdev)) return -EINVAL;
 	if(arg > 0xff) return -EINVAL;
 	read_ahead[MAJOR(inode->i_rdev)] = arg;
 	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