[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236340355.16732.23.camel@localhost>
Date: Fri, 06 Mar 2009 12:52:35 +0100
From: Martin Bammer <mrbm74@...il.com>
To: linux-kernel@...r.kernel.org
Subject: usb/host/pci-quirks: Add option for setting handoff timeout for
ehci
When having a buggy BIOS which doesn't do ehci handoff correctly a 8s
boot delay is the result. This patch adds a kernel command line
parameter ehci_ho_to to be able to set an arbitrary timeout. On my
netbook I've set it to 50 which works without any problems. Maybe the
patch would be interesting for others?
--- a/drivers/usb/host/pci-quirks.c 2009-03-03 23:35:15.000000000 +0100
+++ b/drivers/usb/host/pci-quirks.c 2009-03-04 00:00:37.000000000 +0100
@@ -51,6 +51,7 @@
#define EHCI_USBLEGCTLSTS 4 /* legacy control/status */
#define EHCI_USBLEGCTLSTS_SOOE (1 << 13) /* SMI on ownership change */
+int ehci_ho_to = 5000;
/*
* Make sure the controller is completely inactive, unable to
@@ -209,6 +210,17 @@ static void __devinit quirk_usb_handoff_
iounmap(base);
}
+int __init ehci_ho_to_setup(char *str)
+{
+ if (str != NULL && *str != '\0') {
+ ehci_ho_to = simple_strtol(str, NULL, 0);
+ if (ehci_ho_to < 10) ehci_ho_to = 10;
+ }
+ return 1;
+}
+
+__setup("ehci_ho_to=", ehci_ho_to_setup);
+
static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
{
int wait_time, delta;
@@ -271,7 +283,7 @@ static void __devinit quirk_usb_disable_
/* if boot firmware now owns EHCI, spin till
* it hands it over.
*/
- msec = 5000;
+ msec = ehci_ho_to;
while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
tried_handoff = 1;
msleep(10);
--
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