linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / scsi / aacraid / aacraid.h
index d0eecd4..2d430b7 100644 (file)
  *              D E F I N E S
  *----------------------------------------------------------------------------*/
 
-#ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 2409
-# define AAC_DRIVER_BRANCH "-mh2"
-#endif
 #define MAXIMUM_NUM_CONTAINERS 32
 
 #define AAC_NUM_MGT_FIB         8
@@ -29,6 +25,7 @@
  * These macros convert from physical channels to virtual channels
  */
 #define CONTAINER_CHANNEL              (0)
+#define ID_LUN_TO_CONTAINER(id, lun)   (id)
 #define CONTAINER_TO_CHANNEL(cont)     (CONTAINER_CHANNEL)
 #define CONTAINER_TO_ID(cont)          (cont)
 #define CONTAINER_TO_LUN(cont)         (0)
@@ -563,6 +560,7 @@ struct aac_queue {
        spinlock_t              lockdata;       /* Actual lock (used only on one side of the lock) */
        struct list_head        cmdq;           /* A queue of FIBs which need to be prcessed by the FS thread. This is */
                                                /* only valid for command queues which receive entries from the adapter. */
+       struct list_head        pendingq;       /* A queue of outstanding fib's to the adapter. */
        u32                     numpending;     /* Number of entries on outstanding queue. */
        struct aac_dev *        dev;            /* Back pointer to adapter structure */
 };
@@ -791,7 +789,6 @@ struct fsa_dev_info {
        u64             size;
        u32             type;
        u32             config_waiting_on;
-       unsigned long   config_waiting_stamp;
        u16             queue_depth;
        u8              config_needed;
        u8              valid;
@@ -821,6 +818,11 @@ struct fib {
        fib_callback            callback;
        void                    *callback_data;
        u32                     flags; // u32 dmb was ulong
+       /*
+        *      The following is used to put this fib context onto the 
+        *      Outstanding I/O queue.
+        */
+       struct list_head        queue;
        /*
         *      And for the internal issue/reply queues (we may be able
         *      to merge these two)
@@ -995,7 +997,7 @@ struct aac_dev
        int                     maximum_num_physicals;
        int                     maximum_num_channels;
        struct fsa_dev_info     *fsa_dev;
-       struct task_struct      *thread;
+       pid_t                   thread_pid;
        int                     cardtype;
        
        /*
@@ -1015,6 +1017,7 @@ struct aac_dev
         *      AIF thread states
         */
        u32                     aif_thread;
+       struct completion       aif_completion;
        struct aac_adapter_info adapter_info;
        struct aac_supplement_adapter_info supplement_adapter_info;
        /* These are in adapter info but they are in the io flow so
@@ -1769,11 +1772,6 @@ static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
 }
 
 struct scsi_cmnd;
-/* SCp.phase values */
-#define AAC_OWNER_MIDLEVEL     0x101
-#define AAC_OWNER_LOWLEVEL     0x102
-#define AAC_OWNER_ERROR_HANDLER        0x103
-#define AAC_OWNER_FIRMWARE     0x106
 
 const char *aac_driverinfo(struct Scsi_Host *);
 struct fib *aac_fib_alloc(struct aac_dev *dev);
@@ -1799,7 +1797,7 @@ int aac_sa_init(struct aac_dev *dev);
 unsigned int aac_response_normal(struct aac_queue * q);
 unsigned int aac_command_normal(struct aac_queue * q);
 unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index);
-int aac_command_thread(void *data);
+int aac_command_thread(struct aac_dev * dev);
 int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);
 int aac_fib_adapter_complete(struct fib * fibptr, unsigned short size);
 struct aac_driver_ident* aac_get_driver_ident(int devtype);
@@ -1809,5 +1807,3 @@ int aac_probe_container(struct aac_dev *dev, int cid);
 extern int numacb;
 extern int acbsize;
 extern char aac_driver_version[];
-extern int startup_timeout;
-extern int aif_timeout;