File: opal-pci-get-presence-state-119.rst

package info (click to toggle)
skiboot 7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 35,624 kB
  • sloc: ansic: 221,198; sh: 11,580; cpp: 5,767; python: 3,421; makefile: 1,773; asm: 1,503; perl: 1,479; tcl: 1,188; pascal: 107
file content (39 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (9)
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
37
38
39
.. _OPAL_PCI_GET_PRESENCE_STATE:

OPAL_PCI_GET_PRESENCE_STATE
===========================

.. code-block: c

   #define OPAL_PCI_GET_PRESENCE_STATE		119

   int64_t opal_pci_get_presence_state(uint64_t id, uint64_t data);

Get PCI slot presence state

Parameters
----------

``uint64_t id``
  PCI slot ID

``uint64_t data``
  memory buffer pointer for presence state

Calling
-------

Retrieve PCI slot's presence state. The detected presence means there are
adapters inserted to the PCI slot. Otherwise, the PCI slot is regarded as
an empty one. The typical use is to ensure there are adapters existing
before probing the PCI slot in PCI hot add path. The retrieved presence
state is stored in buffer pointed by @data.

Return Codes
------------
:ref:`OPAL_SUCCESS`
  PCI slot's presence state is retrieved successfully
:ref:`OPAL_PARAMETER`
  The indicated PCI slot isn't found
:ref:`OPAL_UNSUPPORTED`
  Presence retrieval not supported on the PCI slot