Document pci_find_extcap() and pci_find_htcap().
This commit is contained in:
parent
9f0b9a0853
commit
68bf97175d
@ -981,6 +981,8 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
|
||||
pci.9 pci_find_cap.9 \
|
||||
pci.9 pci_find_dbsf.9 \
|
||||
pci.9 pci_find_device.9 \
|
||||
pci.9 pci_find_extcap.9 \
|
||||
pci.9 pci_find_htcap.9 \
|
||||
pci.9 pci_get_max_read_req.9 \
|
||||
pci.9 pci_get_powerstate.9 \
|
||||
pci.9 pci_get_vpd_ident.9 \
|
||||
|
@ -40,6 +40,8 @@
|
||||
.Nm pci_find_cap ,
|
||||
.Nm pci_find_dbsf ,
|
||||
.Nm pci_find_device ,
|
||||
.Nm pci_find_extcap ,
|
||||
.Nm pci_find_htcap ,
|
||||
.Nm pci_get_max_read_req ,
|
||||
.Nm pci_get_powerstate ,
|
||||
.Nm pci_get_vpd_ident ,
|
||||
@ -81,6 +83,10 @@
|
||||
.Ft device_t
|
||||
.Fn pci_find_device "uint16_t vendor" "uint16_t device"
|
||||
.Ft int
|
||||
.Fn pci_find_extcap "device_t dev" "int capability" "int *capreg"
|
||||
.Ft int
|
||||
.Fn pci_find_htcap "device_t dev" "int capability" "int *capreg"
|
||||
.Ft int
|
||||
.Fn pci_get_max_read_req "device_t dev"
|
||||
.Ft int
|
||||
.Fn pci_get_powerstate "device_t dev"
|
||||
@ -225,6 +231,49 @@ If the capability is not found or the device does not support capabilities,
|
||||
returns an error.
|
||||
.Pp
|
||||
The
|
||||
.Fn pci_find_extcap
|
||||
function is used to locate the first instance of a PCI-express
|
||||
extended capability register set for the device
|
||||
.Fa dev .
|
||||
The extended capability to locate is specified by ID via
|
||||
.Fa capability .
|
||||
Constant macros of the form
|
||||
.Dv PCIZ_xxx
|
||||
for standard extended capability IDs are defined in
|
||||
.In dev/pci/pcireg.h .
|
||||
If the extended capability is found, then
|
||||
.Fa *capreg
|
||||
is set the offset in configuration space of the extended capability
|
||||
register set, and
|
||||
.Fn pci_find_extcap
|
||||
returns zero.
|
||||
If the extended capability is not found or the device is not a
|
||||
PCI-express device,
|
||||
.Fn pci_find_extcap
|
||||
returns an error.
|
||||
.Pp
|
||||
The
|
||||
.Fn pci_find_htcap
|
||||
function is used to locate the first instance of a HyperTransport capability
|
||||
register set for the device
|
||||
.Fa dev .
|
||||
The capability to locate is specified by type via
|
||||
.Fa capability .
|
||||
Constant macros of the form
|
||||
.Dv PCIM_HTCAP_xxx
|
||||
for standard HyperTransport capability types are defined in
|
||||
.In dev/pci/pcireg.h .
|
||||
If the capability is found, then
|
||||
.Fa *capreg
|
||||
is set the offset in configuration space of the capability register set,
|
||||
and
|
||||
.Fn pci_find_htcap
|
||||
returns zero.
|
||||
If the capability is not found or the device is not a HyperTransport device,
|
||||
.Fn pci_find_htcap
|
||||
returns an error.
|
||||
.Pp
|
||||
The
|
||||
.Fn pci_get_vpd_ident
|
||||
function is used to fetch a device's Vital Product Data
|
||||
.Pq VPD
|
||||
|
Loading…
x
Reference in New Issue
Block a user