* usb/host/pci-quirks: Add option for setting handoff timeout for ehci
@ 2009-03-06 11:52 Martin Bammer
2009-03-06 17:50 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Martin Bammer @ 2009-03-06 11:52 UTC (permalink / raw)
To: linux-kernel
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usb/host/pci-quirks: Add option for setting handoff timeout for ehci
2009-03-06 11:52 usb/host/pci-quirks: Add option for setting handoff timeout for ehci Martin Bammer
@ 2009-03-06 17:50 ` Greg KH
2009-03-06 19:26 ` Martin Bammer
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2009-03-06 17:50 UTC (permalink / raw)
To: Martin Bammer; +Cc: linux-kernel
On Fri, Mar 06, 2009 at 12:52:35PM +0100, Martin Bammer wrote:
> 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?
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usb/host/pci-quirks: Add option for setting handoff timeout for ehci
2009-03-06 17:50 ` Greg KH
@ 2009-03-06 19:26 ` Martin Bammer
2009-03-07 2:22 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Martin Bammer @ 2009-03-06 19:26 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
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.
> > 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?
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usb/host/pci-quirks: Add option for setting handoff timeout for ehci
2009-03-06 19:26 ` Martin Bammer
@ 2009-03-07 2:22 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-03-07 2:22 UTC (permalink / raw)
To: Martin Bammer; +Cc: linux-kernel
A: No.
Q: Should I include quotations after my reply?
On Fri, Mar 06, 2009 at 08:26:45PM +0100, Martin Bammer wrote:
> Yes right. It fails faster, because the bios doesn't handoff the device.
And that's bad.
> 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.
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-07 2:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 11:52 usb/host/pci-quirks: Add option for setting handoff timeout for ehci Martin Bammer
2009-03-06 17:50 ` Greg KH
2009-03-06 19:26 ` Martin Bammer
2009-03-07 2:22 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox