Skip to contentSkip to conversation

EHCI pci-quirks.c: wait for BIOS handoff too long

PATCH In review Steven Noonan 4 participants 6 messages Nov 4, 2008 – Nov 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EHCI pci-quirks.c: wait for BIOS handoff too long

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 <[email protected]>
Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc David Brownell <[email protected]>
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/pci-quirks.c +1 -1
index ae6e70e..1968ba1 100644
@@ -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);
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 17 lines · Steven Noonan

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 <[email protected]>
Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc David Brownell <[email protected]>
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/pci-quirks.c +0 -0
index ae6e70e..1968ba1 100644

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) · line 276

Quoted 7 lines
drivers/usb/host/pci-quirks.c +1 -1
@@ -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

#2 lore raw
Quoted 3 lines · Jeff Garzik

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

#3 lore raw
Quoted 4 lines · David Brownell
Quoted 1 line · Jeff Garzik

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

#4 lore raw
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · David Brownell
Quoted 4 lines · Jeff Garzik

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.

Quoted 7 lines
Quoted 1 line

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

Quoted 3 lines
#5 lore raw
In reply to Steven Noonan
Quoted 17 lines · Steven Noonan

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 <[email protected]>
Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc David Brownell <[email protected]>
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/pci-quirks.c +0 -0
index ae6e70e..1968ba1 100644

drivers/usb/host/pci-quirks.c static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) · line 277

Quoted 8 lines
drivers/usb/host/pci-quirks.c +1 -1
@@ -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

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