X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FBus%2FPci%2FEhci%2FDxe%2FEhci.c;h=2d6dc838a4a71218ae68bf23498b71b332127317;hp=c6105eb0b545952ea47fa3680337ea3579152aa3;hb=61fb1657e5b2b37a2ec5c879f6fa7689100f0d54;hpb=71a62114eb16255adaf886be35edecf0045bb494 diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c index c6105eb0b5..2d6dc838a4 100644 --- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c +++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c @@ -218,13 +218,11 @@ EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding = { EhciDriverBindingSupported, EhciDriverBindingStart, EhciDriverBindingStop, - 0x10, + 0xa, NULL, NULL }; -UINT32 mUsbCapabilityLen; -UINT32 mDeviceSpeed[16]; EFI_STATUS EFIAPI @@ -441,6 +439,13 @@ EhciDriverBindingStart ( Status = EFI_DEVICE_ERROR; goto uninstall_usb2hc_protocol; } + + ClearLegacySupport (HcDev); + HostReset (HcDev); + + DEBUG_CODE ( + DumpEHCIPortsStatus (HcDev); + ); // // Create and Init Perodic Frame List @@ -1276,9 +1281,9 @@ EhciGetRootHubPortStatus ( // Not Low Speed Device Attached // if ((PORTSC_CCS & PortStatusControlReg) && (PORTSC_CSC & PortStatusControlReg)) { - mDeviceSpeed[PortNumber] = IsHighSpeedDevice (This, PortNumber) ? USB_PORT_STAT_HIGH_SPEED : 0; + HcDev->DeviceSpeed[PortNumber] = IsHighSpeedDevice (This, PortNumber) ? USB_PORT_STAT_HIGH_SPEED : 0; } - PortStatus->PortStatus |= mDeviceSpeed[PortNumber]; + PortStatus->PortStatus |= HcDev->DeviceSpeed[PortNumber]; } // // Fill Port Status Change bits @@ -1403,7 +1408,7 @@ EhciSetRootHubPortFeature ( } Status = WaitForEhcNotHalt (HcDev, EHCI_GENERIC_TIMEOUT); if (EFI_ERROR (Status)) { - DEBUG ((gEHCDebugLevel, "WaitForEhcNotHalt TimeOut\n")); + DEBUG ((gEHCDebugLevel, "EHCI: WaitForEhcNotHalt TimeOut\n")); Status = EFI_DEVICE_ERROR; goto exit; }