diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2016-02-09 12:01:02 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2016-02-09 12:34:20 +0000 |
commit | 0e4a70b7740d30ca21c56a521db6a9928196e8ac (patch) | |
tree | b8020fedc75ad16a37d24a274b81754f46e5af4d | |
parent | 3e7534714216c258cea79a07e13705bf6c50209a (diff) |
EmbeddedPkg/Lan9118Dxe: rename TimeOut to Retriesupstreaming-20160209-001
The variable TimeOut is actually a retry, not a timeout, so I renamed
the variable accordingly.
This patch makes no functional change.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
-rw-r--r-- | EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c index 747b05b7a6..c0e8925ae8 100644 --- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c +++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c @@ -355,7 +355,7 @@ Lan9118Initialize ( IN EFI_SIMPLE_NETWORK_PROTOCOL *Snp
)
{
- UINTN Timeout;
+ UINTN Retries;
UINT64 DefaultMacAddress;
// Attempt to wake-up the device if it is in a lower power state
@@ -366,20 +366,20 @@ Lan9118Initialize ( }
// Check that device is active
- Timeout = 20;
- while ((MmioRead32 (LAN9118_PMT_CTRL) & MPTCTRL_READY) == 0 && --Timeout) {
+ Retries = 20;
+ while ((MmioRead32 (LAN9118_PMT_CTRL) & MPTCTRL_READY) == 0 && --Retries) {
MemoryFence();
}
- if (!Timeout) {
+ if (!Retries) {
return EFI_TIMEOUT;
}
// Check that EEPROM isn't active
- Timeout = 20;
- while ((MmioRead32 (LAN9118_E2P_CMD) & E2P_EPC_BUSY) && --Timeout){
+ Retries = 20;
+ while ((MmioRead32 (LAN9118_E2P_CMD) & E2P_EPC_BUSY) && --Retries){
MemoryFence();
}
- if (!Timeout) {
+ if (!Retries) {
return EFI_TIMEOUT;
}
@@ -571,7 +571,7 @@ AutoNegotiate ( UINT32 PhyControl;
UINT32 PhyStatus;
UINT32 Features;
- UINT32 TimeOut;
+ UINT32 Retries;
// First check that auto-negotiation is supported
PhyStatus = IndirectPHYRead32 (PHY_INDEX_BASIC_STATUS);
@@ -583,12 +583,12 @@ AutoNegotiate ( // Check that link is up first
if ((PhyStatus & PHYSTS_LINK_STS) == 0) {
// Wait until it is up or until Time Out
- TimeOut = 2000;
+ Retries = 2000;
while ((IndirectPHYRead32 (PHY_INDEX_BASIC_STATUS) & PHYSTS_LINK_STS) == 0) {
MemoryFence();
gBS->Stall (FixedPcdGet32 (PcdLan9118DefaultNegotiationTimeout));
- TimeOut--;
- if (!TimeOut) {
+ Retries--;
+ if (!Retries) {
DEBUG ((EFI_D_ERROR, "Link timeout in auto-negotiation.\n"));
return EFI_TIMEOUT;
}
|