From c43b256828601f49e88f648edce39b59eff307c3 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 5 Apr 2009 13:04:30 +0000 Subject: [PATCH] It turns out that on some BIOSes even if the handover is signaled as successful, the BIOS doesn't remove it's SMIs. When then initializing the controller this would trigger all sorts of stuff and for example freeze the system. We therefore always force off the SMIs, even if the handover didn't fail. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29931 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/busses/usb/ehci.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 2465b00b23..d23afe7509 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -200,15 +200,17 @@ EHCI::EHCI(pci_info *info, Stack *stack) if (legacySupport & EHCI_LEGSUP_BIOSOWNED) { TRACE_ERROR("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) { TRACE_ALWAYS("successfully took ownership of the host controller\n"); } + + // Force off the BIOS owned flag, and clear all SMIs. Some BIOSes + // do indicate a successful handover but do not remove their SMIs + // and then freeze the system when interrupts are generated. + 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 { TRACE("extended capability is not a legacy support register\n"); }