]> git.hungrycats.org Git - linux/commitdiff
[PATCH] SCSI update
authorDoug Ledford <dledford@redhat.com>
Tue, 15 Oct 2002 11:55:33 +0000 (04:55 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 15 Oct 2002 11:55:33 +0000 (04:55 -0700)
drivers/scsi/esp.c:
  Fix the build.
scsi.h:
  Add struct list_head items for future (but soon) use
hosts.h:
  Remove select_queue_depths from host struct, add struct list
  stuff for proper list linking of host structs
hosts.c:
  Don't touch select_queue_depths any longer

drivers/scsi/hosts.c
drivers/scsi/hosts.h
drivers/scsi/scsi.h

index 1e295555b26ffce9ef347f7942dc6fc256c021eb..520f31dfbf827338cb3a36115350cf3145b7a355 100644 (file)
@@ -229,7 +229,6 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j)
     if (!blk_nohighio)
        retval->highmem_io = tpnt->highmem_io;
 
-    retval->select_queue_depths = tpnt->select_queue_depths;
     retval->max_sectors = tpnt->max_sectors;
     retval->use_blk_tcq = tpnt->use_blk_tcq;
 
index 44eb4ac5388088f7e36f1525e4698ee0d91af06f..a43cac87faa08ba06049c15d59369660d9b28afc 100644 (file)
@@ -384,6 +384,8 @@ struct Scsi_Host
      */
     struct Scsi_Host      * next;
     Scsi_Device           * host_queue;
+    struct list_head     all_scsi_hosts;
+    struct list_head     my_devices;
 
     spinlock_t           default_lock;
     spinlock_t           *host_lock;
@@ -489,8 +491,6 @@ struct Scsi_Host
      */
     unsigned int max_host_blocked;
 
-    void (*select_queue_depths)(struct Scsi_Host *, Scsi_Device *);
-
     /*
      * For SCSI hosts which are PCI devices, set pci_dev so that
      * we can do BIOS EDD 3.0 mappings
index 128b1e5e73357825ddef211177b2a25cb8744e6d..27230b02da1e479d588e6eb484b51620c0141f4c 100644 (file)
@@ -556,12 +556,16 @@ struct scsi_device {
         */
        struct scsi_device *next;       /* Used for linked list */
        struct scsi_device *prev;       /* Used for linked list */
+       struct list_head    siblings;   /* list of all devices on this host */
+       struct list_head    same_target_siblings; /* just the devices sharing same target id */
        wait_queue_head_t   scpnt_wait; /* Used to wait if
                                           device is busy */
        struct Scsi_Host *host;
        request_queue_t request_queue;
         atomic_t                device_active; /* commands checked out for device */
        volatile unsigned short device_busy;    /* commands actually active on low-level */
+       struct list_head free_cmnds;    /* list of available Scsi_Cmnd structs */
+       struct list_head busy_cmnds;    /* list of Scsi_Cmnd structs in use */
        Scsi_Cmnd *device_queue;        /* queue of SCSI Command structures */
         Scsi_Cmnd *current_cmnd;       /* currently active command */
        unsigned short queue_depth;     /* How deep of a queue we have */
@@ -711,6 +715,7 @@ struct scsi_cmnd {
        Scsi_Request *sc_request;
        struct scsi_cmnd *next;
        struct scsi_cmnd *reset_chain;
+       struct list_head list_entry; /* Used to place us on the cmd lists */
 
        int eh_state;           /* Used for state tracking in error handlr */
        int eh_eflags;          /* Used by error handlr */