diff options
| author | Marlboro_Chuang <Marlboro_Chuang@dell.com> | 2025-07-27 11:35:30 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-09-21 09:06:06 +0300 |
| commit | 2ba169b02f7eebb34816c2d02a1cd9f92a524b1a (patch) | |
| tree | acd5d82a9419f661bff03ff5da05e5f92cf8943e /UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.inf | |
| parent | 82138022d2c283b6bbddb1cc575e2d2f8e66f779 (diff) | |
| download | edk2-2ba169b02f7eebb34816c2d02a1cd9f92a524b1a.tar.xz | |
MdeModulePkg/UsbBusDxe: Raise TPL to CALLBACK for wanted UsbIo connect
Raise TPL to TPL_CALLBACK around the ConnectController() call in
UsbBusRecursivelyConnectWantedUsbIo() and restore the original TPL
afterward.
UsbBusRecursivelyConnectWantedUsbIo() is normally reached through the
DriverBinding Start routine invoked by gBS->ConnectController(), which
runs at TPL_APPLICATION. While the wanted UsbIo handle is being
connected, the USB device can be removed. The device removal polling
event in UsbBus runs at TPL_CALLBACK. If the connect runs at
TPL_APPLICATION, that event can preempt the connection and cause
commands to be sent to a stale or non-existent USB device address,
producing a lot of timeout transfers.
This differs from UsbConnectDriver(), which is called from the
enumeration polling event (XHCI async event) and is usually already
at TPL_CALLBACK or TPL_NOTIFY. That function uses RestoreTPL()/
RaiseTPL() to ensure ConnectController() runs at TPL_CALLBACK.
Signed-off-by: Marlboro_Chuang <marlboro.chuang@dell.com>
Diffstat (limited to 'UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.inf')
0 files changed, 0 insertions, 0 deletions
