From: Martin Bammer <mrbm74@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: usb/host/pci-quirks: Add option for setting handoff timeout for ehci
Date: Fri, 06 Mar 2009 12:52:35 +0100 [thread overview]
Message-ID: <1236340355.16732.23.camel@localhost> (raw)
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);
next reply other threads:[~2009-03-06 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 11:52 Martin Bammer [this message]
2009-03-06 17:50 ` usb/host/pci-quirks: Add option for setting handoff timeout for ehci Greg KH
2009-03-06 19:26 ` Martin Bammer
2009-03-07 2:22 ` Greg KH
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=1236340355.16732.23.camel@localhost \
--to=mrbm74@gmail.com \
--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