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/Universal/Disk/PartitionDxe | |
parent | b9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed (diff) | |
download | edk2-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/Universal/Disk/PartitionDxe')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index 73278e9..5629a74 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -194,7 +194,9 @@ PartitionDriverBindingStart ( EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
PARTITION_DETECT_ROUTINE *Routine;
BOOLEAN MediaPresent;
+ EFI_TPL OldTpl;
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
// Check RemainingDevicePath validation
//
@@ -204,7 +206,8 @@ PartitionDriverBindingStart ( // if yes, return EFI_SUCCESS
//
if (IsDevicePathEnd (RemainingDevicePath)) {
- return EFI_SUCCESS;
+ Status = EFI_SUCCESS;
+ goto Exit;
}
}
@@ -217,7 +220,7 @@ PartitionDriverBindingStart ( EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
- return Status;
+ goto Exit;
}
//
// Get the Device Path Protocol on ControllerHandle's handle
@@ -231,7 +234,7 @@ PartitionDriverBindingStart ( EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
- return Status;
+ goto Exit;
}
Status = gBS->OpenProtocol (
@@ -249,7 +252,7 @@ PartitionDriverBindingStart ( This->DriverBindingHandle,
ControllerHandle
);
- return Status;
+ goto Exit;
}
OpenStatus = Status;
@@ -312,6 +315,8 @@ PartitionDriverBindingStart ( );
}
+Exit:
+ gBS->RestoreTPL (OldTpl);
return Status;
}
|