diff options
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_hwi.c')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_hwi.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index 3c2d7a379931..af7e01134364 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) | |||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | 114 | ||
115 | static void asd_init_ports(struct asd_ha_struct *asd_ha) | ||
116 | { | ||
117 | int i; | ||
118 | |||
119 | spin_lock_init(&asd_ha->asd_ports_lock); | ||
120 | for (i = 0; i < ASD_MAX_PHYS; i++) { | ||
121 | struct asd_port *asd_port = &asd_ha->asd_ports[i]; | ||
122 | |||
123 | memset(asd_port->sas_addr, 0, SAS_ADDR_SIZE); | ||
124 | memset(asd_port->attached_sas_addr, 0, SAS_ADDR_SIZE); | ||
125 | asd_port->phy_mask = 0; | ||
126 | asd_port->num_phys = 0; | ||
127 | } | ||
128 | } | ||
129 | |||
115 | static int asd_init_phys(struct asd_ha_struct *asd_ha) | 130 | static int asd_init_phys(struct asd_ha_struct *asd_ha) |
116 | { | 131 | { |
117 | u8 i; | 132 | u8 i; |
@@ -121,6 +136,7 @@ static int asd_init_phys(struct asd_ha_struct *asd_ha) | |||
121 | struct asd_phy *phy = &asd_ha->phys[i]; | 136 | struct asd_phy *phy = &asd_ha->phys[i]; |
122 | 137 | ||
123 | phy->phy_desc = &asd_ha->hw_prof.phy_desc[i]; | 138 | phy->phy_desc = &asd_ha->hw_prof.phy_desc[i]; |
139 | phy->asd_port = NULL; | ||
124 | 140 | ||
125 | phy->sas_phy.enabled = 0; | 141 | phy->sas_phy.enabled = 0; |
126 | phy->sas_phy.id = i; | 142 | phy->sas_phy.id = i; |
@@ -658,6 +674,8 @@ int asd_init_hw(struct asd_ha_struct *asd_ha) | |||
658 | goto Out; | 674 | goto Out; |
659 | } | 675 | } |
660 | 676 | ||
677 | asd_init_ports(asd_ha); | ||
678 | |||
661 | err = asd_init_scbs(asd_ha); | 679 | err = asd_init_scbs(asd_ha); |
662 | if (err) { | 680 | if (err) { |
663 | asd_printk("couldn't initialize scbs for %s\n", | 681 | asd_printk("couldn't initialize scbs for %s\n", |