From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.68385.1671785766162419343 for ; Fri, 23 Dec 2022 00:56:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=a4pXHJJG; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671785766; x=1703321766; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=jWuILch59viw0DD6mEg4k1n/lw70p0uBRlNWIsy58OQ=; b=a4pXHJJGxqHApyaPdxWyo7J1yUvf5NnNLY1USHcJTFx2AukNHUzzr/ex /mVKJpKa1lzjyA3aIDbXjgCWGurch6juP/2a7bN1ZWyrPZCzsweYu2ZES 8dH++BikPH19gLMxRJhWtH+Nd8r7G2ASDjittvKbis7rJ+FZ203586042 YtnwvsfuNY2B3aiA0NcX0RnEE6FFMg9djWk/FOt7srMpQiE27vMYN+Z8v yVYRcvsgTQrQ0jzEnp39q14i+0cxKRpeWt5gtBrRr9Qb2O159XDa8sIb7 wrG3NiGtpTcfsMztn8+mz/ghFRRtWBFPeuGJ/2ur6sNI5yD800kcknyHx A==; X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="347456054" X-IronPort-AV: E=Sophos;i="5.96,268,1665471600"; d="scan'208";a="347456054" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2022 00:56:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="645528011" X-IronPort-AV: E=Sophos;i="5.96,268,1665471600"; d="scan'208";a="645528011" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 23 Dec 2022 00:56:05 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 23 Dec 2022 00:56:04 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 23 Dec 2022 00:56:04 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 00:56:04 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 23 Dec 2022 00:56:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NIriBOXqHj2E3cEVipZv5d19qPg15FSmrWXI+732JD3ZWH6SK42mQONO0Yg82xZUpalgnuRbHhUn4Xp41+7w4YXaMaTIZFaqP+NPMcu+QgNxCDpyT+T/nM9IXhwi8or99GXoYjv5JFveYYZYhCC3zM2jgMKsbTFPok66pv9LREZ8j1mTwzYUy54VaDIYQ68S0KyswXV5Hf4mUoK/WvADnebtMK3aDkpRosJclNLgrDkApsLimnTxCrfb2JCwDSKNu6+GYDchKrKM9OJHytfRHJtnv/s1xqFikMwunpCwzLJou3jFAjtmuko/AenFzJWsHDj3wuZhRkqQHJ2OauWB1w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qH2bHtP3a5J25InW06vFfmYY70Xs/NSrbyxARGlc+AU=; b=PE0FucL1S9Vj8d0147OzzYb+lfa4ggDeCe4G/zM7VEYx1xKnsldMC/0eY5KDFS6o+JyA3a/qHe1zHead/WKvLHXSCSkkZ3PFccsgb5Nc4CSy38bxz0M0dMJ7qkFquYW704kWdllRsb3Hir5Bc3WXjWXeTmLaJG7BlHOYSqoX2jS/p3q6k/P7XtQnYulPXyq+ct25GKvh89yBUecFlXV++x4kKqrT8n3+7IEhQlfcj/u8BTSFoeGD2mbGEP4RevCzcxUiKUMj0CT2aatL+Oih6879A3zYokdd/kGQDBua2CV46TF3I03jg1oig+3YdUGCTwdiCftGfTbZ1D2jDm+nxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by PH0PR11MB4982.namprd11.prod.outlook.com (2603:10b6:510:37::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.13; Fri, 23 Dec 2022 08:56:02 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c%3]) with mapi id 15.20.5944.013; Fri, 23 Dec 2022 08:56:02 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Rhodes, Sean" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the port if status change returns an error Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the port if status change returns an error Thread-Index: AQHZFRRemaR1QRKVp0ebPHs917Wbqa56sSMg Date: Fri, 23 Dec 2022 08:56:02 +0000 Message-ID: References: <68be875805735c1660336eadbde6253b6594f4f8.1671610501.git.sean@starlabs.systems> In-Reply-To: <68be875805735c1660336eadbde6253b6594f4f8.1671610501.git.sean@starlabs.systems> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB4025:EE_|PH0PR11MB4982:EE_ x-ms-office365-filtering-correlation-id: 5fc45662-58fd-4823-4720-08dae4c384a8 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eWzAnswqjlIlcqhsscMRIzyfJlVJZYlppaoMD+kw/dkLXa91p7g0JXJ33avUAUA7JBMjyJFo1psE77nolxwigevNCWMWbK09tmxVjpbpK1aiWlkk6LkgMeLw6aLHkzcPy7C/ixb3DefthvgHnMcGDG+wjiiMuMCGq6NCegF7AN8YwRTpQleiZCii4KqX0BKLsyTaqwd8IqItIaQ8VuWYnfLUsXe4RoyIVOA4COZ7hu1DfeEGB1j+z1XfYolSYNFnhMGDoty7OVbe+FJL7s3aLKQeFBt1XF/lzThTBZqL5sFoWnau9l6SNb/9pXDZIPUML4tSXme8wxY+xSyQdKRmcxlikZG81NYwleyoDvspl1Ev7D1sSaY15Vrvxxs/Nu8mSsNl3bb4RSGSV2LPSldLqsIfkCHdYhEOSOW6LmV03QgQw7gtpFMsF4b4zYpkNQOXOgMlrs/QhulcwUs+FxuLYHRSj/YR9Ob/YoHPG/l4iqMwyFh3Y6XO95ZHhvwbmwlbP9gc0YkmnW0PvmxYOI9hC/XwDJreh3x6knzur6Pv8JS4e84TTjkTd+TpwCvTEoFuQyez+Ukap1kbwezSjn725OUL8SGqkbJGSV/o4KFjs7V1V/v+e2p8gjlsYMP2VrR+6/Zgo4y//kHaxahIhosJ3V46oA1gmFr5z3LPWTTp8FZWyoVtYeOsDEEI4WWP5a/aDTlKj4uSlkZ23BCOuq5CRC3+/6kAHEQt+0srvRpCqLQl2iSpGgxTccNuQXhtkdKOKxeoUPBcb9Bwaxr9fRLvuA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(136003)(39860400002)(376002)(366004)(346002)(451199015)(66899015)(82960400001)(38100700002)(8936002)(64756008)(66946007)(66476007)(66446008)(66556008)(76116006)(122000001)(5660300002)(8676002)(41300700001)(83380400001)(478600001)(53546011)(966005)(110136005)(316002)(2906002)(38070700005)(186003)(71200400001)(33656002)(26005)(9686003)(52536014)(86362001)(6506007)(7696005)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aeICKWehDbbBRDLIrjP98Wa/gtSKuyR/wyzHhm9QYyyF+brd16f4L4dKWmi1?= =?us-ascii?Q?RvxIwndc/MR/yuBIuuAjnrDRCOIcugncLBnjeMgI42fMSsJQphWC+LNgrsHQ?= =?us-ascii?Q?VDUqSam5l7MEs0IITgSCOBD3PdQHhtAlekhFunTnjV3Hs2U3iKENN7uxrKDx?= =?us-ascii?Q?c9gnoPEtkqkc4OvN90Uh6z2yFnNQij53jR0kZKvlLjfXgn7M9aOmolhV6pGc?= =?us-ascii?Q?BqL2l3H0jNPAV4d7n0HDryrGxo5AooCBFP8H2PTQtqD+EImqlcgz+fZ8IXuP?= =?us-ascii?Q?1x1m7+PqFNb2MVOfto4Yr7MOowvw9Y4OU0g9tB0ZOjmPIc3VVhvFemAoiCt4?= =?us-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WkD0DoQGRIDrkJe+I?= =?us-ascii?Q?WcXTIcXaMMSi/C+gfGqAAmXBst/0vdJ77pN4G6LW2sS1zGlsPecXOwfVKpSP?= =?us-ascii?Q?QdlxgwPs8QxaYDrVVhMZm8HHO7ECN7oSpQi17PDpJrPVEQy3OuzcWxrFCT1S?= =?us-ascii?Q?irj4UsWa40APL1G1FvJ3c/5gZ6uy7XIt0nwAnVf8HPGHuyEY1Y1WWAUkyh5P?= =?us-ascii?Q?WsADgoDJ77CTFro0FmeBbdN8dhHKNw5GzduQgV+vh8FzzLBCVIMAx2vhucYP?= =?us-ascii?Q?VowDLgWI4CXf6p9yMzrz5LFKMyelCSFHGeWZ3PxwGJl9FEcofQO94LEM0IrF?= =?us-ascii?Q?Uuy5lja+7XpfU+MlfcZuXa9+BIIJI98IxyiftffE?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fc45662-58fd-4823-4720-08dae4c384a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2022 08:56:02.1410 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JWNEz7h0XCLqsNVVnGggH35Kfy/U+ljWNUbw0M00tupiYzpiBLsleEfEGQrh6Ql46+xsgUP4+o4lMswiw06IPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4982 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry, The CI tests failed for the proposed patch: https://github.com/tianocore/edk2/pull/3824 Could you help to check and resolve? Thanks. Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sean > Rhodes > Sent: Wednesday, December 21, 2022 4:15 PM > To: devel@edk2.groups.io > Cc: Rhodes, Sean > Subject: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the > port if status change returns an error >=20 > Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit in > PortChangeStatus > when XhcPollPortStatusChange fails >=20 > Signed-off-by: Sean Rhodes > --- > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > index 461b2cd9b5..d8fa41f68f 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > @@ -471,7 +471,16 @@ XhcGetRootHubPortStatus ( > // For those devices behind hub, we get its attach/detach event by hoo= king > Get_Port_Status request at control transfer for those hub. >=20 > // >=20 > ParentRouteChart.Dword =3D 0; >=20 > - XhcPollPortStatusChange (Xhc, ParentRouteChart, PortNumber, PortStatus= ); >=20 > + Status =3D XhcPollPortStatusChange (Xhc, ParentRouteCh= art, > PortNumber, PortStatus); >=20 > + >=20 > + // >=20 > + // Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit = in > PortChangeStatus >=20 > + // when XhcPollPortStatusChange fails >=20 > + // >=20 > + if (EFI_ERROR (Status)) { >=20 > + PortStatus->PortChangeStatus &=3D ~(USB_PORT_STAT_C_RESET); >=20 > + Status =3D EFI_SUCCESS; >=20 > + } >=20 >=20 >=20 > ON_EXIT: >=20 > gBS->RestoreTPL (OldTpl); >=20 > -- > 2.37.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#97683): https://edk2.groups.io/g/devel/message/97683 > Mute This Topic: https://groups.io/mt/95802798/1768737 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20