diff options
author | Elvin Li <elvin.li@intel.com> | 2013-10-09 08:30:59 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-09 08:30:59 +0000 |
commit | 5bcb62a4098c9bde9be6af0833a025adc768e08d (patch) | |
tree | aea7df61e6a61c6f0f43b19c58206adea8de3364 /MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | |
parent | 980f3026e56ef7868962bbca386655f11c10fd33 (diff) | |
download | edk2-platforms-5bcb62a4098c9bde9be6af0833a025adc768e08d.tar.xz |
Just like EhciDxe, do not reset host controller when debug capability is enabled in XhciDxe driver.
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14760 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c')
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c index 3e578975ad..8debc4c18c 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -164,6 +164,11 @@ XhcReset ( // Flow through, same behavior as Host Controller Reset // case EFI_USB_HC_RESET_HOST_CONTROLLER: + if (((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset) & 0xFF) == XHC_CAP_USB_DEBUG) && + ((XhcReadExtCapReg (Xhc, Xhc->DebugCapSupOffset + XHC_DC_DCCTRL) & BIT0) != 0)) { + Status = EFI_SUCCESS; + goto ON_EXIT; + } // // Host Controller must be Halt when Reset it // @@ -1755,7 +1760,8 @@ XhcCreateUsbHc ( ExtCapReg = (UINT16) (Xhc->HcCParams.Data.ExtCapReg); Xhc->ExtCapRegBase = ExtCapReg << 2; - Xhc->UsbLegSupOffset = XhcGetLegSupCapAddr (Xhc); + Xhc->UsbLegSupOffset = XhcGetCapabilityAddr (Xhc, XHC_CAP_USB_LEGACY); + Xhc->DebugCapSupOffset = XhcGetCapabilityAddr (Xhc, XHC_CAP_USB_DEBUG); DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: Capability length 0x%x\n", Xhc->CapLength)); DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: HcSParams1 0x%x\n", Xhc->HcSParams1)); @@ -1764,6 +1770,7 @@ XhcCreateUsbHc ( DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: DBOff 0x%x\n", Xhc->DBOff)); DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: RTSOff 0x%x\n", Xhc->RTSOff)); DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: UsbLegSupOffset 0x%x\n", Xhc->UsbLegSupOffset)); + DEBUG ((EFI_D_INFO, "XhcCreateUsb3Hc: DebugCapSupOffset 0x%x\n", Xhc->DebugCapSupOffset)); // // Create AsyncRequest Polling Timer |