MdeMdeModulePkg/UsbBusDxe: If DisconnectController() returns an error the USB Bus Driver would retry the DisconnectController() from a timer event until it succeeds

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14819 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Feng Tian
2013-10-30 03:49:24 +00:00
committed by erictian
parent 95d0cb1403
commit 127884c52a
4 changed files with 64 additions and 19 deletions

View File

@@ -988,6 +988,10 @@ UsbHubResetPort (
for (Index = 0; Index < USB_WAIT_PORT_STS_CHANGE_LOOP; Index++) {
Status = UsbHubGetPortStatus (HubIf, Port, &PortState);
if (EFI_ERROR (Status)) {
return Status;
}
if (!EFI_ERROR (Status) &&
USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {
gBS->Stall (USB_SET_PORT_RECOVERY_STALL);