aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libsas/sas_port.c')
-rw-r--r--drivers/scsi/libsas/sas_port.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index e1e2d085c920..39ae68a3b0ef 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -92,9 +92,6 @@ static void sas_form_port(struct asd_sas_phy *phy)
92 if (!port->phy) 92 if (!port->phy)
93 port->phy = phy->phy; 93 port->phy = phy->phy;
94 94
95 SAS_DPRINTK("phy%d added to port%d, phy_mask:0x%x\n", phy->id,
96 port->id, port->phy_mask);
97
98 if (*(u64 *)port->attached_sas_addr == 0) { 95 if (*(u64 *)port->attached_sas_addr == 0) {
99 port->class = phy->class; 96 port->class = phy->class;
100 memcpy(port->attached_sas_addr, phy->attached_sas_addr, 97 memcpy(port->attached_sas_addr, phy->attached_sas_addr,
@@ -115,6 +112,11 @@ static void sas_form_port(struct asd_sas_phy *phy)
115 } 112 }
116 sas_port_add_phy(port->port, phy->phy); 113 sas_port_add_phy(port->port, phy->phy);
117 114
115 SAS_DPRINTK("%s added to %s, phy_mask:0x%x (%16llx)\n",
116 phy->phy->dev.bus_id,port->port->dev.bus_id,
117 port->phy_mask,
118 SAS_ADDR(port->attached_sas_addr));
119
118 if (port->port_dev) 120 if (port->port_dev)
119 port->port_dev->pathways = port->num_phys; 121 port->port_dev->pathways = port->num_phys;
120 122
@@ -255,12 +257,11 @@ void sas_porte_hard_reset(struct work_struct *work)
255static void sas_init_port(struct asd_sas_port *port, 257static void sas_init_port(struct asd_sas_port *port,
256 struct sas_ha_struct *sas_ha, int i) 258 struct sas_ha_struct *sas_ha, int i)
257{ 259{
260 memset(port, 0, sizeof(*port));
258 port->id = i; 261 port->id = i;
259 INIT_LIST_HEAD(&port->dev_list); 262 INIT_LIST_HEAD(&port->dev_list);
260 spin_lock_init(&port->phy_list_lock); 263 spin_lock_init(&port->phy_list_lock);
261 INIT_LIST_HEAD(&port->phy_list); 264 INIT_LIST_HEAD(&port->phy_list);
262 port->num_phys = 0;
263 port->phy_mask = 0;
264 port->ha = sas_ha; 265 port->ha = sas_ha;
265 266
266 spin_lock_init(&port->dev_list_lock); 267 spin_lock_init(&port->dev_list_lock);