summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbMouseDxe
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-05 05:21:38 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-05 05:21:38 +0000
commit15cc67e616cad2dad3d3b6f9ba1cba856b5de414 (patch)
tree66fac7dfc66e6fa93ad43b5e67f51a6f86ae8982 /MdeModulePkg/Bus/Usb/UsbMouseDxe
parentb9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed (diff)
downloadedk2-15cc67e616cad2dad3d3b6f9ba1cba856b5de414.zip
edk2-15cc67e616cad2dad3d3b6f9ba1cba856b5de414.tar.gz
edk2-15cc67e616cad2dad3d3b6f9ba1cba856b5de414.tar.bz2
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')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
index 8b8a21e..f51dbfa 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;
}