public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] EHCI handoff failure timeout too long
@ 2008-09-07  0:29 Steven Noonan
  2008-09-07  0:29 ` [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci() Steven Noonan
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Noonan @ 2008-09-07  0:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Noonan

Hey all. I've got an HP dv5178us notebook with an apparent BIOS
bug in which it doesn't properly report that it's completed the
EHCI handoff. Unfortunately, this causes a 5 second snag at
every boot. This is -much- too long in my opinion.

My resolution for the issue is simply to cut the 5 seconds down
to 0.5 seconds. I am unsure whether changing the timeout is
wise, though, because I suppose it's possible that a buggy BIOS
could announce the success of the handoff -after- the timeout.

Thoughts?

Steven Noonan (1):
  drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in
    quirk_usb_disable_ehci()

 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci()
  2008-09-07  0:29 [PATCH 0/1] EHCI handoff failure timeout too long Steven Noonan
@ 2008-09-07  0:29 ` Steven Noonan
  2008-09-09  4:44   ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Noonan @ 2008-09-07  0:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Noonan

This patch fixes a very noticeable bootup delay on some
systems (in my particular case, an HP dv5178us). The
problem is caused by a buggy BIOS which doesn't properly
announce that the handoff was completed.

The delay in the current version of pci-quirks.c is 5 seconds,
which I've cut down to 0.5 seconds.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index ae6e70e..9a3609a 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -271,7 +271,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
 			/* if boot firmware now owns EHCI, spin till
 			 * it hands it over.
 			 */
-			msec = 5000;
+			msec = 500;
 			while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
 				tried_handoff = 1;
 				msleep(10);
-- 
1.6.0.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci()
  2008-09-07  0:29 ` [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci() Steven Noonan
@ 2008-09-09  4:44   ` Andrew Morton
  2008-09-09 14:13     ` Alan Stern
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-09-09  4:44 UTC (permalink / raw)
  To: Steven Noonan; +Cc: linux-kernel, Steven Noonan, linux-usb


(cc linux-usb)

On Sat,  6 Sep 2008 17:29:53 -0700 Steven Noonan <steven.noonan@uplinklabs.net> wrote:

> This patch fixes a very noticeable bootup delay on some
> systems (in my particular case, an HP dv5178us). The
> problem is caused by a buggy BIOS which doesn't properly
> announce that the handoff was completed.
> 
> The delay in the current version of pci-quirks.c is 5 seconds,
> which I've cut down to 0.5 seconds.
> 
> Signed-off-by: Steven Noonan <steven@uplinklabs.net>
> ---
>  drivers/usb/host/pci-quirks.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
> index ae6e70e..9a3609a 100644
> --- a/drivers/usb/host/pci-quirks.c
> +++ b/drivers/usb/host/pci-quirks.c
> @@ -271,7 +271,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
>  			/* if boot firmware now owns EHCI, spin till
>  			 * it hands it over.
>  			 */
> -			msec = 5000;
> +			msec = 500;
>  			while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
>  				tried_handoff = 1;
>  				msleep(10);

I guess it risks breaking someone else's system.  Or perhaps the number
was just grabbed out of the air.

Can we do a separate quirk just for that machine (and ones with the
same bug)?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci()
  2008-09-09  4:44   ` Andrew Morton
@ 2008-09-09 14:13     ` Alan Stern
  2008-09-12 23:28       ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2008-09-09 14:13 UTC (permalink / raw)
  To: Steven Noonan
  Cc: Andrew Morton, Kernel development list, Steven Noonan, USB list

On Mon, 8 Sep 2008, Andrew Morton wrote:

> On Sat,  6 Sep 2008 17:29:53 -0700 Steven Noonan <steven.noonan@uplinklabs.net> wrote:
> 
> > This patch fixes a very noticeable bootup delay on some
> > systems (in my particular case, an HP dv5178us). The
> > problem is caused by a buggy BIOS which doesn't properly
> > announce that the handoff was completed.
> > 
> > The delay in the current version of pci-quirks.c is 5 seconds,
> > which I've cut down to 0.5 seconds.

> I guess it risks breaking someone else's system.  Or perhaps the number
> was just grabbed out of the air.

As far as I know, it was indeed just grabbed out of the air.  The spec 
specifically avoids giving an upper limit on how long to wait.

> Can we do a separate quirk just for that machine (and ones with the
> same bug)?

My BIOS has the same bug.  I wouldn't mind seeing the delay reduced.

Alan Stern


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci()
  2008-09-09 14:13     ` Alan Stern
@ 2008-09-12 23:28       ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2008-09-12 23:28 UTC (permalink / raw)
  To: Alan Stern
  Cc: Steven Noonan, Andrew Morton, Kernel development list,
	Steven Noonan, USB list

On Tuesday 09 September 2008, Alan Stern wrote:
> > > 
> > > The delay in the current version of pci-quirks.c is 5 seconds,
> > > which I've cut down to 0.5 seconds.
> 
> > I guess it risks breaking someone else's system.  Or perhaps the number
> > was just grabbed out of the air.
> 
> As far as I know, it was indeed just grabbed out of the air.  The spec 
> specifically avoids giving an upper limit on how long to wait.
> 
> > Can we do a separate quirk just for that machine (and ones with the
> > same bug)?
> 
> My BIOS has the same bug.  I wouldn't mind seeing the delay reduced.

I'm fairly sure that someone's system needed more than 1/2 second.
And that going from 500 to 5000 was the obvious "add a zero" way
to get to a long-enough timeout.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-12 23:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07  0:29 [PATCH 0/1] EHCI handoff failure timeout too long Steven Noonan
2008-09-07  0:29 ` [PATCH 1/1] drivers/usb/host/pci-quirks.c: wait for EHCI handoff far too long in quirk_usb_disable_ehci() Steven Noonan
2008-09-09  4:44   ` Andrew Morton
2008-09-09 14:13     ` Alan Stern
2008-09-12 23:28       ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox