LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
@ 2008-11-04  4:57 Steven Noonan
  2008-11-04  5:32 ` Jeff Garzik
  2008-11-05 10:00 ` Pavel Machek
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Noonan @ 2008-11-04  4:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: Steven Noonan, Andrew Morton, Alan Stern, Greg KH, David Brownell

Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a
1000ms loop to wait for the BIOS to acknowledge the handoff.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
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..1968ba1 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 = 1000;
 			while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
 				tried_handoff = 1;
 				msleep(10);
-- 
1.5.6.3


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

* Re: [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
  2008-11-04  4:57 [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long Steven Noonan
@ 2008-11-04  5:32 ` Jeff Garzik
  2008-11-04  6:51   ` David Brownell
  2008-11-05 10:00 ` Pavel Machek
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2008-11-04  5:32 UTC (permalink / raw)
  To: Steven Noonan
  Cc: linux-kernel, Andrew Morton, Alan Stern, Greg KH, David Brownell

Steven Noonan wrote:
> Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a
> 1000ms loop to wait for the BIOS to acknowledge the handoff.
> 
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg KH <greg@kroah.com>
> Cc: David Brownell <david-b@pacbell.net>
> 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..1968ba1 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 = 1000;
>  			while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
>  				tried_handoff = 1;

That tells us nothing about the original reason for choosing the 5000 
value, and what if any impact lowering the value has on those who 
thought 5000 was needed.

	Jeff




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

* Re: [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
  2008-11-04  5:32 ` Jeff Garzik
@ 2008-11-04  6:51   ` David Brownell
  2008-11-04  7:47     ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: David Brownell @ 2008-11-04  6:51 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Steven Noonan, linux-kernel, Andrew Morton, Alan Stern, Greg KH

On Monday 03 November 2008, Jeff Garzik wrote:
> That tells us nothing about the original reason for choosing the 5000 
> value, and what if any impact lowering the value has on those who 
> thought 5000 was needed.

You mean, the source code should have a comment about that?

The *original* BIOS-broken timeout was some fraction of a second
(I'm thinking 250 msec, maybe not), but I got some reports about
BIOS versions that were too sluggish to work with that.  ISTR
that half a second wasn't quite reliable, so 1+ seconds seemed
to be called for.

So rather than incremental increases, it went from 250 msec up
to 5000 msec, and this is the first complaint we've had about
that in *many* years.

- Dave

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

* Re: [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
  2008-11-04  6:51   ` David Brownell
@ 2008-11-04  7:47     ` Jeff Garzik
  2008-11-04  7:53       ` Steven Noonan
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2008-11-04  7:47 UTC (permalink / raw)
  To: David Brownell
  Cc: Steven Noonan, linux-kernel, Andrew Morton, Alan Stern, Greg KH

David Brownell wrote:
> On Monday 03 November 2008, Jeff Garzik wrote:
>> That tells us nothing about the original reason for choosing the 5000 
>> value, and what if any impact lowering the value has on those who 
>> thought 5000 was needed.
> 
> You mean, the source code should have a comment about that?

I was thinking changeset description (email body), but source code 
comment works too.

	Jeff




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

* Re: [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
  2008-11-04  7:47     ` Jeff Garzik
@ 2008-11-04  7:53       ` Steven Noonan
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Noonan @ 2008-11-04  7:53 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: David Brownell, linux-kernel, Andrew Morton, Alan Stern, Greg KH

On Mon, Nov 3, 2008 at 11:47 PM, Jeff Garzik <jeff@garzik.org> wrote:
> David Brownell wrote:
>>
>> On Monday 03 November 2008, Jeff Garzik wrote:
>>>
>>> That tells us nothing about the original reason for choosing the 5000
>>> value, and what if any impact lowering the value has on those who thought
>>> 5000 was needed.
>>
>> You mean, the source code should have a comment about that?
>
> I was thinking changeset description (email body), but source code comment
> works too.
>
>        Jeff
>

I really need to start getting into the habit of 'reply to all'.
Apologies for the extra email, Jeff:



 Sorry, I should really be more verbose in the commit log.

 The five second delay is really quite irritating to have to deal with
 every boot up, and I very seriously doubt any non-broken bios takes
 more than a second to do the actual handoff.

 - Steven


>
>
>

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

* Re: [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long
  2008-11-04  4:57 [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long Steven Noonan
  2008-11-04  5:32 ` Jeff Garzik
@ 2008-11-05 10:00 ` Pavel Machek
  1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2008-11-05 10:00 UTC (permalink / raw)
  To: Steven Noonan
  Cc: linux-kernel, Andrew Morton, Alan Stern, Greg KH, David Brownell

On Mon 2008-11-03 20:57:15, Steven Noonan wrote:
> Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a
> 1000ms loop to wait for the BIOS to acknowledge the handoff.
> 
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg KH <greg@kroah.com>
> Cc: David Brownell <david-b@pacbell.net>
> 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..1968ba1 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 = 1000;
>  			while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
>  				tried_handoff = 1;
>  				msleep(10);

If the bios is non-broken, it will acknowledge hndover and it takes
10msec total.

If the bios is broken, 5 seconds may be handy.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2008-11-05 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-04  4:57 [PATCH] EHCI pci-quirks.c: wait for BIOS handoff too long Steven Noonan
2008-11-04  5:32 ` Jeff Garzik
2008-11-04  6:51   ` David Brownell
2008-11-04  7:47     ` Jeff Garzik
2008-11-04  7:53       ` Steven Noonan
2008-11-05 10:00 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).