MdeModulePkg/UsbMass: Revert changes of removing retry logic

This patch is used to revert changes done in commit 17f3e942
bc527fbd75068d2d5752b6af54917487 - "MdeModulePkg/UsbMass: Not
retry if usb bot transfer execution fail"

It's because Usb Floppy will report DEVICE_ERROR for the first
several cmds when it need spin up. so retry logic makes sense.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Feng Tian
2016-11-07 15:46:16 +08:00
parent f56ae7bf82
commit b17d5507cf
2 changed files with 3 additions and 12 deletions

View File

@@ -189,11 +189,6 @@ UsbBootExecCmd (
return EFI_TIMEOUT;
}
if (Status == EFI_DEVICE_ERROR) {
DEBUG ((EFI_D_ERROR, "UsbBootExecCmd: Device Error to Exec 0x%x Cmd\n", *(UINT8 *)Cmd));
return EFI_DEVICE_ERROR;
}
//
// If ExecCommand() returns no error and CmdResult is success,
// then the commnad transfer is successful.
@@ -276,7 +271,7 @@ UsbBootExecCmdWithRetry (
DataLen,
Timeout
);
if (Status == EFI_SUCCESS || Status == EFI_MEDIA_CHANGED || Status == EFI_NO_MEDIA || Status == EFI_DEVICE_ERROR) {
if (Status == EFI_SUCCESS || Status == EFI_MEDIA_CHANGED || Status == EFI_NO_MEDIA) {
break;
}
//