From: Arjan van de Ven <arjan@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Arjan van de Ven <arjan@infradead.org>, linux-ide@vger.kernel.org
Subject: [patch 1/2] fastboot: Add a module parameter to skip probing of specific ports
Date: Mon, 11 Aug 2008 15:36:41 -0700 [thread overview]
Message-ID: <20080811153641.706726ec@infradead.org> (raw)
In-Reply-To: <20080811153542.61095e5c@infradead.org>
From: Kristen Accardi <kristen.c.accardi@intel.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@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.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
next prev parent reply other threads:[~2008-08-11 22:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 22:35 [patch 0/2] fastboot: allow skipping probing of known-unused ports in libata Arjan van de Ven
2008-08-11 22:36 ` Arjan van de Ven [this message]
2008-08-12 7:39 ` [patch 1/2] fastboot: Add a module parameter to skip probing of specific ports Alan Cox
2008-08-12 11:36 ` Arjan van de Ven
2008-08-12 12:00 ` Alan Cox
2008-08-12 14:02 ` Arjan van de Ven
2008-08-12 14:21 ` Alan Cox
2008-08-11 22:37 ` [patch 2/2] fastboot: use a DMI match table to set defaults for port-disable Arjan van de Ven
2008-08-12 1:09 ` Marcel Holtmann
2008-08-12 5:04 ` Arjan van de Ven
2008-08-12 8:10 ` Alan Cox
2008-08-12 11:37 ` Arjan van de Ven
2008-08-12 11:58 ` Alan Cox
2008-08-20 22:46 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080811153641.706726ec@infradead.org \
--to=arjan@infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®