]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
Roll back r12434.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusPei / UsbPeim.c
index b63173d18184d677ece1163bff627d607450d5e9..4a5d8e8bc4265fc143794b051401de9ca05d9aa4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The module to produce Usb Bus PPI.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -307,13 +307,13 @@ PeiHubEnumeration (
         NewPeiUsbDevice->DeviceSpeed = (UINT8)IsPortLowSpeedDeviceAttached (PortStatus.PortStatus);\r
 \r
         if(NewPeiUsbDevice->DeviceSpeed != EFI_USB_SPEED_HIGH) {\r
-          if (PeiUsbDevice->DeviceSpeed == EFI_USB_SPEED_HIGH) {\r
-            NewPeiUsbDevice->Translator.TranslatorPortNumber = (UINT8)Index;\r
-            NewPeiUsbDevice->Translator.TranslatorHubAddress = *CurrentAddress;\r
-          } else {\r
-            CopyMem(&(NewPeiUsbDevice->Translator), &(PeiUsbDevice->Translator), sizeof(EFI_USB2_HC_TRANSACTION_TRANSLATOR));\r
+           if (PeiUsbDevice->DeviceSpeed == EFI_USB_SPEED_HIGH) {\r
+             NewPeiUsbDevice->Translator.TranslatorPortNumber = (UINT8)Index;\r
+             NewPeiUsbDevice->Translator.TranslatorHubAddress = *CurrentAddress;\r
+           } else {\r
+               CopyMem(&(NewPeiUsbDevice->Translator), &(PeiUsbDevice->Translator), sizeof(EFI_USB2_HC_TRANSACTION_TRANSLATOR));\r
           }\r
-        }\r
+       }\r
 \r
         //\r
         // Configure that Usb Device\r
@@ -380,21 +380,18 @@ PeiUsbEnumeration (
 \r
 \r
   CurrentAddress = 0;\r
-  if (Usb2HcPpi != NULL) {\r
+  if (Usb2HcPpi != NULL){\r
     Usb2HcPpi->GetRootHubPortNumber (\r
                 PeiServices,\r
                 Usb2HcPpi,\r
                 (UINT8 *) &NumOfRootPort\r
                 );    \r
-  } else if (UsbHcPpi != NULL) {\r
+  } else {\r
     UsbHcPpi->GetRootHubPortNumber (\r
                 PeiServices,\r
                 UsbHcPpi,\r
                 (UINT8 *) &NumOfRootPort\r
                 );\r
-  } else {\r
-    ASSERT (FALSE);\r
-    return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   for (Index = 0; Index < NumOfRootPort; Index++) {\r