My fault, please ignore this patch. Thanks, Nhi ________________________________ From: devel@edk2.groups.io on behalf of Nhi Pham via groups.io Sent: Wednesday, May 26, 2021 5:06 PM To: devel@edk2.groups.io Cc: Nhi Pham OS Subject: [edk2-devel] [PATCH 1/1] UsbCdcNetDxe: Remove reading connection status in SNP GetStatus Only read the Ethernet connection status at the initialization of SNP. Signed-off-by: Nhi Pham --- .../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