Fix component name bugs when input Controller Name is invalid
Fix the driver binding version for platform/OEM specific drivers git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2274 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -93,7 +93,7 @@ EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding = {
|
||||
AtapiScsiPassThruDriverBindingSupported,
|
||||
AtapiScsiPassThruDriverBindingStart,
|
||||
AtapiScsiPassThruDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding = {
|
||||
CirrusLogic5430ControllerDriverSupported,
|
||||
CirrusLogic5430ControllerDriverStart,
|
||||
CirrusLogic5430ControllerDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -162,6 +162,17 @@ EhciComponentNameGetControllerName (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gEhciDriverBinding.DriverBindingHandle,
|
||||
&gEfiPciIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Get the device context
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
|
@@ -218,7 +218,7 @@ EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding = {
|
||||
EhciDriverBindingSupported,
|
||||
EhciDriverBindingStart,
|
||||
EhciDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -125,16 +125,13 @@ IDEBusComponentNameGetControllerName (
|
||||
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
||||
|
||||
//
|
||||
// Get the controller context
|
||||
// Make sure this driver is currently managing ControllHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiCallerIdGuid,
|
||||
NULL,
|
||||
gIDEBusDriverBinding.DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gIDEBusDriverBinding.DriverBindingHandle,
|
||||
&gEfiIdeControllerInitProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
@@ -148,6 +145,15 @@ IDEBusComponentNameGetControllerName (
|
||||
);
|
||||
}
|
||||
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
&gEfiPciIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Get the child context
|
||||
//
|
||||
|
@@ -26,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
|
||||
IDEBusDriverBindingSupported,
|
||||
IDEBusDriverBindingStart,
|
||||
IDEBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -67,7 +67,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPciBusDriverBinding = {
|
||||
PciBusDriverBindingSupported,
|
||||
PciBusDriverBindingStart,
|
||||
PciBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -162,6 +162,17 @@ UhciComponentNameGetControllerName (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUhciDriverBinding.DriverBindingHandle,
|
||||
&gEfiPciIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Get the device context
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
|
@@ -364,7 +364,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding = {
|
||||
UHCIDriverBindingSupported,
|
||||
UHCIDriverBindingStart,
|
||||
UHCIDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@@ -192,7 +192,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUndiDriverBinding = {
|
||||
UndiDriverSupported,
|
||||
UndiDriverStart,
|
||||
UndiDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
Reference in New Issue
Block a user