audk/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf

59 lines
1.6 KiB
INI
Raw Normal View History

#/** @file
# INF file for the LAN9118 Network Controller Driver.
#
# Copyright (c) 2012-2015, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#**/
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = Lan9118Dxe
FILE_GUID = 4356b162-d0b2-11e1-8952-4437e6a60ea5
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 0.1
ENTRY_POINT = Lan9118DxeEntry
[Sources.common]
Lan9118Dxe.c
Lan9118DxeUtil.c
Lan9118Dxe.h
[Packages]
EmbeddedPkg/EmbeddedPkg.dec
NetworkPkg/NetworkPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
[LibraryClasses]
BaseLib
UefiLib
NetLib
UefiDriverEntryPoint
BaseMemoryLib
ArmLib
IoLib
DevicePathLib
[Protocols]
gEfiSimpleNetworkProtocolGuid
gEfiMetronomeArchProtocolGuid
gEfiPxeBaseCodeProtocolGuid
gEfiDevicePathProtocolGuid
[FixedPcd]
gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress
EmbeddedPkg/Lan9118Dxe: add PCD for negotiation timeout Add a PCD for the link negotiation timeout so the platform can over-ride the default value. The code previously did 2000 iterations of the loop with a 2us stall, so the code has been changed subtly to set the number of iterations equal to the PCD value divided by the stall time. Since the stall time has not changed, the default PCD value is set at 4000 so the original behaviour is not changed. The problems were discovered when the ARM Juno Development Platform used the "EFI Network" option with then LAN9118 driver. It fails to boot the first time and so the board drops back to Shell again: Warning: LAN9118 Driver in stopped state Link timeout in auto-negotiation. Lan9118: Auto Negociation not supported. EhcExecTransfer: transfer failed with 2 EhcControlTransfer: error - Device Error, transfer - 2 Buffer: EFI Hard Drive Booting EFI Misc Device Booting EFI Misc Device 1 Booting EFI Hard Drive Booting EFI Network Warning: LAN9118 Driver not initialized Link timeout in auto-negotiation. Lan9118: Auto Negociation not supported. Booting EFI Internal Shell Exiting Shell drops the user back to the Intel BDS UI. Selecting "Continue" then succeeds in booting from the EFI Network: Booting EFI Misc Device Booting EFI Misc Device 1 Booting EFI Hard Drive Booting EFI Network ..MnpFreeTxBuf: Duplicated recycle report from SNP. MnpFreeTxBuf: Duplicated recycle report from SNP. [snip repeated errors] Discussion on the edk2-devel mailing list [1] prompted Laszlo Ersek to suggest the time taken for the NIC to negotiate was causing a problem. He suggested the solution contained in this patch to provide a PCD configurable by the platform. The default PCD value does not work for Juno. Setting the PCD to a larger value works for Juno R0, R1 and R2. [1] http://article.gmane.org/gmane.comp.bios.edk2.devel/7341 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-02-08 15:38:05 +01:00
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout
gEmbeddedTokenSpaceGuid.PcdLan9118NegotiationFeatureMask
[Depex]
TRUE