Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2012 18:55:34 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232516 - head/share/man/man9
Message-ID:  <201203041855.q24ItYvx048290@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Sun Mar  4 18:55:33 2012
New Revision: 232516
URL: http://svn.freebsd.org/changeset/base/232516

Log:
  Document pci_find_extcap() and pci_find_htcap().

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/pci.9

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Sun Mar  4 18:53:35 2012	(r232515)
+++ head/share/man/man9/Makefile	Sun Mar  4 18:55:33 2012	(r232516)
@@ -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 \

Modified: head/share/man/man9/pci.9
==============================================================================
--- head/share/man/man9/pci.9	Sun Mar  4 18:53:35 2012	(r232515)
+++ head/share/man/man9/pci.9	Sun Mar  4 18:55:33 2012	(r232516)
@@ -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 de
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203041855.q24ItYvx048290>