If the BIOS doesn't give up ownership of an EHCI controller, simply clear the

BIOS owned flag and clear all possibly enabled SMIs. It seems to be common
practice to just ignore this error case, probably because there are enough
broken BIOSs out there that do not correctly hand over the controller.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25918 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-06-10 22:35:57 +00:00
parent 0ee6c1ea21
commit a0ace2dff6
1 changed files with 7 additions and 5 deletions

View File

@ -194,11 +194,13 @@ EHCI::EHCI(pci_info *info, Stack *stack)
}
if (legacySupport & EHCI_LEGSUP_BIOSOWNED) {
// in any case disable interrupts so we do not flood the system
// if the BIOS still decides to give up control
WriteOpReg(EHCI_USBINTR, 0);
TRACE_ERROR(("usb_ehci: bios won't give up control over the host controller\n"));
return;
TRACE_ERROR(("usb_ehci: bios won't give up control over the host controller (ignoring)\n"));
// turn off the BIOS owned flag, clear all SMIs and continue
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
fPCIInfo->function, extendedCapPointer + 2, 1, 0);
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
fPCIInfo->function, extendedCapPointer + 4, 4, 0);
} else if (legacySupport & EHCI_LEGSUP_OSOWNED) {
dprintf("usb_ehci: successfully took ownership of the host controller\n");
}