]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic94xx/aic94xx_hwi.h
[SCSI] aic94xx: fix TMF ascb handling to prevent sequencer panic
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic94xx / aic94xx_hwi.h
index 8498144aa5e1594eb1e2ecdc09dfb466c7bb48a6..abc757559c1af2911584f3e14be97c69159d923c 100644 (file)
 #define ASD_MAX_PHYS       8
 #define ASD_PCBA_SN_SIZE   12
 
-/* Those are to be further named properly, the "RAZORx" part, and
- * subsequently included in include/linux/pci_ids.h.
- */
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR10 0x410
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR12 0x412
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR1E 0x41E
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR30 0x430
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR32 0x432
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR3E 0x43E
-#define PCI_DEVICE_ID_ADAPTEC2_RAZOR3F 0x43F
-
 struct asd_ha_addrspace {
        void __iomem  *addr;
        unsigned long  start;       /* pci resource start */
@@ -83,6 +72,7 @@ struct flash_struct {
        u8     manuf;
        u8     dev_id;
        u8     sec_prot;
+       u8     method;
 
        u32    dir_offs;
 };
@@ -150,7 +140,7 @@ struct asd_ascb {
 
        /* internally generated command */
        struct timer_list timer;
-       struct completion completion;
+       struct completion *completion;
        u8        tag_valid:1;
        __be16    tag;            /* error recovery only */
 
@@ -192,6 +182,16 @@ struct asd_seq_data {
        struct asd_ascb **escb_arr; /* array of pointers to escbs */
 };
 
+/* This is an internal port structure. These are used to get accurate
+ * phy_mask for updating DDB 0.
+ */
+struct asd_port {
+       u8  sas_addr[SAS_ADDR_SIZE];
+       u8  attached_sas_addr[SAS_ADDR_SIZE];
+       u32 phy_mask;
+       int num_phys;
+};
+
 /* This is the Host Adapter structure.  It describes the hardware
  * SAS adapter.
  */
@@ -210,11 +210,15 @@ struct asd_ha_struct {
        struct hw_profile hw_prof;
 
        struct asd_phy    phys[ASD_MAX_PHYS];
+       spinlock_t        asd_ports_lock;
+       struct asd_port   asd_ports[ASD_MAX_PHYS];
        struct asd_sas_port   ports[ASD_MAX_PHYS];
 
        struct dma_pool  *scb_pool;
 
        struct asd_seq_data  seq; /* sequencer related */
+       u32    bios_status;
+       const struct firmware *bios_image;
 };
 
 /* ---------- Common macros ---------- */
@@ -290,7 +294,6 @@ static inline void asd_init_ascb(struct asd_ha_struct *asd_ha,
        ascb->timer.function = NULL;
        init_timer(&ascb->timer);
        ascb->tc_index = -1;
-       init_completion(&ascb->completion);
 }
 
 /* Must be called with the tc_index_lock held!
@@ -371,7 +374,7 @@ static inline void asd_ascb_free_list(struct asd_ascb *ascb_list)
 /* ---------- Function declarations ---------- */
 
 int  asd_init_hw(struct asd_ha_struct *asd_ha);
-irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs);
+irqreturn_t asd_hw_isr(int irq, void *dev_id);
 
 
 struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct