[edk2-devel] [PATCH 1/1] UsbCdcNetDxe: Remove reading connection status in SNP GetStatus

Nhi Pham via groups.io nhi=os.amperecomputing.com at groups.io
Wed May 26 10:06:53 UTC 2021


Only read the Ethernet connection status at the initialization of SNP.

Signed-off-by: Nhi Pham <nhi at os.amperecomputing.com>
---
 .../Drivers/UsbCdcNetDxe/SimpleNetwork.c             | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNetwork.c b/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNetwork.c
index 05c31f4bad9e..e44898cbda47 100644
--- a/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNetwork.c
+++ b/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNetwork.c
@@ -116,8 +116,6 @@ SnpGetStatus (
   EFI_STATUS              Status;
   EFI_TPL                 OldTpl;
 
-  DEBUG ((DEBUG_ERROR, "%a %d Entry \n", __FUNCTION__, __LINE__));
-
   if (SimpleNetwork == NULL || SimpleNetwork->Mode == NULL) {
     return EFI_INVALID_PARAMETER;
   }
@@ -154,16 +152,6 @@ SnpGetStatus (
     *InterruptStatus = 0;
   }
 
-  Status = UsbCdcGetLinkStatus (PrivateData);
-  if (EFI_ERROR (Status)) {
-    Mode->MediaPresent = FALSE;
-  } else {
-    Mode->MediaPresent = PrivateData->LinkUp;
-    DEBUG ((EFI_D_INFO, "%a %d Mode->MediaPresent = %d \n", __FUNCTION__, __LINE__, (UINT8)Mode->MediaPresent));
-  }
-
-  DEBUG ((DEBUG_ERROR, "%a %d End - %r \n", __FUNCTION__, __LINE__, Status));
-
   //
   // Restore TPL and return the operation status
   //
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75608): https://edk2.groups.io/g/devel/message/75608
Mute This Topic: https://groups.io/mt/83097092/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list