usb/host/pci-quirks: Add option for setting handoff timeout for ehci
Subsystems (2)
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?
drivers/usb/host/pci-quirks.c +13 -1
@@ -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 );
Quoted 5 lines · Martin Bammer
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_toto 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?
I don't see how this makes anything go faster, you are just changing the timeout value, which should only make things fail faster, not succeed faster :)
thanks,
greg k-h
Yes right. It fails faster, because the bios doesn't handoff the device. But it's no help for the user that he always has to wait 8s because of a buggy bios. Although the handoff fails the usb-controller works without any problems.
Quoted 13 lines
Quoted 5 lines
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_toto 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?I don't see how this makes anything go faster, you are just changing the timeout value, which should only make things fail faster, not succeed faster :)
thanks,
greg k-h
A: No.
Q: Should I include quotations after my reply?
Quoted 1 line · Martin Bammer
Yes right. It fails faster, because the bios doesn't handoff the device.
And that's bad.
Quoted 2 lines
But it's no help for the user that he always has to wait 8s because of a buggy bios.
Complain to the manufacturer so they can fix the bios.
Quoted 2 lines
Although the handoff fails the usb-controller works without any problems.
For some reason, I really don't believe that this would always be the case :)
So sorry, we can't take this.
thanks,
greg k-h