Add missing status code in several modules.

Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Fan Jeff <jeff.fan@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13890 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin
2012-10-30 04:23:40 +00:00
parent cb38c322f0
commit 37623a5c02
32 changed files with 478 additions and 109 deletions

View File

@@ -122,8 +122,20 @@ EhcReset (
EFI_STATUS Status;
UINT32 DbgCtrlStatus;
Ehc = EHC_FROM_THIS (This);
if (Ehc->DevicePath != NULL) {
//
// Report Status Code to indicate reset happens
//
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_PROGRESS_CODE,
(EFI_IO_BUS_USB | EFI_IOB_PC_RESET),
Ehc->DevicePath
);
}
OldTpl = gBS->RaiseTPL (EHC_TPL);
Ehc = EHC_FROM_THIS (This);
switch (Attributes) {
case EFI_USB_HC_RESET_GLOBAL:
@@ -1543,8 +1555,9 @@ EhcGetUsbDebugPortInfo (
**/
USB2_HC_DEV *
EhcCreateUsb2Hc (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT64 OriginalPciAttributes
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN UINT64 OriginalPciAttributes
)
{
USB2_HC_DEV *Ehc;
@@ -1578,6 +1591,7 @@ EhcCreateUsb2Hc (
Ehc->Usb2Hc.MinorRevision = 0x0;
Ehc->PciIo = PciIo;
Ehc->DevicePath = DevicePath;
Ehc->OriginalPciAttributes = OriginalPciAttributes;
InitializeListHead (&Ehc->AsyncIntTransfers);
@@ -1684,6 +1698,7 @@ EhcDriverBindingStart (
UINTN EhciDeviceNumber;
UINTN EhciFunctionNumber;
UINT32 State;
EFI_DEVICE_PATH_PROTOCOL *HcDevicePath;
//
// Open the PciIo Protocol, then enable the USB host controller
@@ -1701,6 +1716,19 @@ EhcDriverBindingStart (
return Status;
}
//
// Open Device Path Protocol for on USB host controller
//
HcDevicePath = NULL;
Status = gBS->OpenProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
(VOID **) &HcDevicePath,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
PciAttributesSaved = FALSE;
//
// Save original PCI attributes
@@ -1842,7 +1870,7 @@ EhcDriverBindingStart (
//
// Create then install USB2_HC_PROTOCOL
//
Ehc = EhcCreateUsb2Hc (PciIo, OriginalPciAttributes);
Ehc = EhcCreateUsb2Hc (PciIo, HcDevicePath, OriginalPciAttributes);
if (Ehc == NULL) {
DEBUG ((EFI_D_ERROR, "EhcDriverBindingStart: failed to create USB2_HC\n"));

View File

@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <IndustryStandard/Pci.h>
@@ -115,6 +116,7 @@ struct _USB2_HC_DEV {
EFI_USB2_HC_PROTOCOL Usb2Hc;
EFI_PCI_IO_PROTOCOL *PciIo;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
UINT64 OriginalPciAttributes;
USBHC_MEM_POOL *MemPool;

View File

@@ -11,7 +11,7 @@
# This way avoids the control transfer on a shared port between EHCI and companion host
# controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts.
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -75,6 +75,7 @@
BaseMemoryLib
DebugLib
PcdLib
ReportStatusCodeLib
[Guids]
gEfiEventExitBootServicesGuid ## PRODUCES ## Event