diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 30ad2b2ffe..89ed034b90 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -1918,7 +1918,9 @@ EhcDriverBindingStart ( EhcClearLegacySupport (Ehc); } - if (Ehc->DebugPortNum != 0) { + if (Ehc->DebugPortNum == 0) { + EhcResetHC (Ehc, EHC_RESET_TIMEOUT); + } else { State = EhcReadDbgRegister(Ehc, 0); if ((State & (USB_DEBUG_PORT_IN_USE | USB_DEBUG_PORT_OWNER)) != (USB_DEBUG_PORT_IN_USE | USB_DEBUG_PORT_OWNER)) { EhcResetHC (Ehc, EHC_RESET_TIMEOUT);