summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-11-05 21:27:25 +0000
committerjhb <jhb@FreeBSD.org>2015-11-05 21:27:25 +0000
commitfa7f239637c899b490a1463c23b0516030c79bc4 (patch)
tree5c0c3dd2265de647727b90524bf7ccdbbf094e85 /share/man
parent0c12e4753ba6951c7105eee5418f69cfda826f9c (diff)
downloadFreeBSD-src-fa7f239637c899b490a1463c23b0516030c79bc4.zip
FreeBSD-src-fa7f239637c899b490a1463c23b0516030c79bc4.tar.gz
Add a new helper function for PCI devices to locate the upstream
PCI-express root port of a given PCI device. Reviewed by: kib, imp MFC after: 1 week Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D4089
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/Makefile1
-rw-r--r--share/man/man9/pci.913
2 files changed, 14 insertions, 0 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 5ae857e..b4af53d 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1274,6 +1274,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_find_device.9 \
pci.9 pci_find_extcap.9 \
pci.9 pci_find_htcap.9 \
+ pci.9 pci_find_pcie_root_port.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 2321638..4faa5f2 100644
--- a/share/man/man9/pci.9
+++ b/share/man/man9/pci.9
@@ -42,6 +42,7 @@
.Nm pci_find_device ,
.Nm pci_find_extcap ,
.Nm pci_find_htcap ,
+.Nm pci_find_pcie_root_port ,
.Nm pci_get_max_read_req ,
.Nm pci_get_powerstate ,
.Nm pci_get_vpd_ident ,
@@ -91,6 +92,8 @@
.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 device_t
+.Fn pci_find_pcie_root_port "device_t dev"
.Ft int
.Fn pci_get_max_read_req "device_t dev"
.Ft int
@@ -338,6 +341,16 @@ If the capability is not found or the device is not a HyperTransport device,
returns an error.
.Pp
The
+.Fn pci_find_pcie_root_port
+function walks up the PCI device hierarchy to locate the PCI-express root
+port upstream of
+.Fa dev .
+If a root port is not found,
+.Fn pci_find_pcie_root_port
+returns
+.Dv NULL .
+.Pp
+The
.Fn pci_get_vpd_ident
function is used to fetch a device's Vital Product Data
.Pq VPD
OpenPOWER on IntegriCloud