MdeModulePkg/AtaAtapiPassThru: Restart failed packets

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3026

This commit adds code to restart the ATA packets that failed due to the
CRC error or other link condition. For sync transfers the code will try
to get the command working for up to 5 times. For async transfers, the
command will be retried until the timeout value timeout specified by the
requester is reached. For sync case the count of 5 retries has been
chosen arbitrarily and if needed can be increased or decreased.

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Cc: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Albecki, Mateusz
2020-11-05 20:48:46 +08:00
committed by mergify[bot]
parent b465a81100
commit 64e25d4b06
2 changed files with 188 additions and 131 deletions

View File

@ -192,6 +192,8 @@ typedef union {
#define AHCI_PORT_DEVSLP_DITO_MASK 0x01FF8000
#define AHCI_PORT_DEVSLP_DM_MASK 0x1E000000
#define AHCI_COMMAND_RETRIES 5
#pragma pack(1)
//
// Command List structure includes total 32 entries.