summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-03-04 18:55:33 +0000
committerjhb <jhb@FreeBSD.org>2012-03-04 18:55:33 +0000
commit44d3dd58d457039cc687ff95931359af58473a3f (patch)
treeedde316455f46cd3ceb7436fb2ea84eccf0909b6 /share
parent82e2b8d3c6a392b5f41abd10cbd2b1b7eb2e9889 (diff)
downloadFreeBSD-src-44d3dd58d457039cc687ff95931359af58473a3f.zip
FreeBSD-src-44d3dd58d457039cc687ff95931359af58473a3f.tar.gz
Document pci_find_extcap() and pci_find_htcap().
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile2
-rw-r--r--share/man/man9/pci.949
2 files changed, 51 insertions, 0 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index e9122e0..8acef35 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -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 \
diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9
index e4a2eac..1126e57 100644
--- a/share/man/man9/pci.9
+++ b/share/man/man9/pci.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
OpenPOWER on IntegriCloud