From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.132]) by mx.groups.io with SMTP id smtpd.web10.5569.1622024596859874928 for ; Wed, 26 May 2021 03:23:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amperecomputing.com header.s=selector2 header.b=02Hp4fMv; spf=pass (domain: amperecomputing.com, ip: 40.107.236.132, mailfrom: npham@amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ThMuQSkvR3opr5eiymtE6AMHpBnJehSZjWqGVQ19VlWHdQ+rXo1ZncZmpTnmycfZkvKkfykwcavCvGehUF90njjLVGwByF3N43Cl5PrXYHkgMhYypamkCBk2D2nQJm/xqg0u/DiWpki3y0zXGjr6CwbJCS8DazxyIT2UIYf8uObpXDvKtWIvAZXp5YW6ep06PzWHEmc9vQ5TEkME5LBb298r1HeMHdxP9IXRFSkcJ1MvdwqU1cBAQpgy6UnRET1nWRPaXnfMSs66zfRx6bvaZtxJVQFB41dmI/BniC4YFrtVWkYKdX743pIgNmjZKH9wEOQ4/o6gV+0wpRgHJHUPQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dTAP0SAPq69qP+ju56NIX0QNvihMvJxF8zEBnq2j7ow=; b=ILfjXibcgGv8wfQpIQ7UZidCYc3f6+x2LQEVajbDTXVN/6RkveG9z9a3INb04ehJ9Lsvi+vnXCcpvxRwQAYY2Y6aSl9pL/hZ+gmcyUCIJjaNaf3I87h28860I6Bu5T1KP6hckLWbVpNtSEJMGIfQZ58UJUdoX3Fe83yaf18Bfi3BXVr//OWitmNPtWAfnXzxXqFWKx2KKmcN/7amx6JuEcsPpKsBlhghylYhflOQbi+FCwP99nidfTU3NdrCVwoki2Tk9QMP+N55gCCUNDkAJVERWhFrNNQqXHbof7BfeKHlILE3ikQ2UPLl4dQo6K9nQQghTrihq8JbGRMTuQDCsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amperecomputing.com; dmarc=pass action=none header.from=amperecomputing.com; dkim=pass header.d=amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dTAP0SAPq69qP+ju56NIX0QNvihMvJxF8zEBnq2j7ow=; b=02Hp4fMvkTTVdcFXRPMHI7qn/T20TLs2eOmJ7N4VUgBwNc7gBKpTmwQO7aamgm0EepCWELPT5adTu+kczFwT34gkYMrdrrkqcMp1yXRCloEjssnJN/2Twtnuoqq9FXExKUAltLclvKP3auXUAohHQDzZaUlt654qwjxUZkZiUYE= Received: from MWHPR0101MB3200.prod.exchangelabs.com (2603:10b6:301:36::15) by CO1PR01MB6536.prod.exchangelabs.com (2603:10b6:303:da::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21; Wed, 26 May 2021 10:23:13 +0000 Received: from MWHPR0101MB3200.prod.exchangelabs.com ([fe80::bd31:ba38:d444:2011]) by MWHPR0101MB3200.prod.exchangelabs.com ([fe80::bd31:ba38:d444:2011%3]) with mapi id 15.20.4108.039; Wed, 26 May 2021 10:23:12 +0000 From: "Nhi Pham" To: "devel@edk2.groups.io" , Nhi Pham OS Subject: Re: [edk2-devel] [PATCH 1/1] UsbCdcNetDxe: Remove reading connection status in SNP GetStatus Thread-Topic: [edk2-devel] [PATCH 1/1] UsbCdcNetDxe: Remove reading connection status in SNP GetStatus Thread-Index: AQHXUhd5Js2O+8vN5UW12pqtnMedlKr1jXnz Date: Wed, 26 May 2021 10:23:12 +0000 Message-ID: References: <20210526100724.5359-1-nhi@os.amperecomputing.com>,<20210526100724.5359-3-nhi@os.amperecomputing.com> In-Reply-To: <20210526100724.5359-3-nhi@os.amperecomputing.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amperecomputing.com; x-originating-ip: [118.69.219.201] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a1e3a51a-5350-4b2a-c3e4-08d920304486 x-ms-traffictypediagnostic: CO1PR01MB6536: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 95J4tVsz38AJFam/mgcBgJyWw7nq9gfdKjYQg5euOc0lDuMa7bHy6lpTUmmPYbVgyenwyMv21uPkSTyWILrzSg0sW6jHbGZZBAL0z4X0u44JoTg+70LLRYo6wBcmFfnmh6l3J+4UHvwk5YaILPqBTJuQdnCDdq3ukrzT1pQVTv87ZbLFwMcHqM5Q3ndrn89k7VYUcPTU5RPV2uwX2ToPMtsvDTc7/L3Il+6CMNX+SEo8dRqbFrVX84ZmDriDaZqY9ewzmS6aDd+VqEOK7m2ggjf/ZRA71PL9HOxflrDmUoLa9XL+OeXYnu5fuFOriFc2WWM7S0O9HcU0sez3sfyz3lZUfocOg4BizVDcSTYyJUcnR9b6IqvwafqI6xEjikJ1pYuU8C4uQQbnjHsOCstS8vNZsfmSIdz1r15MyZjg5FYO7ttOflkak29taLiHaNSZsuvBmAY6Owp4ojkNiOHgflBCM3Sw3fWyl4KV3dzFSTNaU3tSyJ7tosqnZ1Td/kOMErgx8GtEn4iJwBnPrEpmMUNZ1kCErnF57zbQi+1UjU/7SlRqjtxFgUov0/dFZetNls8dhQzjU5v6cSQj2JLKTeWI5NSIxVwJE8mRB5Su/uSg14y4DlgRWYHXYbVVVs1KYAoTwT7VIMEcC+cI9EbPWB3TIwO/Lakrxjkx//kWiT4hSy1w+PlmMgVwuiVeZ9NL8U4hoHoS6Y7EPL4JqElxBjOmHLGvYtC3OC/JolTU+SY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR0101MB3200.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(396003)(346002)(376002)(136003)(39850400004)(6506007)(122000001)(53546011)(83380400001)(166002)(8936002)(7696005)(26005)(8676002)(55016002)(38100700002)(5660300002)(19627405001)(110136005)(966005)(86362001)(478600001)(71200400001)(52536014)(76116006)(91956017)(64756008)(66556008)(66446008)(66946007)(66476007)(2906002)(9686003)(33656002)(316002)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?k1dHVGWPG9IYFg9SzHSfFRLC/5r2bCp+Gv+u23AktGVw1K4nCtVASQMwl6B+?= =?us-ascii?Q?h931LFdGy7xw+9wt871tz4h5npIIpfn0QeT2otjKn9p4le4GTUR0I0t9VP7B?= =?us-ascii?Q?qE995UyjEhm0hZqAgoYX8TSeBs7DAwo5KvqrV4jxEFOX/W0FFDl18dwJZarp?= =?us-ascii?Q?rg//eqOFAveaOr0wG1fFRtaOLVLxKTlsPLdmzigPityobo7qPWzjEausONx2?= =?us-ascii?Q?lDU0oMGIE4VAnuaWCVpD8T/c3zOBA7aKum9ssSyW4aZdQdbcU7xK0OBGkGc3?= =?us-ascii?Q?ecI6fsxl2QZBXWGSSFGj2dzyEGrmOKeKBVApkcQlve6ca9ycPhBLTCQcGFPT?= =?us-ascii?Q?FNPQMOm+JppNPKgyDMDucnvV75FaOAT736XT7Wacj0pVpyyAP6F175gaMQUU?= =?us-ascii?Q?6/545OGglbc/rxuBE5zvuV4YmbBgs4LgQkAFSRihnV8mJ7URD8E/dlf2J4BA?= =?us-ascii?Q?dw4+6nWdJ9BiXN7+IGEjTrfCA0smxiO/WF7i2G3EecqnpNOmR9nkDYc9mFDg?= =?us-ascii?Q?yyfOZnM2ZGcignn2RWbgBrhK6Q3Rii9U7L6iGyK2MLTFXxBqh83bpzDHKmsi?= =?us-ascii?Q?3thy+Uc3OOjAJwOfmC9mecYKm5KpCf8zRtxQPUiq2lE61S+DQ07gK5SJ0bJy?= =?us-ascii?Q?vS4nqqURIUyyKJuT8be7gzpBSBbAqxwZTPt8c0q2FuqexePlOtqsBUrhy+6h?= =?us-ascii?Q?QDXPv/+NUH4vCrkxHGTOZKP8msiUWwp0FX+w1heCsjNM81ddq0B3oo1JtrFo?= =?us-ascii?Q?8az1c0erEC2xq/ySCe7ggmMoNZL439u0ozAmoXJnuoSpqeGg05HhaZFD3PY6?= =?us-ascii?Q?CxuV2dlFPLkjHw4Fuml9N+vpk0zb7r4dBTdfX/A6JpeX4UCpDCc8IFMxTF0x?= =?us-ascii?Q?Pt0jbyyoyRRpwY5DpRKueN1AZYjhSQPr4mSv8xuIXqCFwoyqCBIej6Lg0lPR?= =?us-ascii?Q?2YeSOfcU4frvx3N6zhJVTi60YcTIpBYGeeWNpkzfWsDK34M53s84wNsXX1gn?= =?us-ascii?Q?UP3uHitx3GF1WXUEnTOdunGusnYouz2atFCZFWg2DA4vHxl4xiKKI8yCiF2T?= =?us-ascii?Q?D4vODBpwmV46gHI3/BjXI40quZweyvg2dSh/1t7tyXKy3LVyDYAefNiS/ai6?= =?us-ascii?Q?/B4tJ1G64+s5uRdvoySu/1/4PvNNT51rfNXSLRECpkqvfqmNyla9DKfiinMQ?= =?us-ascii?Q?grTvZovwzbGul3yXvTdHujAO9YEy2tu34USBAAdo77f8DfhOVxuoEpS9e3Xp?= =?us-ascii?Q?5Alj88+36VQwl+Kfa7zbTu6XaaX6iZX5rFRqaim934W0+9CY42pEJX+8kfL5?= =?us-ascii?Q?RreRlTta24VTG5fR7Ek6OxmR?= MIME-Version: 1.0 X-OriginatorOrg: amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR0101MB3200.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1e3a51a-5350-4b2a-c3e4-08d920304486 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2021 10:23:12.8864 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CrgahRi1D/a1P0At1gWqb+edht5TMkyYc4rR5Ep4UHmjVGQGfcbKmObk/sQd04q00Vbcp+R8XHb+fPN7purbkM580QIgvzrhCjPDRe/ROz0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6536 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR0101MB3200FC0B1F8D73C1B45B359CB1249MWHPR0101MB3200_" --_000_MWHPR0101MB3200FC0B1F8D73C1B45B359CB1249MWHPR0101MB3200_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My fault, please ignore this patch. Thanks, Nhi ________________________________ From: devel@edk2.groups.io on behalf of Nhi Pham vi= a 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/Simple= Network.c b/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNe= twork.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 =3D=3D NULL || SimpleNetwork->Mode =3D=3D NULL) { return EFI_INVALID_PARAMETER; } @@ -154,16 +152,6 @@ SnpGetStatus ( *InterruptStatus =3D 0; } - Status =3D UsbCdcGetLinkStatus (PrivateData); - if (EFI_ERROR (Status)) { - Mode->MediaPresent =3D FALSE; - } else { - Mode->MediaPresent =3D PrivateData->LinkUp; - DEBUG ((EFI_D_INFO, "%a %d Mode->MediaPresent =3D %d \n", __FUNCTION_= _, __LINE__, (UINT8)Mode->MediaPresent)); - } - - DEBUG ((DEBUG_ERROR, "%a %d End - %r \n", __FUNCTION__, __LINE__, Statu= s)); - // // Restore TPL and return the operation status // -- 2.17.1 --_000_MWHPR0101MB3200FC0B1F8D73C1B45B359CB1249MWHPR0101MB3200_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
My fault, please ignore this patch.

Thanks,
Nhi

From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Nhi Pham via groups.io <nhi= =3Dos.amperecomputing.com@groups.io>
Sent: Wednesday, May 26, 2021 5:06 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Nhi Pham OS <nhi@os.amperecomputing.com>
Subject: [edk2-devel] [PATCH 1/1] UsbCdcNetDxe: Remove reading conn= ection status in SNP GetStatus
 
Only read the Ethernet connection status at the i= nitialization of SNP.

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

diff --git a/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/Simple= Network.c b/Platform/Ampere/AmperePlatformPkg/Drivers/UsbCdcNetDxe/SimpleNe= twork.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        &nb= sp;     Status;
   EFI_TPL         =         OldTpl;
 
-  DEBUG ((DEBUG_ERROR, "%a %d Entry \n", __FUNCTION__, __L= INE__));
-
   if (SimpleNetwork =3D=3D NULL || SimpleNetwork->Mode =3D= =3D NULL) {
     return EFI_INVALID_PARAMETER;
   }
@@ -154,16 +152,6 @@ SnpGetStatus (
     *InterruptStatus =3D 0;
   }
 
-  Status =3D UsbCdcGetLinkStatus (PrivateData);
-  if (EFI_ERROR (Status)) {
-    Mode->MediaPresent =3D FALSE;
-  } else {
-    Mode->MediaPresent =3D PrivateData->LinkUp;
-    DEBUG ((EFI_D_INFO, "%a %d Mode->MediaPresent = = =3D %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






--_000_MWHPR0101MB3200FC0B1F8D73C1B45B359CB1249MWHPR0101MB3200_--