summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo2007-07-16 07:29:40 +0200
committerJeff Garzik2007-07-20 14:26:25 +0200
commit1ae463171cc1b1ea6dad7bcb298e96c073e7373e (patch)
treec3d62562c9be8c855f7238785ea9c9348f1e56f1 /drivers/ata/libata-core.c
parentlibata: quickly trigger SATA SPD down after debouncing failed (diff)
downloadkernel-qcow2-linux-1ae463171cc1b1ea6dad7bcb298e96c073e7373e.tar.gz
kernel-qcow2-linux-1ae463171cc1b1ea6dad7bcb298e96c073e7373e.tar.xz
kernel-qcow2-linux-1ae463171cc1b1ea6dad7bcb298e96c073e7373e.zip
libata: improve SCSI scan failure handling
SCSI scan may fail due to memory allocation failure even if EH is not in progress. Due to use of GFP_ATOMIC in SCSI scan path, allocation failure isn't too rare especially while probing multiple devices at once which is the case when a bunch of devices are connected to PMP. This patch moves SCSI scan failure detetion logic from ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous scan behavior. The synchronous path sleeps briefly and repeats SCSI scan if some devices aren't attached properly. It contains robust retry loop to minimize the chance of device misdetection during boot and falls back to async retry if everything fails. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 05922e9f4fad..35b621293831 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6453,7 +6453,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
- ata_scsi_scan_host(ap);
+ ata_scsi_scan_host(ap, 1);
}
return 0;