We are not supposed to overwrite the full capability register when setting our

OS-owned bit. Otherwise we overwrite exactly the bit we later have to wait for.
Could theoretically help on legacy support issues, but I doubt it since most
hardware probably does not even use EHCI legacy support as it's normally not
needed to support full/low-speed input devices.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-01-26 11:17:15 +00:00
parent 803a36434d
commit a763522da6

View File

@ -166,20 +166,19 @@ EHCI::EHCI(pci_info *info, Stack *stack)
uint32 legacySupport = sPCIModule->read_pci_config(fPCIInfo->bus,
fPCIInfo->device, fPCIInfo->function, extendedCapPointer, 4);
if ((legacySupport & EHCI_LEGSUP_CAPID_MASK) == EHCI_LEGSUP_CAPID) {
if (legacySupport & EHCI_LEGSUP_BIOSOWNED) {
TRACE(("usb_ehci: the host controller is bios owned\n"));
}
if (legacySupport & EHCI_LEGSUP_BIOSOWNED)
dprintf("usb_ehci: the host controller is bios owned\n");
dprintf("usb_ehci: claiming ownership of the host controller\n");
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
fPCIInfo->function, extendedCapPointer, 4, EHCI_LEGSUP_OSOWNED);
fPCIInfo->function, extendedCapPointer + 3, 1, 1);
for (int32 i = 0; i < 10; i++) {
legacySupport = sPCIModule->read_pci_config(fPCIInfo->bus,
fPCIInfo->device, fPCIInfo->function, extendedCapPointer, 4);
if (legacySupport & EHCI_LEGSUP_BIOSOWNED) {
TRACE(("usb_ehci: controller is still bios owned, waiting\n"));
dprintf("usb_ehci: controller is still bios owned, waiting\n");
snooze(50000);
} else
break;