From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: Void lookup limit of 2 exceeded) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 41609222DDC12 for ; Mon, 15 Jan 2018 00:19:13 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2018 00:24:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,362,1511856000"; d="scan'208";a="10140332" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.19]) by fmsmga007.fm.intel.com with ESMTP; 15 Jan 2018 00:24:30 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Star Zeng Date: Mon, 15 Jan 2018 16:24:28 +0800 Message-Id: <20180115082428.5452-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [PATCH] MdeModulePkg/EhciDxe: call EhcFreeUrb when int-transfer completes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2018 08:19:13 -0000 It didn't cause big issues when VT-d was disabled. But in VT-d enabled platform, lack of EhcFreeUrb call caused the DMA data was not moved back to user's buffer. It caused the correct data cannot be got through sync interrupt transfer. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng --- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 5173a9d599..f18ee82261 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -11,7 +11,7 @@ and companion host controller when UHCI or OHCI gets attached earlier than EHCI and a USB 2.0 device inserts. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1220,6 +1220,7 @@ EhcSyncInterruptTransfer ( Status = EFI_SUCCESS; } + EhcFreeUrb (Ehc, Urb); ON_EXIT: Ehc->PciIo->Flush (Ehc->PciIo); gBS->RestoreTPL (OldTpl); -- 2.15.1.windows.2