]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/Lan9118Dxe: add mask PCD to disable auto-negotiation features
authorRyan Harkin <ryan.harkin@linaro.org>
Wed, 11 May 2016 08:23:59 +0000 (09:23 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 11 May 2016 09:39:53 +0000 (11:39 +0200)
Add a PCD to allow the platform to mask in/out specific features of
the LAN9118 device advertised during auto-negotiation.

For example, the Juno ARM Development Platform doesn't support full
duplex mode.  This PCD will allow the platform developer to prevent the
full duplex modes from being advertised.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
[ardb: change default feature mask so that full duplex is disabled]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
EmbeddedPkg/EmbeddedPkg.dec

index 3c2246fb8afd1a507882733e0873ad76c80ea7c2..055a0552999c1dd69e6a63ffa3089df704b7fc84 100644 (file)
@@ -52,6 +52,7 @@
   gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress\r
   gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress\r
   gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout\r
+  gEmbeddedTokenSpaceGuid.PcdLan9118NegotiationFeatureMask\r
 \r
 [Depex]\r
   TRUE\r
index 50c004d728f87f0ad5fbcea171c71e79fa60ab04..ea308afe6b2086e530c235ea39c6f45de1155188 100644 (file)
@@ -648,6 +648,7 @@ AutoNegotiate (
     Features &= ~(PHYANA_PAUSE_OP_MASK);\r
     Features |= 3 << 10;\r
   }\r
+  Features &= FixedPcdGet32 (PcdLan9118NegotiationFeatureMask);\r
 \r
   // Write the features\r
   IndirectPHYWrite32 (PHY_INDEX_AUTO_NEG_ADVERT, Features);\r
index 7bcb1332df5b9cdb6cfe57cb2267265f0516a8b5..775d863c5f64c258c4c5269f733d07ef73df087a 100644 (file)
   gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x0|UINT32|0x00000025\r
   gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress|0x0|UINT64|0x00000026\r
   gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout|4000|UINT32|0x00000027\r
+  # The default feature mask below disables full duplex negotiation, since full\r
+  # duplex operation is suspected to be broken in the driver.\r
+  gEmbeddedTokenSpaceGuid.PcdLan9118NegotiationFeatureMask|0xFFFFFEBF|UINT32|0x00000028\r
 \r
   #\r
   # Android FastBoot\r