Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_intr_get_supported_types.9f
blobfcb94260cea421c0ff50576622b08304b588f355
1 '\" te
2 .\" Copyright (c) 2005, 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 DDI_INTR_GET_SUPPORTED_TYPES 9F "Apr 07, 2005"
7 .SH NAME
8 ddi_intr_get_supported_types \- return information on supported hardware
9 interrupt types
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/types.h>
14 #include <sys/conf.h>
15 #include <sys/ddi.h>
16 #include <sys/sunddi.h>
18 \fBint\fR \fBddi_intr_get_supported_types\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint *\fR\fItypesp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Solaris DDI specific (Solaris DDI)
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIdip\fR\fR
30 .ad
31 .RS 10n
32 Pointer to \fBdev_info\fR structure
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fItypesp\fR\fR
39 .ad
40 .RS 10n
41 Pointer to supported interrupt types
42 .RE
44 .SH DESCRIPTION
45 .sp
46 .LP
47 The \fBddi_intr_get_supported_types()\fR function retrieves the interrupt types
48 supported by a particular hardware device and by the system software. Upon
49 successful return, the supported types are returned as a bit mask in the
50 integer pointed to by the \fItypesp\fR argument. See <\fBsys/ddi_intr.h\fR> for
51 a list of interrupts that can be returned by a hardware device.
52 .sp
53 .LP
54 For PCI devices that support MSI and/or MSI-X based hardware, this interface
55 returns only the interrupt types that are supported by all the hardware in the
56 path to the hardware device.
57 .sp
58 .LP
59 An interrupt type is usable by the hardware device if it is returned by the
60 \fBddi_intr_get_supported_types()\fR function. The device driver can be
61 programmed to use one of the returned interrupt types to receive hardware
62 interrupts.
63 .SH RETURN VALUES
64 .sp
65 .LP
66 The \fBddi_intr_get_supported_types()\fR function returns:
67 .sp
68 .ne 2
69 .na
70 \fB\fBDDI_SUCCESS\fR\fR
71 .ad
72 .RS 21n
73 On success.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fBDDI_EINVAL\fR\fR
80 .ad
81 .RS 21n
82 On encountering invalid input parameters.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fBDDI_INTR_NOTFOUND\fR\fR
89 .ad
90 .RS 21n
91 Returned when the hardware device is found not to support any hardware
92 interrupts.
93 .RE
95 .SH CONTEXT
96 .sp
97 .LP
98 The \fBddi_intr_get_supported_types()\fR function can be called from user or
99 kernel non-interrupt context.
100 .SH ATTRIBUTES
103 See \fBattributes\fR(5) for descriptions of the following attributes:
108 box;
109 c | c
110 l | l .
111 ATTRIBUTE TYPE  ATTRIBUTE VALUE
113 Interface Stability     Committed
116 .SH SEE ALSO
119 \fBpci\fR(4), \fBattributes\fR(5), \fBpcmcia\fR(7D), \fBsysbus\fR(4),
120 \fBddi_intr_add_handler\fR(9F), \fBddi_intr_alloc\fR(9F),
121 \fBddi_intr_enable\fR(9F)
124 \fIWriting Device Drivers\fR
125 .SH NOTES
128 The \fBddi_intr_get_supported_types()\fR function can be called by the device
129 driver even at any time if the driver has added an interrupt handler for a
130 given interrupt type.
133 Soft interrupts are always usable and are not returned by this interface.
136 Any consumer of this interface should verify that the return value is not equal
137 to \fBDDI_SUCCESS\fR. Incomplete checking for failure codes could result in
138 inconsistent behavior among platforms.