summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf1
-rw-r--r--EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c2
-rw-r--r--EmbeddedPkg/EmbeddedPkg.dec1
3 files changed, 3 insertions, 1 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf
index 9e5f98b4bd..3c2246fb8a 100644
--- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf
+++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf
@@ -51,6 +51,7 @@
[FixedPcd]
gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress
+ gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout
[Depex]
TRUE
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
index 2ef1ecbb28..c57c7ceff1 100644
--- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
+++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
@@ -586,7 +586,7 @@ AutoNegotiate (
// Check that link is up first
if ((PhyStatus & PHYSTS_LINK_STS) == 0) {
// Wait until it is up or until Time Out
- TimeOut = 2000;
+ TimeOut = FixedPcdGet32 (PcdLan9118DefaultNegotiationTimeout) / LAN9118_STALL;
while ((IndirectPHYRead32 (PHY_INDEX_BASIC_STATUS) & PHYSTS_LINK_STS) == 0) {
MemoryFence();
gBS->Stall (LAN9118_STALL);
diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
index f557527281..cd0d96f79f 100644
--- a/EmbeddedPkg/EmbeddedPkg.dec
+++ b/EmbeddedPkg/EmbeddedPkg.dec
@@ -145,6 +145,7 @@
# LAN9118 Ethernet Driver PCDs
gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x0|UINT32|0x00000025
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress|0x0|UINT64|0x00000026
+ gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout|4000|UINT32|0x00000027
#
# Android FastBoot