patch-2.3.38 linux/drivers/scsi/scsi_obsolete.c

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

diff -u --recursive --new-file v2.3.37/linux/drivers/scsi/scsi_obsolete.c linux/drivers/scsi/scsi_obsolete.c
@@ -1,5 +1,5 @@
 /*
- *  scsi.c Copyright (C) 1992 Drew Eckhardt
+ *  scsi_obsolete.c Copyright (C) 1992 Drew Eckhardt
  *         Copyright (C) 1993, 1994, 1995 Eric Youngdale
  *
  *  generic mid-level SCSI driver
@@ -87,9 +87,7 @@
 
 extern int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt);
 
-extern volatile struct Scsi_Host *host_active;
-#define SCSI_BLOCK(HOST) ((HOST->block && host_active && HOST != host_active) \
-			  || (HOST->can_queue && HOST->host_busy >= HOST->can_queue))
+#define SCSI_BLOCK(HOST) (HOST->can_queue && HOST->host_busy >= HOST->can_queue)
 
 static unsigned char generic_sense[6] =
 {REQUEST_SENSE, 0, 0, 0, 255, 0};
@@ -334,6 +332,7 @@
 	int checked;
 	int oldto;
 	struct Scsi_Host *host = SCpnt->host;
+        Scsi_Device * device = SCpnt->device;
 	int result = SCpnt->result;
 	SCpnt->serial_number = 0;
 	SCpnt->serial_number_at_timeout = 0;
@@ -655,6 +654,7 @@
 		printk("Calling done function - at address %p\n", SCpnt->done);
 #endif
 		host->host_busy--;	/* Indicate that we are free */
+                device->device_busy--;	/* Decrement device usage counter. */
 
 		SCpnt->result = result | ((exit & 0xff) << 24);
 		SCpnt->use_sg = SCpnt->old_use_sg;

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