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.web10.62144.1671757224373475003 for ; Thu, 22 Dec 2022 17:00:24 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=CB/a6+J2; 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=1671757224; x=1703293224; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Ec60tBCBfzwLM4LmztxEuIIESQvGJ+xLYZi2+wNTXcw=; b=CB/a6+J2S9E9P8eHoycOJQmt5cZHOhKf4xCixxeGUBW5k3a63zWLVMgF tnzrKWYxQE6nM3+9AbhX6mm/UlZwq6xJmPGd+/qdBqxC1nPH6XQOCOyO1 rX3KaZknMWtAoe/TvyNmiwILnWzarPsPP4/JgWMgRzrNecXdNmmMdqOW5 1ZifruxuRE48TCZTuNsZpEb3df/Bf12vg9SwZkXYrfRkxJkFhLFJTD1DJ yQ7+2YYvEzXR8d05m2fWAZmv/PUn4Fbzq1RGniWXNS7waEcbRd9Uh45sZ NKbGotWpQbGYVZouMsu4/SHSZo2ErGqaDIo2DnErsGRa4PorqLI6xTGDQ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="347401645" X-IronPort-AV: E=Sophos;i="5.96,267,1665471600"; d="scan'208";a="347401645" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2022 17:00:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10569"; a="826151069" X-IronPort-AV: E=Sophos;i="5.96,267,1665471600"; d="scan'208";a="826151069" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 22 Dec 2022 17:00:23 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 22 Dec 2022 17:00:22 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 22 Dec 2022 17:00:22 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 22 Dec 2022 17:00:22 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 22 Dec 2022 17:00:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ASXQrzwPg7S2GX/8NulpKsKpwY0pltzoLVXQwKrAxoD7XjuGHReGjfxsyg5ZqvWW7iKzyA35KedT0Q4IS5xq4Qtb6zRZYXXpu3tw7JRc85ZMc04wmNzIYlVmQm1h8T46rQ10zpaQ6SIwTUBozTVo9FhUTgprStc/9nLznAC9qpevPZTXcqrrVW60TI0htIp/4ukeIaAFFUmpFZC7+D8BT7ebWdXXIh8OA2nm34aai4nc9MlbH2e/H8yEte0AB6RuxsiBiV8gEgil+IJoqfKgbwtQI8WMVSr56G5ramuZ9vhFxGhMFV2fcpfSKYnqUaU59hsjV/o6owZeKr6A7Svj+w== 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=S8hMtJCGPdIL8VfAtuIpmCCtGXFBKCQwm9OSCM+iHBY=; b=iDdIyXipnN55YcuLz5d0mb2HKRJ3xlzjvDywlrKOu0L9+BYZxyPPRRb+gRyzWHMcUIU0D70Um/7XPegjE8u6sRevFhW0YQqkU+SeUp/s88p7zEklRDMiLeCOfLbkDAI8+QaD9tbXI9n1ffsdWMruv9ht6pUPeL0YWZiXbotpa45LLfCrCDo9QJinhtO47l4RNXWuOo/P//olzaCaXQqjLPtf+8x2b9ucw6Hjtm4NmBcJuKoyw0ym2DTBBsSjf1OCjdXFigy9MS3tDZ5CJR1DOAy9w20Oy+3lQ+jA4VpblNuAPp5CGR0XkwXBrZWTiLmCMjzu7P7j+J8Yyjfmi1mvYA== 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 MW4PR11MB6617.namprd11.prod.outlook.com (2603:10b6:303:1ed::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.12; Fri, 23 Dec 2022 01:00:19 +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.5924.016; Fri, 23 Dec 2022 01:00:19 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "abner.chang@amd.com" CC: "Ni, Ray" , Garrett Kirkendall , Kuei-Hung Lin Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value Thread-Topic: [edk2-devel] [PATCH 1/3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value Thread-Index: AQHZFVLHWh/PABTOu0aU1QqfHOWx5a56omOQ Date: Fri, 23 Dec 2022 01:00:19 +0000 Message-ID: References: <20221221154112.1161-1-abner.chang@amd.com> In-Reply-To: <20221221154112.1161-1-abner.chang@amd.com> 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_|MW4PR11MB6617:EE_ x-ms-office365-filtering-correlation-id: 89113318-b7be-403e-6ea3-08dae4810fbe x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 53Mg+EQ4nCywVwvGFa/5RyyrMu4I/Wpngr8vWKn7B99j4wM24k4i7VRnWyJETQ/NVuo0EsEKVpA/6YQxjgXVdm/bKTe8YkBEaTVb3fEU4z4ox6CRAvr8PL6275eCSYnWC978wZM1e+r0txURUZbpOSE+QcfpfzyXbrVwzWUk+aZZZWKPHf41w9IP4ankz7oNVhTYvH0+uQhhpdd9Wls7JN9gNtG6S7mf+6LktPjCmCzvsttOyitrcgailzs8YTVt9bKSI3O/TcReRxIV+H0e45FVbOS7IHMXnDqxbhoRlbqipsf/6ELX1KK1q6k+PWHkXS+EZGhxlrw61jB3A1xlM02tLYliteYctC8Yxy9tKKn0qQSaHoaznHEm3MFvVaUJe6SKijmtLpcYCovIkZMIgSVKT1Jc0H9TWg+q4rk5DWhLyfoWP3Wb+4E/qMkl/Vi+9Ky9UwtW2pYJMNW30iaoGsO5pPbBYU3lxfRVAH0yOc/CPXD1LWZxXokG7UGdNpmOxS8Wge057iHzVEKdWzAcpD0v/7woLs1oSPw+ILevXx7m8QlsT3zfhXPlUXs4uLmkg+d2K+i4/tf5VC4cFDZmTMf4mSnfb/EPo7Sb0UiySofNSw0d487W6lfeN3fxhewmm5TCJ4Lluc0OmpBynLY4POa0vvPS8kyHqyAHEs5QdjvnRsB9vQS40M1rXh0eZ3d8DmqfJJiDrKZ90rbLgorGAdJH+X5EqjGrttFvfRwWyPy7ast6gj9BRqWr+jRIRulthYKHYDD6NMP0FSNmv+E4gKXSwtD9RwG9RCKlG45zHWM= 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)(39860400002)(376002)(346002)(136003)(366004)(396003)(451199015)(82960400001)(2906002)(38100700002)(122000001)(33656002)(55016003)(38070700005)(86362001)(71200400001)(54906003)(110136005)(45080400002)(66899015)(7696005)(6506007)(53546011)(26005)(186003)(9686003)(966005)(478600001)(5660300002)(76116006)(83380400001)(66946007)(66446008)(41300700001)(66556008)(66476007)(64756008)(8676002)(8936002)(52536014)(4326008)(19627235002)(316002)(64893003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NeaYfg2Ws6Z9iFb7LqvyGIIPZ1Vg5ShWyWUF8WIym6yuNeHFyKQCxJqiY/sH?= =?us-ascii?Q?CdzXGAjuIGbTR6mJBJOkZDqOg0HFpkp9TJ9Es9Itbp96qhzkPBq3Nfzo3tho?= =?us-ascii?Q?ZlOjJ8uLTjuNzp1iH2WkX/ijP56PiMsHvzZf0SVi0rUkC2IzeDh1sLJTHOQS?= =?us-ascii?Q?X+AukuKfyLz0N3sAieQ9P+eOCBZa/eTEazTGzOKN02wuC/EM2UeoAMhuvGc+?= =?us-ascii?Q?b3WYvFHa/qioiYoFkkMZOelu+iVV/tdTyhVrA8/PzvgjSGCpL0/zbFcW1Mwx?= =?us-ascii?Q?H5gQK/E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qtH6wVzw/GDJMnh8uR2MDAlfn?= =?us-ascii?Q?CEY9Yo4mbAx/fw9jbWkyKfELXA4qc+FD+0a/nwhlZ0gUEmr8c3ygdTJXAUqG?= =?us-ascii?Q?vlC8vgPZVkvlo08T0G6hZIsRvynUEQHlVt6xdKNRE0gT26oDGLRR+4wS6alX?= =?us-ascii?Q?p4R1qPjngyjv2kSNSUT1UvhCNfFATwgCB+6QuUZAsw0DIU8NW4qwppgZF7sL?= =?us-ascii?Q?GScXHIzLpYqyOSwpyqp0Z7TVirTCNdYqOOaLlMtBwpdO0ksQDmWN2jXqDxDL?= =?us-ascii?Q?rhjrWNvKcosoEYNDFMb3g8kBLJqASV/gUsjUq3ST7CKmgKnsO8QkPak3pKd9?= =?us-ascii?Q?MNJud7nieYktomoc3chzRviWJO3HomtdnKnCFMlUpOvFviu0cfbFS3fXXEHK?= =?us-ascii?Q?GwC6YWlZek+akVHFLtqpa5jQQAx2DuLa0Vw7h039?= 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: 89113318-b7be-403e-6ea3-08dae4810fbe X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2022 01:00:19.2086 (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: n12DtEkCVRed2sLrUnnMb3n2AF/guauA/uyu4FYmaoQ3c//bkVp+pgZy6U5F19iUIBS1Poy5UYCJyrxpDqidhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6617 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 Reviewed-by: Hao A Wu Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chang, > Abner via groups.io > Sent: Wednesday, December 21, 2022 11:41 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A ; Ni, Ray ; Garrett > Kirkendall ; Abner Chang > ; Kuei-Hung Lin > Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/Xhci: Initial XHCI DCI slo= t's > Context value >=20 > From: Abner Chang >=20 > Initialize XHCI DCI slot's context entries value. >=20 > Signed-off-by: Jiangang He > Cc: Hao A Wu > Cc: Ray Ni > Cc: Garrett Kirkendall > Cc: Abner Chang > Cc: Kuei-Hung Lin > --- > MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++++++ > MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++++++ > 2 files changed, 14 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > index 13247f7b0df..4b7462704a8 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > @@ -4,6 +4,7 @@ >=20 > Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
> Copyright (c) Microsoft Corporation.
> +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext ( > MaxDci =3D 0; >=20 > NumEp =3D IfDesc->NumEndpoints; > + if (NumEp =3D=3D 0) { > + MaxDci =3D 1; > + } >=20 > EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1); > for (EpIndex =3D 0; EpIndex < NumEp; EpIndex++) { > @@ -3006,6 +3010,9 @@ XhcInitializeEndpointContext64 ( > MaxDci =3D 0; >=20 > NumEp =3D IfDesc->NumEndpoints; > + if (NumEp =3D=3D 0) { > + MaxDci =3D 1; > + } >=20 > EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1); > for (EpIndex =3D 0; EpIndex < NumEp; EpIndex++) { > diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c > b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c > index cc597a43717..8400c90f7ad 100644 > --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c > +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c > @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based > on gPeiUsbControllerPpiGuid > which is used to enable recovery function from USB Drivers. >=20 > Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
> +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -1752,6 +1753,9 @@ XhcPeiSetConfigCmd ( > } >=20 > NumEp =3D IfDesc->NumEndpoints; > + if ((NumEp =3D=3D 0) && (MaxDci =3D=3D 0)) { > + MaxDci =3D 1; > + } >=20 > EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1); > for (EpIndex =3D 0; EpIndex < NumEp; EpIndex++) { > @@ -1974,6 +1978,9 @@ XhcPeiSetConfigCmd64 ( > } >=20 > NumEp =3D IfDesc->NumEndpoints; > + if ((NumEp =3D=3D 0) && (MaxDci =3D=3D 0)) { > + MaxDci =3D 1; > + } >=20 > EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1); > for (EpIndex =3D 0; EpIndex < NumEp; EpIndex++) { > -- > 2.37.1.windows.1 >=20 >=20 >=20 >=20 >=20