[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080811153641.706726ec@infradead.org>
Date: Mon, 11 Aug 2008 15:36:41 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: Arjan van de Ven <arjan@...radead.org>, linux-ide@...r.kernel.org
Subject: [patch 1/2] fastboot: Add a module parameter to skip probing of
specific ports
From: Kristen Accardi <kristen.c.accardi@...el.com>
Subject: [PATCH] libata: Add a module parameter to skip probing of specific ports
Port probing by libata can easily take 10% or more of the kernel boot
time (2%+ of total). For cases where one knows there is nothing
connected to certain ports (for example on netbooks) this is a waste
of boot time.
This patch adds a module parameter that allows the admin to specify
to skip ports (specified by a bitmask) and recoup this boot time.
This capability is potentially also useful to get systems to boot
for cases where port-probing on a certain ports causes crashes.
A follow-on patch will add the capability to use DMI identification
to automate this for certain known systems.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@...el.com>
Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
---
drivers/ata/libata-core.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 5ba96c5..831a8ca 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -148,6 +148,10 @@ static int ata_probe_timeout;
module_param(ata_probe_timeout, int, 0444);
MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)");
+static int libata_disable_ports;
+module_param_named(disable_ports, libata_disable_ports, int, 0444);
+MODULE_PARM_DESC(disable_ports, "Disable specified ports (as bitmask) at boot time");
+
int libata_noacpi = 0;
module_param_named(noacpi, libata_noacpi, int, 0444);
MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in probe/suspend/resume when set");
@@ -5651,6 +5655,13 @@ 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];
+ /*
+ * check if the port is specified as 'to disable' by either
+ * a module parameter or a DMI match
+ */
+ if (libata_disable_ports & (1 << ap->port_no))
+ continue;
+
/* probe */
if (ap->ops->error_handler) {
struct ata_eh_info *ehi = &ap->link.eh_info;
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists