Disconnectcontroller() – Intel Extensible Firmware Interface User Manual
Page 164

Extensible Firmware Interface Specification
5-66
12/01/02
Version 1.10
DisconnectController()
Summary
Disconnects one or more drivers from a controller.
Prototype
typedef
EFI_STATUS
DisconnectController (
IN
EFI_HANDLE
ControllerHandle,
IN
EFI_HANDLE
DriverImageHandle
OPTIONAL,
IN
EFI_HANDLE
ChildHandle
OPTIONAL
);
Parameters
ControllerHandle
The handle of the controller from which driver(s) are to be
disconnected.
DriverImageHandle
The driver to disconnect from
ControllerHandle
. If
DriverImageHandle
is
NULL
, then all the drivers currently
managing
ControllerHandle
are disconnected from
ControllerHandle
.
ChildHandle
The handle of the child to destroy. If
ChildHandle
is
NULL
,
then all the children of
ControllerHandle
are destroyed
before the drivers are disconnected from
ControllerHandle
.
Description
This function disconnects one or more drivers from the controller specified by
ControllerHandle
. If
DriverImageHandle
is
NULL
, then all of the drivers currently
managing
ControllerHandle
are disconnected from
ControllerHandle
. If
DriverImageHandle
is not
NULL
, then only the driver specified by
DriverImageHandle
is disconnected from
ControllerHandle
. If
ChildHandle
is
NULL
, then all of the children
of
ControllerHandle
are destroyed before the drivers are disconnected from
ControllerHandle
. If
ChildHandle
is not
NULL
, then only the child controller specified
by
ChildHandle
is destroyed. If
ChildHandle
is the only child of
ControllerHandle
,
then the driver specified by
DriverImageHandle
will be disconnected from
ControllerHandle
. A driver is disconnected from a controller by calling the
Stop()
service
of the
EFI_DRIVER_BINDING_PROTOCOL
. The
EFI_DRIVER_BINDING_PROTOCOL
is on
the driver image handle, and the handle of the controller is passed into the
Stop()
service. The
list of drivers managing a controller, and the list of children for a specific controller can be
retrieved from the handle database with the boot service
. If
all the required drivers are disconnected from
ControllerHandle
, then
EFI_SUCCESS
is
returned.
If
ControllerHandle
is not a valid
EFI_HANDLE
, then
EFI_INVALID_PARAMETER
is
returned. If no drivers are managing
ControllerHandle
, then
EFI_SUCCESS
is returned. If
DriverImageHandle
is not
NULL
, and
DriverImageHandle
is not a valid
EFI_HANDLE
,