From a0ace2dff6fd640baea8259a91f5a53ba757ed0c Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 10 Jun 2008 22:35:57 +0000 Subject: [PATCH] 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 --- src/add-ons/kernel/busses/usb/ehci.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 31caf74004..3df536339f 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -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"); }