From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.70]) by mx.groups.io with SMTP id smtpd.web11.14505.1673406630633892442 for ; Tue, 10 Jan 2023 19:10:30 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=pVfBU3kV; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.220.70, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KibZ0TJ+YsYdgbCMLNCXr0l/RD4C1VZjdsl5/sJE9bJFN5+m1Gwdp+CM+yGXrbg2a5WM3Tkov/x+xACAUBHCHjwHI9hnWM4alXFdlnb6aC3EnSH9HmB7LZ9qM+kjzbeXWkoGEzsmIMVuIqBi2r2wrL1g8jWEXViL3iTAVRksskNouSsbhp/4kJ5CiQV+leopEF9brYdQbceV5UbHK6TiorRGmkMopfpZnqItDNf3hrIArbxsTz/6NhC+WGwwlyU9lwRpgWVaULtU4HAeYQGR7yeEy0JdTC1I78NLxG36Zt+sD0FFNwx72mjYp+ys9nQpsPluYrzP1BWREQxT9XW+sg== 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=w1Tcw1ztSy8e9mlMWSCh2D+ky4+Z4gCu84VR4XUp4kM=; b=n7V/AB4qObPfnM2DkLrxnnhzlsH29ZpkO9hATS7aQTmhaEHbDH3YntZDsKCzFMHCvaU5/KjejsyX/V1DjxYzqAdN5mCqf6KQa11k0amTuPLxJ6O011x+uvMEbGGH/z3C4OdgbzPmKK8vqewNP8n9hlNbwbXLbH5vI2vqZ/GNnW2vxXBa4TTQByjxjwLPSSNwIgfwkaGnLXRFQW4FREQM48lByWHp9gxUyFGn+ZOguKETXKlqr/YrmA1XOsdyKgFV0j4HSCc6IUam+FFsvXIZHUFFfvF37tHDzxsyF+yqmMJFWN6gHNokdHMoSR1Ww0Y4+z6Gqxyg6XlVeEncXslKWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w1Tcw1ztSy8e9mlMWSCh2D+ky4+Z4gCu84VR4XUp4kM=; b=pVfBU3kVEkJ5OKKPjKAsxsjay3QyzPxbagDcFY/LX0SNA0inuhAHFFaakWTXfrfdFXs6EzVt4NMLerKNsuddxlEd5NVJMASwD1WneMyHlncK7FDEohpCOn9EjqYXsZ+5Q9c3+WoPWC8qqTVJKcNkvzj5jFtTpKjt3BcUWjINxBg= Received: from MW4PR04CA0220.namprd04.prod.outlook.com (2603:10b6:303:87::15) by MW3PR12MB4473.namprd12.prod.outlook.com (2603:10b6:303:56::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Wed, 11 Jan 2023 03:10:28 +0000 Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:303:87:cafe::a3) by MW4PR04CA0220.outlook.office365.com (2603:10b6:303:87::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18 via Frontend Transport; Wed, 11 Jan 2023 03:10:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.12 via Frontend Transport; Wed, 11 Jan 2023 03:10:28 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 10 Jan 2023 21:10:26 -0600 From: "Chang, Abner" To: CC: Hao A Wu , Ray Ni , "Garrett Kirkendall" , Abner Chang , Kuei-Hung Lin Subject: [PATCH V2 1/3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value Date: Wed, 11 Jan 2023 11:10:06 +0800 Message-ID: <20230111031008.1476-1-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT036:EE_|MW3PR12MB4473:EE_ X-MS-Office365-Filtering-Correlation-Id: c348c582-7829-45ba-6601-08daf3816449 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LW2hTZCWcBseRj0+KozrWqPmmJFZXURJx2GZ+82Db3CjrshX3BftP3fKcTBiAe5Pg1AsZvpzIR+O7sBGAZdCVfj7L8RDhS2HPSOcApo+20h0ksqJ3yjpTkLr5oT7d0LkN9va0v/IHbE7lAfxfNfgJyhljl7noxwZtLnpnU/c8W7EgCCGIChM3yMAWBIjvAeNZcDa2AQmglosE5NtpSclyX3RRuR2TtdYVV+pwmVUg9z+9QL6jj+j1/VL3U1QlHbHIUayGHm8a9eLSKc9oHBtxOZmN1a2XRry4KH6qaSR8Py3JTN4UZBdYW3c5ZVfXSGjkPeBmHWa7hiAwEHzkxVbz0UEF6dAKbhiniYxmgjL23Rg6sGlbR6F+E6LAJ3gPw9+p7xaOkA766coigoxS8Vzj7mSbYUtXoBBNd4F7J0jjchXHWQa16mJxjl97iv/b358/gzP8IgxE0Py7jyoRUOkBDXPNHeTuMc6rQu9Q8g0qP1ccNO5gFHfVAeBeoiSdKKdR6E/RKBDClOA5FiRgaT0MWEjc9F6mT+Nn4MVWJH05wSbIRUoFyeXIEZWTZovObdNq41BXaZhQ/MkELANqwL5sX1tZ7w3pOCxxrRyaTKstHJ74U2Eu1fX6rD3hL3/sU65Z5LpDptr6EcmcCKvBl1qa5MlEnK8mjC1MjL2nQj5iQc8+ObGbYovrF0BP7DePadfAV8gJHDJXPl4+eg5Z6vPRYuTqYfld4Qg1wBJabM5shKv67Lw5uk2ajskur6RxgvjPCQ4inKal8IXyABSeUxwZw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(396003)(346002)(376002)(451199015)(46966006)(40470700004)(36840700001)(36756003)(186003)(26005)(6666004)(8936002)(1076003)(2616005)(81166007)(16526019)(7696005)(5660300002)(40480700001)(6916009)(45080400002)(316002)(40460700003)(4326008)(19627235002)(86362001)(356005)(82740400003)(478600001)(54906003)(8676002)(41300700001)(70586007)(70206006)(82310400005)(47076005)(2906002)(2876002)(426003)(336012)(36860700001)(64893003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2023 03:10:28.3802 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c348c582-7829-45ba-6601-08daf3816449 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4473 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Abner Chang Initialize XHCI DCI slot's context entries value. Signed-off-by: Jiangang He Cc: Hao A Wu Cc: Ray Ni Cc: Garrett Kirkendall Cc: Abner Chang Cc: Kuei-Hung Lin Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++++++ MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/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/Pc= i/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 gPei= UsbControllerPpiGuid 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++) { --=20 2.37.1.windows.1