diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-01-05 15:07:07 -0800 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2009-01-07 08:47:11 -0800 |
commit | f29d3b23238e1955a8094e038c72546e99308e61 (patch) | |
tree | 19c0f68b953f64f4e5a758de8f4d3e141a05de0b /drivers/ata | |
parent | 793180570ff2530d133343ceea85648de5f01b02 (diff) | |
download | kernel_samsung_smdk4412-f29d3b23238e1955a8094e038c72546e99308e61.zip kernel_samsung_smdk4412-f29d3b23238e1955a8094e038c72546e99308e61.tar.gz kernel_samsung_smdk4412-f29d3b23238e1955a8094e038c72546e99308e61.tar.bz2 |
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.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 7d3ae6a..f178a45 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) */ } } + + /* in order to keep device order, we need to synchronize at this point */ + async_synchronize_cookie(cookie); + + ata_scsi_scan_host(ap, 1); + } /** * ata_host_register - register initialized ATA host @@ -6033,15 +6039,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) struct ata_port *ap = host->ports[i]; async_schedule(async_port_probe, ap); } - async_synchronize_full(); - /* probes are done, now scan each port's disk(s) */ - DPRINTK("host probe begin\n"); - for (i = 0; i < host->n_ports; i++) { - struct ata_port *ap = host->ports[i]; - - ata_scsi_scan_host(ap, 1); - } - DPRINTK("host probe end\n"); + DPRINTK("probe end\n"); return 0; } |