Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[powerpc.git] / drivers / scsi / aic94xx / aic94xx_hwi.c
index 1d8c5e5..da94e12 100644 (file)
@@ -112,6 +112,21 @@ static int asd_init_phy(struct asd_phy *phy)
        return 0;
 }
 
+static void asd_init_ports(struct asd_ha_struct *asd_ha)
+{
+       int i;
+
+       spin_lock_init(&asd_ha->asd_ports_lock);
+       for (i = 0; i < ASD_MAX_PHYS; i++) {
+               struct asd_port *asd_port = &asd_ha->asd_ports[i];
+
+               memset(asd_port->sas_addr, 0, SAS_ADDR_SIZE);
+               memset(asd_port->attached_sas_addr, 0, SAS_ADDR_SIZE);
+               asd_port->phy_mask = 0;
+               asd_port->num_phys = 0;
+       }
+}
+
 static int asd_init_phys(struct asd_ha_struct *asd_ha)
 {
        u8 i;
@@ -121,6 +136,7 @@ static int asd_init_phys(struct asd_ha_struct *asd_ha)
                struct asd_phy *phy = &asd_ha->phys[i];
 
                phy->phy_desc = &asd_ha->hw_prof.phy_desc[i];
+               phy->asd_port = NULL;
 
                phy->sas_phy.enabled = 0;
                phy->sas_phy.id = i;
@@ -658,6 +674,8 @@ int asd_init_hw(struct asd_ha_struct *asd_ha)
                goto Out;
        }
 
+       asd_init_ports(asd_ha);
+
        err = asd_init_scbs(asd_ha);
        if (err) {
                asd_printk("couldn't initialize scbs for %s\n",
@@ -996,11 +1014,10 @@ static inline void asd_hst_pcix_isr(struct asd_ha_struct *asd_ha)
  * asd_hw_isr -- host adapter interrupt service routine
  * @irq: ignored
  * @dev_id: pointer to host adapter structure
- * @regs: ignored
  *
  * The ISR processes done list entries and level 3 error handling.
  */
-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_ha_struct *asd_ha = dev_id;
        u32 chimint = asd_read_reg_dword(asd_ha, CHIMINT);
@@ -1030,7 +1047,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs)
 static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
                                              gfp_t gfp_flags)
 {
-       extern kmem_cache_t *asd_ascb_cache;
+       extern struct kmem_cache *asd_ascb_cache;
        struct asd_seq_data *seq = &asd_ha->seq;
        struct asd_ascb *ascb;
        unsigned long flags;