summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
diff options
context:
space:
mode:
authorAlbecki, Mateusz <mateusz.albecki@intel.com>2020-11-05 20:48:46 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-11-11 02:27:59 +0000
commit64e25d4b062c907dab2dd30b686de9219d8e372c (patch)
tree91c40e734ac6cecbffeceaa6ad41483f1ef92415 /MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
parentb465a811006eb1663068380dded041d287ace907 (diff)
downloadedk2-64e25d4b062c907dab2dd30b686de9219d8e372c.tar.gz
edk2-64e25d4b062c907dab2dd30b686de9219d8e372c.tar.bz2
edk2-64e25d4b062c907dab2dd30b686de9219d8e372c.zip
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>
Diffstat (limited to 'MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
index 338447a55f..ced2648970 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
@@ -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.