diff options
author | Albecki, Mateusz <mateusz.albecki@intel.com> | 2020-01-14 20:05:30 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-01-19 01:58:00 +0000 |
commit | 430743a1e8cbef114f261e2b7ee8d2d07914f5b3 (patch) | |
tree | c57775cff4d96f8737daafe147af5d4642e0b250 /MdeModulePkg/Bus | |
parent | c67617f3c677c342efde780e229f841f4e0f6c7e (diff) | |
download | edk2-430743a1e8cbef114f261e2b7ee8d2d07914f5b3.tar.gz edk2-430743a1e8cbef114f261e2b7ee8d2d07914f5b3.tar.bz2 edk2-430743a1e8cbef114f261e2b7ee8d2d07914f5b3.zip |
MdeModulePkg/SdMmcPciHcDxe: Add retries for async commands
This patch adds retries for async execution for commands that
failed due to the CRC errors.
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index 193b0f24e2..b18ff3e972 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c @@ -211,8 +211,10 @@ Done: gBS->SignalEvent (TrbEvent);
return;
}
- }
- if ((Trb != NULL) && (Status != EFI_NOT_READY)) {
+ } else if ((Trb != NULL) && (Status == EFI_CRC_ERROR) && (Trb->Retries > 0)) {
+ Trb->Retries--;
+ Trb->Started = FALSE;
+ } else if ((Trb != NULL)) {
RemoveEntryList (Link);
Trb->Packet->TransactionStatus = Status;
TrbEvent = Trb->Event;
|