]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/EhciDxe: call EhcFreeUrb when int-transfer completes
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 15 Jan 2018 08:10:15 +0000 (16:10 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 16 Jan 2018 02:58:02 +0000 (10:58 +0800)
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 <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c

index 5173a9d599c5abf74d326c3dcbc9b1cbda7f6da1..f18ee82261ad3313a32d08d2a5211355915122a2 100644 (file)
@@ -11,7 +11,7 @@
   and companion host controller when UHCI or OHCI gets attached earlier than EHCI and a \r
   USB 2.0 device inserts.\r
 \r
   and companion host controller when UHCI or OHCI gets attached earlier than EHCI and a \r
   USB 2.0 device inserts.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1220,6 +1220,7 @@ EhcSyncInterruptTransfer (
     Status = EFI_SUCCESS;\r
   }\r
 \r
     Status = EFI_SUCCESS;\r
   }\r
 \r
+  EhcFreeUrb (Ehc, Urb);\r
 ON_EXIT:\r
   Ehc->PciIo->Flush (Ehc->PciIo);\r
   gBS->RestoreTPL (OldTpl);\r
 ON_EXIT:\r
   Ehc->PciIo->Flush (Ehc->PciIo);\r
   gBS->RestoreTPL (OldTpl);\r