mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
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:
parent
f56ae7bf82
commit
b17d5507cf
@ -189,11 +189,6 @@ UsbBootExecCmd (
|
|||||||
return EFI_TIMEOUT;
|
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,
|
// If ExecCommand() returns no error and CmdResult is success,
|
||||||
// then the commnad transfer is successful.
|
// then the commnad transfer is successful.
|
||||||
@ -276,7 +271,7 @@ UsbBootExecCmdWithRetry (
|
|||||||
DataLen,
|
DataLen,
|
||||||
Timeout
|
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;
|
break;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Implementation of the USB mass storage Bulk-Only Transport protocol,
|
Implementation of the USB mass storage Bulk-Only Transport protocol,
|
||||||
according to USB Mass Storage Class Bulk-Only Transport, Revision 1.0.
|
according to USB Mass Storage Class Bulk-Only Transport, Revision 1.0.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -432,11 +432,7 @@ UsbBotExecCommand (
|
|||||||
// whether it succeeds or fails.
|
// whether it succeeds or fails.
|
||||||
//
|
//
|
||||||
TransLen = (UINTN) DataLen;
|
TransLen = (UINTN) DataLen;
|
||||||
Status = UsbBotDataTransfer (UsbBot, DataDir, Data, &TransLen, Timeout);
|
UsbBotDataTransfer (UsbBot, DataDir, Data, &TransLen, Timeout);
|
||||||
if (Status == EFI_DEVICE_ERROR) {
|
|
||||||
DEBUG ((EFI_D_ERROR, "UsbBotExecCommand: UsbBotDataTransfer (%r)\n", Status));
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the status, if that succeeds, interpret the result
|
// Get the status, if that succeeds, interpret the result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user