diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-01-18 23:47:01 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 16:35:41 -0500 |
commit | 9508a66f898d46e726a318469312b45e0b1d078b (patch) | |
tree | e6b61e6c2a7dc8b40fdc0fe34901ff3db4af47a9 /drivers/scsi/libsas/sas_discover.c | |
parent | 92625f9bff3853951cc75f5bc084ee67c1317d2f (diff) |
[SCSI] libsas: async ata scanning
libsas ata error handling is already async but this does not help the
scan case. Move initial link recovery out from under host->scan_mutex,
and delay synchronization with eh until after all port probe/recovery
work has been queued.
Device ordering is maintained with scan order by still calling
sas_rphy_add() in order of domain discovery.
Since we now scan the domain list when invoking libata-eh we need to be
careful to check for fully initialized ata ports.
Acked-by: Jack Wang <jack_wang@usish.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 18fa364aa00f..0d58a8beaa3d 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -207,22 +207,22 @@ static void sas_probe_devices(struct work_struct *work) | |||
207 | 207 | ||
208 | clear_bit(DISCE_PROBE, &port->disc.pending); | 208 | clear_bit(DISCE_PROBE, &port->disc.pending); |
209 | 209 | ||
210 | list_for_each_entry_safe(dev, n, &port->disco_list, disco_list_node) { | 210 | /* devices must be domain members before link recovery and probe */ |
211 | int err; | 211 | list_for_each_entry(dev, &port->disco_list, disco_list_node) { |
212 | |||
213 | spin_lock_irq(&port->dev_list_lock); | 212 | spin_lock_irq(&port->dev_list_lock); |
214 | list_add_tail(&dev->dev_list_node, &port->dev_list); | 213 | list_add_tail(&dev->dev_list_node, &port->dev_list); |
215 | spin_unlock_irq(&port->dev_list_lock); | 214 | spin_unlock_irq(&port->dev_list_lock); |
215 | } | ||
216 | 216 | ||
217 | err = sas_rphy_add(dev->rphy); | 217 | sas_probe_sata(port); |
218 | 218 | ||
219 | if (err) { | 219 | list_for_each_entry_safe(dev, n, &port->disco_list, disco_list_node) { |
220 | SAS_DPRINTK("%s: for %s device %16llx returned %d\n", | 220 | int err; |
221 | __func__, dev->parent ? "exp-attached" : | 221 | |
222 | "direct-attached", | 222 | err = sas_rphy_add(dev->rphy); |
223 | SAS_ADDR(dev->sas_addr), err); | 223 | if (err) |
224 | sas_unregister_dev(port, dev); | 224 | sas_fail_probe(dev, __func__, err); |
225 | } else | 225 | else |
226 | list_del_init(&dev->disco_list_node); | 226 | list_del_init(&dev->disco_list_node); |
227 | } | 227 | } |
228 | } | 228 | } |