X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fscsi%2Faic94xx%2Faic94xx_hwi.c;h=da94e126ca832d5e4d157c65c3b34acaab20620c;hb=1709775828de83b099554176b6d4971ebc772962;hp=a24201351108117b23e8fbee686a3cdb2e01eb31;hpb=23930fa1cebfea6f79881c588ccd1b0781e49e3f;p=powerpc.git diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index a242013511..da94e126ca 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c @@ -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; @@ -267,7 +283,7 @@ static int asd_init_dl(struct asd_ha_struct *asd_ha) /* ---------- EDB and ESCB init ---------- */ -static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, unsigned int gfp_flags) +static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, gfp_t gfp_flags) { struct asd_seq_data *seq = &asd_ha->seq; int i; @@ -298,7 +314,7 @@ Err_unroll: } static int asd_alloc_escbs(struct asd_ha_struct *asd_ha, - unsigned int gfp_flags) + gfp_t gfp_flags) { struct asd_seq_data *seq = &asd_ha->seq; struct asd_ascb *escb; @@ -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); @@ -1028,9 +1045,9 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs) /* ---------- SCB handling ---------- */ static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, - unsigned int gfp_flags) + 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; @@ -1086,7 +1103,7 @@ undo: */ struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct *asd_ha, int *num, - unsigned int gfp_flags) + gfp_t gfp_flags) { struct asd_ascb *first = NULL;