]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
Add missing status code in several modules.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.c
index e8f9ed5018dc3c64bf110334b7eb8a9f4484fd8f..873cf2519afb501c886810547a8af3f2f513629b 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1018,7 +1018,16 @@ UsbBusBuildProtocol (
   RootIf->Signature       = USB_INTERFACE_SIGNATURE;\r
   RootIf->Device          = RootHub;\r
   RootIf->DevicePath      = UsbBus->DevicePath;\r
-\r
+  \r
+  //\r
+  // Report Status Code here since we will enumerate the USB devices\r
+  //\r
+  REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+    EFI_PROGRESS_CODE,\r
+    (EFI_IO_BUS_USB | EFI_IOB_PC_DETECT),\r
+    UsbBus->DevicePath\r
+    );\r
+  \r
   Status                  = mUsbRootHubApi.Init (RootIf);\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -1265,6 +1274,26 @@ UsbBusControllerDriverStart (
 {\r
   EFI_USB_BUS_PROTOCOL          *UsbBusId;\r
   EFI_STATUS                    Status;\r
+  EFI_DEVICE_PATH_PROTOCOL      *ParentDevicePath;\r
+\r
+  Status = gBS->OpenProtocol (\r
+                  Controller,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  (VOID **) &ParentDevicePath,\r
+                  This->DriverBindingHandle,\r
+                  Controller,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Report Status Code here since we will initialize the host controller\r
+  //\r
+  REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+    EFI_PROGRESS_CODE,\r
+    (EFI_IO_BUS_USB | EFI_IOB_PC_INIT),\r
+    ParentDevicePath\r
+    );\r
 \r
   //\r
   // Locate the USB bus protocol, if it is found, USB bus\r