]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
1. Sync Tcp4 protocol definitions to match UEFI 2.1
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / Ehci.c
index 093388d45f69e593bae3d5f0e1537909db41e809..0eaa9cce5dec3e0aa9b843f79a6d37002d72b043 100644 (file)
@@ -351,7 +351,7 @@ EhcGetRootHubPortStatus (
 \r
   for (Index = 0; Index < MapSize; Index++) {\r
     if (EHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {\r
-      PortStatus->PortStatus |= mUsbPortStateMap[Index].UefiState;\r
+      PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | mUsbPortStateMap[Index].UefiState);\r
     }\r
   }\r
 \r
@@ -359,7 +359,7 @@ EhcGetRootHubPortStatus (
 \r
   for (Index = 0; Index < MapSize; Index++) {\r
     if (EHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {\r
-      PortStatus->PortChangeStatus |= mUsbPortChangeMap[Index].UefiState;\r
+      PortStatus->PortChangeStatus = (UINT16) (PortStatus->PortChangeStatus | mUsbPortChangeMap[Index].UefiState);\r
     }\r
   }\r
 \r
@@ -707,7 +707,7 @@ EhcControlTransfer (
   // endpoint is bidirectional. EhcCreateUrb expects this\r
   // combination of Ep addr and its direction.\r
   //\r
-  Endpoint = 0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0);\r
+  Endpoint = (UINT8) (0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0));\r
   Urb = EhcCreateUrb (\r
           Ehc,\r
           DeviceAddress,\r
@@ -1271,8 +1271,6 @@ EhcAsyncIsochronousTransfer (
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-//@MT: EFI_DRIVER_ENTRY_POINT (EhcDriverEntryPoint)\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 EhcDriverEntryPoint (\r
@@ -1340,7 +1338,7 @@ EhcDriverBindingSupported (
   Status = gBS->OpenProtocol (\r
                   Controller,\r
                   &gEfiPciIoProtocolGuid,\r
-                  &PciIo,\r
+                  (VOID **) &PciIo,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -1491,7 +1489,7 @@ EhcDriverBindingStart (
   Status = gBS->OpenProtocol (\r
                   Controller,\r
                   &gEfiPciIoProtocolGuid,\r
-                  &PciIo,\r
+                  (VOID **) &PciIo,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -1636,7 +1634,7 @@ EhcDriverBindingStop (
   Status = gBS->OpenProtocol (\r
                   Controller,\r
                   &gEfiUsb2HcProtocolGuid,\r
-                  &Usb2Hc,\r
+                  (VOID **) &Usb2Hc,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r