From a763522da618955410fb301b97bb99eac5823ed7 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 26 Jan 2008 11:17:15 +0000 Subject: [PATCH] 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 --- src/add-ons/kernel/busses/usb/ehci.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 98d0416b2f..a18a69afaa 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -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;