diff options
author | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-05 05:21:38 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-05 05:21:38 +0000 |
commit | 15cc67e616cad2dad3d3b6f9ba1cba856b5de414 (patch) | |
tree | 66fac7dfc66e6fa93ad43b5e67f51a6f86ae8982 /MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | |
parent | b9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed (diff) | |
download | edk2-platforms-15cc67e616cad2dad3d3b6f9ba1cba856b5de414.tar.xz |
raise TPL to TPL_CALLBACK level at DriverBindingStart() for all usb-related modules, which prevent DriverBindingStop() from being invoked when DriverBindingStart() runs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10460 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c index 8b8a21eae8..f51dbfa1cf 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c @@ -149,7 +149,9 @@ USBMouseDriverBindingStart ( UINT8 PollingInterval;
UINT8 PacketSize;
BOOLEAN Found;
+ EFI_TPL OldTpl;
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
// Open USB I/O Protocol
//
@@ -162,7 +164,7 @@ USBMouseDriverBindingStart ( EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status)) {
- return Status;
+ goto ErrorExit1;
}
UsbMouseDevice = AllocateZeroPool (sizeof (USB_MOUSE_DEV));
@@ -324,6 +326,8 @@ USBMouseDriverBindingStart ( FALSE
);
+ gBS->RestoreTPL (OldTpl);
+
return EFI_SUCCESS;
//
@@ -348,6 +352,8 @@ ErrorExit: }
}
+ErrorExit1:
+ gBS->RestoreTPL (OldTpl);
return Status;
}
|