Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / pci_config_setup.9f
blobf59cb89d08eae099baff601203cdeeeb2dc9e751
1 '\" te
2 .\"  Copyright (c) 1995, Sun Microsystems, Inc. , All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PCI_CONFIG_SETUP 9F "Mar 27, 2016"
7 .SH NAME
8 pci_config_setup, pci_config_teardown \- setup or tear down the resources for
9 enabling accesses to the PCI Local Bus Configuration space
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/ddi.h>
14 #include <sys/sunddi.h>
18 \fBint\fR \fBpci_config_setup\fR(\fBdev_info_t\fR \fI*dip\fR, \fBddi_acc_handle_t\fR \fI*handle\fR);
19 .fi
21 .LP
22 .nf
23 \fBvoid\fR \fBpci_config_teardown\fR(\fBddi_acc_handle_t\fR \fI*handle\fR);
24 .fi
26 .SH INTERFACE LEVEL
27 .LP
28 Solaris DDI specific (Solaris DDI).
29 .SH PARAMETERS
30 .ne 2
31 .na
32 \fB\fIdip\fR \fR
33 .ad
34 .RS 11n
35 Pointer to the device's \fBdev_info\fR structure.
36 .RE
38 .sp
39 .ne 2
40 .na
41 \fB\fIhandle\fR \fR
42 .ad
43 .RS 11n
44 Pointer to a data access handle.
45 .RE
47 .SH DESCRIPTION
48 .LP
49 \fBpci_config_setup()\fR sets up the necessary resources for enabling
50 subsequent data accesses to the  \fBPCI \fRLocal Bus Configuration space.
51 \fBpci_config_teardown()\fR reclaims and removes those resources  represented
52 by the data access handle returned from  \fBpci_config_setup()\fR.
53 .SH RETURN VALUES
54 .LP
55 \fBpci_config_setup()\fR returns:
56 .sp
57 .ne 2
58 .na
59 \fB\fBDDI_SUCCESS\fR \fR
60 .ad
61 .RS 16n
62 Successfully setup the resources.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBDDI_FAILURE\fR \fR
69 .ad
70 .RS 16n
71 Unable to allocate resources for setup.
72 .RE
74 .SH CONTEXT
75 .LP
76 \fBpci_config_setup()\fR must be called from user or kernel context.
77 \fBpci_config_teardown()\fR can be called from any context.
78 .SH NOTES
79 .LP
80 These functions are specific to \fBPCI \fRbus device drivers. For drivers using
81 these functions,  a single source to support devices with multiple bus versions
82 may not be easy to maintain.
83 .SH ATTRIBUTES
84 .LP
85 See \fBattributes\fR(5) for descriptions of the following attributes:
86 .sp
88 .sp
89 .TS
90 box;
91 c | c
92 l | l .
93 ATTRIBUTE TYPE  ATTRIBUTE VALUE
95 Architecture    PCI Local Bus
96 .TE
98 .SH SEE ALSO
99 .LP
100 \fBattributes\fR(5)
103 \fIIEEE 1275 PCI Bus Binding\fR