Revision: 18169
http://sourceforge.net/p/edk2/code/18169
Author: erictian
Date: 2015-08-06 07:13:16 +0000 (Thu, 06 Aug 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
trunk/edk2/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c 2015-08-06 06:57:47 UTC
(rev 18168)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c 2015-08-06 07:13:16 UTC
(rev 18169)
@@ -1615,7 +1615,7 @@
//
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
EhcMonitorAsyncRequests,
Ehc,
&Ehc->PollTimer
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c 2015-08-06 06:57:47 UTC
(rev 18168)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c 2015-08-06 07:13:16 UTC
(rev 18169)
@@ -1482,7 +1482,7 @@
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
UhciMonitorAsyncReqList,
Uhc,
&Uhc->AsyncIntMonitor
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c 2015-08-06 06:57:47 UTC
(rev 18168)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c 2015-08-06 07:13:16 UTC
(rev 18169)
@@ -1822,7 +1822,7 @@
//
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
+ TPL_NOTIFY,
XhcMonitorAsyncRequests,
Xhc,
&Xhc->PollTimer
Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
2015-08-06 06:57:47 UTC (rev 18168)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
2015-08-06 07:13:16 UTC (rev 18169)
@@ -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 @@
// 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 @@
// 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 @@
// 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;
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits