aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-01-05 18:07:07 -0500
committerArjan van de Ven <arjan@linux.intel.com>2009-01-07 11:47:11 -0500
commitf29d3b23238e1955a8094e038c72546e99308e61 (patch)
tree19c0f68b953f64f4e5a758de8f4d3e141a05de0b /drivers/ata
parent793180570ff2530d133343ceea85648de5f01b02 (diff)
fastboot: Make libata initialization even more async
As suggested by Linus: Don't do the libata init in 2 separate steps with a global sync inbetween, but do it as one async step, with a local sync before registering the device. This cuts the boottime on my machine with 2 sata controllers down significantly, and it seems to work. Would be nice if the libata folks take a good look at this patch though.. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7d3ae6a6fce7..f178a450ec08 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5951,6 +5951,12 @@ static void async_port_probe(void *data, async_cookie_t cookie)
5951 */ 5951 */
5952 } 5952 }
5953 } 5953 }
5954
5955 /* in order to keep device order, we need to synchronize at this point */
5956 async_synchronize_cookie(cookie);
5957
5958 ata_scsi_scan_host(ap, 1);
5959
5954} 5960}
5955/** 5961/**
5956 * ata_host_register - register initialized ATA host 5962 * ata_host_register - register initialized ATA host
@@ -6033,15 +6039,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
6033 struct ata_port *ap = host->ports[i]; 6039 struct ata_port *ap = host->ports[i];
6034 async_schedule(async_port_probe, ap); 6040 async_schedule(async_port_probe, ap);
6035 } 6041 }
6036 async_synchronize_full(); 6042 DPRINTK("probe end\n");
6037 /* probes are done, now scan each port's disk(s) */
6038 DPRINTK("host probe begin\n");
6039 for (i = 0; i < host->n_ports; i++) {
6040 struct ata_port *ap = host->ports[i];
6041
6042 ata_scsi_scan_host(ap, 1);
6043 }
6044 DPRINTK("host probe end\n");
6045 6043
6046 return 0; 6044 return 0;
6047} 6045}