ChangeSet 1.808.2.2, 2002/10/21 23:21:09-07:00, dbrownell@users.sourceforge.net [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. diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c Mon Oct 28 13:56:49 2002 +++ b/drivers/usb/host/ohci-hcd.c Mon Oct 28 13:56:49 2002 @@ -383,10 +383,16 @@ /* 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) {