From nobody Sat Apr 27 15:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511255037944279.6793448111973; Tue, 21 Nov 2017 01:03:57 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7F1EE2035689D; Tue, 21 Nov 2017 00:59:41 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CC2242034711E for ; Tue, 21 Nov 2017 00:59:39 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2017 01:03:54 -0800 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2017 01:03:50 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,432,1505804400"; d="scan'208";a="10220597" From: Star Zeng To: edk2-devel@lists.01.org Date: Tue, 21 Nov 2017 17:03:48 +0800 Message-Id: <1511255028-10804-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [PATCH] MdeModulePkg EhciPei: Minor refinement about IOMMU X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch is following 2c656af04d7f. 1. Fix typo "XHC" to "EHC". 2. Reinitialize Request(Phy/Map) and Data(Phy/Map) in Urb, otherwise the last time value of them may be used in error handling when error happens. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Jiewen.yao@intel.com --- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 2 +- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h b/MdeModulePkg/Bus/Pci/= EhciPei/EhcPeim.h index 279407475b66..715a5ab1c142 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h @@ -99,7 +99,7 @@ struct _PEI_USB2_HC_DEV { EDKII_IOMMU_PPI *IoMmu; EFI_PEI_PPI_DESCRIPTOR PpiDescriptor; // - // EndOfPei callback is used to stop the XHC DMA operation + // EndOfPei callback is used to stop the EHC DMA operation // after exit PEI phase. // EFI_PEI_NOTIFY_DESCRIPTOR EndOfPeiNotifyList; diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci/= EhciPei/EhciUrb.c index 3dadcd60b6fe..baacf5d56080 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -576,7 +576,12 @@ EhcCreateUrb ( if (Urb->Qh =3D=3D NULL) { goto ON_ERROR; } - =20 + + Urb->RequestPhy =3D NULL; + Urb->RequestMap =3D NULL; + Urb->DataPhy =3D NULL; + Urb->DataMap =3D NULL; + // // Map the request and user data // @@ -591,9 +596,6 @@ EhcCreateUrb ( =20 Urb->RequestPhy =3D (VOID *) ((UINTN) PhyAddr); Urb->RequestMap =3D Map; - } else { - Urb->RequestPhy =3D NULL; - Urb->RequestMap =3D NULL; } =20 if (Data !=3D NULL) { @@ -613,9 +615,6 @@ EhcCreateUrb ( =20 Urb->DataPhy =3D (VOID *) ((UINTN) PhyAddr); Urb->DataMap =3D Map; - } else { - Urb->DataPhy =3D NULL; - Urb->DataMap =3D NULL; } =20 Status =3D EhcCreateQtds (Ehc, Urb); --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel