summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Tian <feng.tian@intel.com>2015-08-06 07:13:16 +0000
committererictian <erictian@Edk2>2015-08-06 07:13:16 +0000
commit3cf6450eb581961e3618d29117b09b22605c99cd (patch)
tree8f3e9b0a9fb59ddb22310fcf2f092c797c833e59
parentea0f431cec51247658901a4f65ae76d6bbdd96e9 (diff)
downloadedk2-3cf6450eb581961e3618d29117b09b22605c99cd.tar.gz
edk2-3cf6450eb581961e3618d29117b09b22605c99cd.tar.bz2
edk2-3cf6450eb581961e3618d29117b09b22605c99cd.zip
MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum.
EDKII usb stack is using a TPL_CALLBACK timer to monitor async transfer request and signal event if it's done. As usb enumeration and usb mass storage block i/o read/write runs on TPL_CALLBACK and TPL_NOTIFY level respectively, It blocks usb async transfer requests, usually usb mouse /use kb, getting time to run. Without this change, user couldn't get usb mouse/kb state in time (will show a little lag from UI view) when there is other usb transactions, such as a new usb device inserted. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18169 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c2
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c8
4 files changed, 7 insertions, 7 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 315f2cbbdb..4e9e05f0e4 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -1615,7 +1615,7 @@ EhcCreateUsb2Hc (
//
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
EhcMonitorAsyncRequests,
Ehc,
&Ehc->PollTimer
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index ad9c85c557..179e36c3a2 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -1482,7 +1482,7 @@ UhciAllocateDev (
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
UhciMonitorAsyncReqList,
Uhc,
&Uhc->AsyncIntMonitor
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 6143b200ab..390ca0a376 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -1822,7 +1822,7 @@ XhcCreateUsbHc (
//
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
XhcMonitorAsyncRequests,
Xhc,
&Xhc->PollTimer
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
index be11cc78fe..9d1bb25fb3 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
@@ -1,7 +1,7 @@
/** @file
USB Mass Storage Driver that manages USB Mass Storage Device and produces Block I/O Protocol.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
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
@@ -63,7 +63,7 @@ UsbMassReset (
// Raise TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbMass = USB_MASS_DEVICE_FROM_BLOCK_IO (This);
Status = UsbMass->Transport->Reset (UsbMass->Context, ExtendedVerification);
@@ -117,7 +117,7 @@ UsbMassReadBlocks (
// Raise TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbMass = USB_MASS_DEVICE_FROM_BLOCK_IO (This);
Media = &UsbMass->BlockIoMedia;
@@ -233,7 +233,7 @@ UsbMassWriteBlocks (
// Raise TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbMass = USB_MASS_DEVICE_FROM_BLOCK_IO (This);
Media = &UsbMass->BlockIoMedia;