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
This commit is contained in:
Michael Lotz 2009-04-05 13:04:30 +00:00
parent afa564ec96
commit c43b256828

View File

@ -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");
}