diff options
author | Baraneedharan Anbazhagan <anbazhagan@hp.com> | 2022-09-07 23:23:32 -0500 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-09-13 02:51:27 +0000 |
commit | db7afaee91423e988df3160624d04c3c534f294d (patch) | |
tree | 141de8edbe083b7857e5ed872ac363f6a32a0127 /MdeModulePkg/Bus/Ata/AtaAtapiPassThru | |
parent | 970e26294905d2d27369cf4041c6778105754f5e (diff) | |
download | edk2-db7afaee91423e988df3160624d04c3c534f294d.zip edk2-db7afaee91423e988df3160624d04c3c534f294d.tar.gz edk2-db7afaee91423e988df3160624d04c3c534f294d.tar.bz2 |
MdeModulePkg: Use configurable PCD for AHCI command retries
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4011
AHCI commands are retried internally which prevents platform feature
like drive password to process correctly entered password on subsequent
attempts. PCD allows the platform to determine the number of retries.
Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Ata/AtaAtapiPassThru')
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h index 7802ebd..d7434b4 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h @@ -193,7 +193,7 @@ typedef union { #define AHCI_PORT_DEVSLP_DITO_MASK 0x01FF8000
#define AHCI_PORT_DEVSLP_DM_MASK 0x1E000000
-#define AHCI_COMMAND_RETRIES 5
+#define AHCI_COMMAND_RETRIES (PcdGet32 (PcdAhciCommandRetryCount))
#pragma pack(1)
//
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf index a3e42a9..78caa3c 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf @@ -65,7 +65,8 @@ gEdkiiAtaAtapiPolicyProtocolGuid ## CONSUMES
[Pcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAhciCommandRetryCount ## SOMETIMES_CONSUMES
# [Event]
# EVENT_TYPE_PERIODIC_TIMER ## SOMETIMES_CONSUMES
|