X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FEhciDxe%2FEhci.c;h=13ce7fdfb1f9f9f58b4e57f107e46d12a8103642;hp=093388d45f69e593bae3d5f0e1537909db41e809;hb=f527bce3d07ff80c7fff9684b2c7cdc02805c32e;hpb=913cb9dc645d6db47d8c2a0be0369083b8bed25d diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 093388d45f..13ce7fdfb1 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -351,7 +351,7 @@ EhcGetRootHubPortStatus ( for (Index = 0; Index < MapSize; Index++) { if (EHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) { - PortStatus->PortStatus |= mUsbPortStateMap[Index].UefiState; + PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | mUsbPortStateMap[Index].UefiState); } } @@ -359,7 +359,7 @@ EhcGetRootHubPortStatus ( for (Index = 0; Index < MapSize; Index++) { if (EHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) { - PortStatus->PortChangeStatus |= mUsbPortChangeMap[Index].UefiState; + PortStatus->PortChangeStatus = (UINT16) (PortStatus->PortChangeStatus | mUsbPortChangeMap[Index].UefiState); } } @@ -707,7 +707,7 @@ EhcControlTransfer ( // endpoint is bidirectional. EhcCreateUrb expects this // combination of Ep addr and its direction. // - Endpoint = 0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0); + Endpoint = (UINT8) (0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0)); Urb = EhcCreateUrb ( Ehc, DeviceAddress, @@ -1271,8 +1271,6 @@ EhcAsyncIsochronousTransfer ( return EFI_UNSUPPORTED; } -//@MT: EFI_DRIVER_ENTRY_POINT (EhcDriverEntryPoint) - EFI_STATUS EFIAPI EhcDriverEntryPoint ( @@ -1297,14 +1295,13 @@ Returns: --*/ { - return EfiLibInstallAllDriverProtocols ( + return EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gEhciDriverBinding, ImageHandle, &gEhciComponentName, - NULL, - NULL + &gEhciComponentName2 ); } @@ -1340,7 +1337,7 @@ EhcDriverBindingSupported ( Status = gBS->OpenProtocol ( Controller, &gEfiPciIoProtocolGuid, - &PciIo, + (VOID **) &PciIo, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -1491,7 +1488,7 @@ EhcDriverBindingStart ( Status = gBS->OpenProtocol ( Controller, &gEfiPciIoProtocolGuid, - &PciIo, + (VOID **) &PciIo, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -1567,12 +1564,21 @@ EhcDriverBindingStart ( // Install the component name protocol, don't fail the start // because of something for display. // - AddUnicodeString ( + AddUnicodeString2 ( "eng", gEhciComponentName.SupportedLanguages, &Ehc->ControllerNameTable, - L"Enhanced Host Controller (USB 2.0)" + L"Enhanced Host Controller (USB 2.0)", + TRUE ); + AddUnicodeString2 ( + "en", + gEhciComponentName2.SupportedLanguages, + &Ehc->ControllerNameTable, + L"Enhanced Host Controller (USB 2.0)", + FALSE + ); + EHC_DEBUG (("EhcDriverBindingStart: EHCI started for controller @ %x\n", Controller)); return EFI_SUCCESS; @@ -1636,7 +1642,7 @@ EhcDriverBindingStop ( Status = gBS->OpenProtocol ( Controller, &gEfiUsb2HcProtocolGuid, - &Usb2Hc, + (VOID **) &Usb2Hc, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_GET_PROTOCOL