pci.9 (f41be0f07673849a55ab3dfbba8878b9cb06b133) pci.9 (d7be980dbe6961abce6b3e12de0391cbad295f95)
1.\"
2.\" Copyright (c) 2005 Bruce M Simpson <bms@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
1.\"
2.\" Copyright (c) 2005 Bruce M Simpson <bms@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd December 23, 2015
28.Dd May 16, 2016
29.Dt PCI 9
30.Os
31.Sh NAME
32.Nm pci ,
33.Nm pci_alloc_msi ,
34.Nm pci_alloc_msix ,
35.Nm pci_disable_busmaster ,
36.Nm pci_disable_io ,
37.Nm pci_enable_busmaster ,
38.Nm pci_enable_io ,
39.Nm pci_find_bsf ,
40.Nm pci_find_cap ,
41.Nm pci_find_dbsf ,
42.Nm pci_find_device ,
43.Nm pci_find_extcap ,
44.Nm pci_find_htcap ,
45.Nm pci_find_pcie_root_port ,
29.Dt PCI 9
30.Os
31.Sh NAME
32.Nm pci ,
33.Nm pci_alloc_msi ,
34.Nm pci_alloc_msix ,
35.Nm pci_disable_busmaster ,
36.Nm pci_disable_io ,
37.Nm pci_enable_busmaster ,
38.Nm pci_enable_io ,
39.Nm pci_find_bsf ,
40.Nm pci_find_cap ,
41.Nm pci_find_dbsf ,
42.Nm pci_find_device ,
43.Nm pci_find_extcap ,
44.Nm pci_find_htcap ,
45.Nm pci_find_pcie_root_port ,
46.Nm pci_get_id ,
46.Nm pci_get_max_read_req ,
47.Nm pci_get_powerstate ,
48.Nm pci_get_vpd_ident ,
49.Nm pci_get_vpd_readonly ,
50.Nm pci_iov_attach ,
51.Nm pci_iov_detach ,
52.Nm pci_msi_count ,
53.Nm pci_msix_count ,

--- 38 unchanged lines hidden (view full) ---

92.Fn pci_find_device "uint16_t vendor" "uint16_t device"
93.Ft int
94.Fn pci_find_extcap "device_t dev" "int capability" "int *capreg"
95.Ft int
96.Fn pci_find_htcap "device_t dev" "int capability" "int *capreg"
97.Ft device_t
98.Fn pci_find_pcie_root_port "device_t dev"
99.Ft int
47.Nm pci_get_max_read_req ,
48.Nm pci_get_powerstate ,
49.Nm pci_get_vpd_ident ,
50.Nm pci_get_vpd_readonly ,
51.Nm pci_iov_attach ,
52.Nm pci_iov_detach ,
53.Nm pci_msi_count ,
54.Nm pci_msix_count ,

--- 38 unchanged lines hidden (view full) ---

93.Fn pci_find_device "uint16_t vendor" "uint16_t device"
94.Ft int
95.Fn pci_find_extcap "device_t dev" "int capability" "int *capreg"
96.Ft int
97.Fn pci_find_htcap "device_t dev" "int capability" "int *capreg"
98.Ft device_t
99.Fn pci_find_pcie_root_port "device_t dev"
100.Ft int
101.Fn pci_get_id "device_t dev" "enum pci_id_type type" "uintptr_t *id"
102.Ft int
100.Fn pci_get_max_read_req "device_t dev"
101.Ft int
102.Fn pci_get_powerstate "device_t dev"
103.Ft int
104.Fn pci_get_vpd_ident "device_t dev" "const char **identptr"
105.Ft int
106.Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr"
107.Ft int

--- 244 unchanged lines hidden (view full) ---

352port upstream of
353.Fa dev .
354If a root port is not found,
355.Fn pci_find_pcie_root_port
356returns
357.Dv NULL .
358.Pp
359The
103.Fn pci_get_max_read_req "device_t dev"
104.Ft int
105.Fn pci_get_powerstate "device_t dev"
106.Ft int
107.Fn pci_get_vpd_ident "device_t dev" "const char **identptr"
108.Ft int
109.Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr"
110.Ft int

--- 244 unchanged lines hidden (view full) ---

355port upstream of
356.Fa dev .
357If a root port is not found,
358.Fn pci_find_pcie_root_port
359returns
360.Dv NULL .
361.Pp
362The
363.Fn pci_get_id
364function is used to read an identifier from a device.
365The
366.Fa type
367flag is used to specify which identifier to read.
368The following flags are supported:
369.Bl -hang -width ".Dv PCI_ID_RID"
370.It Dv PCI_ID_RID
371Read the routing identifier for the device.
372.El
373.Pp
374The
360.Fn pci_get_vpd_ident
361function is used to fetch a device's Vital Product Data
362.Pq VPD
363identifier string.
364If the device
365.Fa dev
366supports VPD and provides an identifier string,
367then

--- 537 unchanged lines hidden ---
375.Fn pci_get_vpd_ident
376function is used to fetch a device's Vital Product Data
377.Pq VPD
378identifier string.
379If the device
380.Fa dev
381supports VPD and provides an identifier string,
382then

--- 537 unchanged lines hidden ---