From: Wasim Khan <wasim.k...@nxp.com> When PCIe Layerscape Gen4 controller is sending multiple split completions and ACK latency expires indicating that ACK should be send at priority. But because of large number of split completions and FC update DLLP,the controller does not give priority to ACK transmission. This results into ACK latency timer timeout error at the link partner and the pending TLPs are replayed by the link partner again.
Workaround: Reduce the ACK latency timeout value. Signed-off-by: Vabhav Sharma <vabhav.sha...@nxp.com> Signed-off-by: Wasim Khan <wasim.k...@nxp.com> --- Silicon/NXP/Include/Pcie.h | 4 ++++ Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Silicon/NXP/Include/Pcie.h b/Silicon/NXP/Include/Pcie.h index 4c41c3585a8b..bc35570f79bc 100755 --- a/Silicon/NXP/Include/Pcie.h +++ b/Silicon/NXP/Include/Pcie.h @@ -205,4 +205,8 @@ STATIC inline VOID PciLsGen4Write32 ( MmioWrite32 (Dbi + OFFSET_TO_PAGE_ADDR (Offset), Value); } } + +#define GPEX_ACK_REPLAY_TO 0x438 +#define ACK_LAT_TO_VAL_SHIFT 0 +#define ACK_LAT_TO_VAL_MASK 0x1fff #endif diff --git a/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c index d9944313da21..bacdc29d60d6 100644 --- a/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -556,6 +556,12 @@ PcieSetupCntrl ( if (PCI_LS_GEN4_CTRL) { // PCIe LsGen4 Controller Setup + // Workaround for A-011451 + Val = PciLsGen4Read32 ((UINTN)Pcie, GPEX_ACK_REPLAY_TO); + Val &= ~(ACK_LAT_TO_VAL_MASK << ACK_LAT_TO_VAL_SHIFT); + Val |= (4 << ACK_LAT_TO_VAL_SHIFT); + PciLsGen4Write32 ((UINTN)Pcie, GPEX_ACK_REPLAY_TO, Val); + //Fix Class Code Val = PciLsGen4Read32 ((UINTN)Pcie, GPEX_CLASSCODE); Val &= ~(GPEX_CLASSCODE_MASK << GPEX_CLASSCODE_SHIFT); -- 2.7.4 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60113): https://edk2.groups.io/g/devel/message/60113 Mute This Topic: https://groups.io/mt/74396459/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-