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
This commit is contained in:
@@ -833,7 +833,10 @@ USBMassDriverBindingStart (
|
||||
UINT8 MaxLun;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
EFI_TPL OldTpl;
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
|
||||
Transport = NULL;
|
||||
Context = NULL;
|
||||
MaxLun = 0;
|
||||
@@ -842,7 +845,7 @@ USBMassDriverBindingStart (
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitTransport (%r)\n", Status));
|
||||
return Status;
|
||||
goto Exit;
|
||||
}
|
||||
if (MaxLun == 0) {
|
||||
//
|
||||
@@ -867,7 +870,7 @@ USBMassDriverBindingStart (
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: OpenDevicePathProtocol By Driver (%r)\n", Status));
|
||||
return Status;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
@@ -887,7 +890,7 @@ USBMassDriverBindingStart (
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
return Status;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -911,6 +914,8 @@ USBMassDriverBindingStart (
|
||||
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitMultiLun (%r) with Maxlun=%d\n", Status, MaxLun));
|
||||
}
|
||||
}
|
||||
Exit:
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user