lkml.org 
[lkml]   [2009]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectusb/host/pci-quirks: Add option for setting handoff timeout for ehci
From
Date
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);



\
 
 \ /
  Last update: 2009-03-06 12:55    [W:0.051 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site