diff options
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index c7ac88288bf1..658f16cc2f03 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -134,10 +134,6 @@ static int sas_get_port_device(struct asd_sas_port *port) | |||
134 | return -ENODEV; | 134 | return -ENODEV; |
135 | } | 135 | } |
136 | 136 | ||
137 | spin_lock_irq(&port->phy_list_lock); | ||
138 | list_for_each_entry(phy, &port->phy_list, port_phy_el) | ||
139 | sas_phy_set_target(phy, dev); | ||
140 | spin_unlock_irq(&port->phy_list_lock); | ||
141 | rphy->identify.phy_identifier = phy->phy->identify.phy_identifier; | 137 | rphy->identify.phy_identifier = phy->phy->identify.phy_identifier; |
142 | memcpy(dev->sas_addr, port->attached_sas_addr, SAS_ADDR_SIZE); | 138 | memcpy(dev->sas_addr, port->attached_sas_addr, SAS_ADDR_SIZE); |
143 | sas_fill_in_rphy(dev, rphy); | 139 | sas_fill_in_rphy(dev, rphy); |
@@ -164,6 +160,11 @@ static int sas_get_port_device(struct asd_sas_port *port) | |||
164 | spin_unlock_irq(&port->dev_list_lock); | 160 | spin_unlock_irq(&port->dev_list_lock); |
165 | } | 161 | } |
166 | 162 | ||
163 | spin_lock_irq(&port->phy_list_lock); | ||
164 | list_for_each_entry(phy, &port->phy_list, port_phy_el) | ||
165 | sas_phy_set_target(phy, dev); | ||
166 | spin_unlock_irq(&port->phy_list_lock); | ||
167 | |||
167 | return 0; | 168 | return 0; |
168 | } | 169 | } |
169 | 170 | ||