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

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

diff -u --recursive --new-file v2.3.33/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -111,7 +111,12 @@
 
 
 	SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", cmd[0]));
-	SCpnt = scsi_allocate_device(dev, 1);
+	SCpnt = scsi_allocate_device(dev, TRUE, TRUE);
+        if( SCpnt == NULL )
+        {
+                return -EINTR;
+        }
+
 	{
 		DECLARE_MUTEX_LOCKED(sem);
 		SCpnt->request.sem = &sem;
@@ -163,8 +168,6 @@
 	scsi_release_command(SCpnt);
 	SCpnt = NULL;
 
-
-	wake_up(&SDpnt->device_wait);
 	return result;
 }
 
@@ -297,7 +300,11 @@
 #ifndef DEBUG_NO_CMD
 
 
-	SCpnt = scsi_allocate_device(dev, 1);
+	SCpnt = scsi_allocate_device(dev, TRUE, TRUE);
+        if( SCpnt == NULL )
+        {
+                return -EINTR;
+        }
 
 	{
 		DECLARE_MUTEX_LOCKED(sem);
@@ -328,7 +335,6 @@
 	result = SCpnt->result;
 
 
-	wake_up(&SCpnt->device->device_wait);
 	SDpnt = SCpnt->device;
 	scsi_release_command(SCpnt);
 	SCpnt = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)