Commit d8bf5435 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] ohci-hcd, longer bios handshake timeout

This should resolve the problems Nicolas Mailhot reported,
where an old BIOS seemed reluctant to release the controller
and the dbg() message delayed things enough to work.  At
worst, it'll eliminate dbg() messages as a factor.
parent 05a3b5ee
......@@ -383,10 +383,16 @@ static int hc_reset (struct ohci_hcd *ohci)
/* SMM owns the HC? not for long! */
if (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
temp = 50; /* arbitrary: half second */
dbg ("USB HC TakeOver from BIOS/SMM");
/* this timeout is arbitrary. we make it long, so systems
* depending on usb keyboards may be usable even if the
* BIOS/SMM code seems pretty broken.
*/
temp = 500; /* arbitrary: five seconds */
writel (OHCI_INTR_OC, &ohci->regs->intrenable);
writel (OHCI_OCR, &ohci->regs->cmdstatus);
dbg ("USB HC TakeOver from SMM");
while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
wait_ms (10);
if (--temp == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment