blob: 92da235038d4349570bb72edff6845e519f63e2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
OPAL_PCI_SET_POWER_STATE
---------------------------
Set PCI slot power state
Parameters:
uint64_t async_token: Token of asynchronous message to be sent
on completion of OPAL_PCI_SLOT_POWER_{OFF, ON}. It is
ignored when @data is OPAL_PCI_SLOT_{OFFLINE, ONLINE}.
uint64_t id: PCI slot ID
uint64_t data: memory buffer pointer for the power state which
can be one of OPAL_PCI_SLOT_POWER_{OFF, ON, OFFLINE, ONLINE}.
Calling:
Set PCI slot's power state. The power state is stored in buffer pointed
by @data. The typical use is to hot add or remove adapters behind the
indicated PCI slot (by @id) in PCI hotplug path.
User will receive an asychronous message after calling the API. The message
contains the API completion status: event (Power off or on), device node's
phandle identifying the PCI slot, errcode (e.g. OPAL_SUCCESS). The API returns
OPAL_ASYNC_COMPLETION for the case.
The states OPAL_PCI_SLOT_OFFLINE and OPAL_PCI_SLOT_ONLINE are used for removing
or adding devices behind the slot. The device nodes in the device tree are
removed or added accordingly, without actually changing the slot's power state.
The API call will return OPAL_SUCCESS immediately and no further asynchronous
message will be sent.
Return Codes:
OPAL_SUCCESS - PCI hotplug on the slot is completed successfully
OPAL_ASYNC_COMPLETION - PCI hotplug needs further message to confirm
OPAL_PARAMETER - The indicated PCI slot isn't found
OPAL_UNSUPPORTED - Setting power state not supported on the PCI slot
|