]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/Lan9118Dxe: rename TimeOut to Retries
authorRyan Harkin <ryan.harkin@linaro.org>
Tue, 9 Feb 2016 17:10:02 +0000 (17:10 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 10 Feb 2016 16:56:47 +0000 (17:56 +0100)
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>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c

index c57c7ceff120cd2644fe041417d45eba3972a5e4..3ef98ef901b9a9d0fbea88ff54e6b3d395256d3c 100644 (file)
@@ -355,7 +355,7 @@ Lan9118Initialize (
   IN  EFI_SIMPLE_NETWORK_PROTOCOL *Snp\r
   )\r
 {\r
-  UINTN  Timeout;\r
+  UINTN  Retries;\r
   UINT64 DefaultMacAddress;\r
 \r
   // Attempt to wake-up the device if it is in a lower power state\r
@@ -366,22 +366,22 @@ Lan9118Initialize (
   }\r
 \r
   // Check that device is active\r
-  Timeout = 20;\r
-  while ((MmioRead32 (LAN9118_PMT_CTRL) & MPTCTRL_READY) == 0 && --Timeout) {\r
+  Retries = 20;\r
+  while ((MmioRead32 (LAN9118_PMT_CTRL) & MPTCTRL_READY) == 0 && --Retries) {\r
     gBS->Stall (LAN9118_STALL);\r
     MemoryFence();\r
   }\r
-  if (!Timeout) {\r
+  if (!Retries) {\r
     return EFI_TIMEOUT;\r
   }\r
 \r
   // Check that EEPROM isn't active\r
-  Timeout = 20;\r
-  while ((MmioRead32 (LAN9118_E2P_CMD) & E2P_EPC_BUSY) && --Timeout){\r
+  Retries = 20;\r
+  while ((MmioRead32 (LAN9118_E2P_CMD) & E2P_EPC_BUSY) && --Retries){\r
     gBS->Stall (LAN9118_STALL);\r
     MemoryFence();\r
   }\r
-  if (!Timeout) {\r
+  if (!Retries) {\r
     return EFI_TIMEOUT;\r
   }\r
 \r
@@ -574,7 +574,7 @@ AutoNegotiate (
   UINT32 PhyControl;\r
   UINT32 PhyStatus;\r
   UINT32 Features;\r
-  UINT32 TimeOut;\r
+  UINT32 Retries;\r
 \r
   // First check that auto-negotiation is supported\r
   PhyStatus = IndirectPHYRead32 (PHY_INDEX_BASIC_STATUS);\r
@@ -586,12 +586,12 @@ AutoNegotiate (
   // Check that link is up first\r
   if ((PhyStatus & PHYSTS_LINK_STS) == 0) {\r
     // Wait until it is up or until Time Out\r
-    TimeOut = FixedPcdGet32 (PcdLan9118DefaultNegotiationTimeout) / LAN9118_STALL;\r
+    Retries = FixedPcdGet32 (PcdLan9118DefaultNegotiationTimeout) / LAN9118_STALL;\r
     while ((IndirectPHYRead32 (PHY_INDEX_BASIC_STATUS) & PHYSTS_LINK_STS) == 0) {\r
       MemoryFence();\r
       gBS->Stall (LAN9118_STALL);\r
-      TimeOut--;\r
-      if (!TimeOut) {\r
+      Retries--;\r
+      if (!Retries) {\r
         DEBUG ((EFI_D_ERROR, "Link timeout in auto-negotiation.\n"));\r
         return EFI_TIMEOUT;\r
       }\r