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"
8 ddi_intr_get_supported_types \- return information on supported hardware
13 #include <sys/types.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);
24 Solaris DDI specific (Solaris DDI)
32 Pointer to \fBdev_info\fR structure
41 Pointer to supported interrupt types
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.
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.
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
66 The \fBddi_intr_get_supported_types()\fR function returns:
70 \fB\fBDDI_SUCCESS\fR\fR
79 \fB\fBDDI_EINVAL\fR\fR
82 On encountering invalid input parameters.
88 \fB\fBDDI_INTR_NOTFOUND\fR\fR
91 Returned when the hardware device is found not to support any hardware
98 The \fBddi_intr_get_supported_types()\fR function can be called from user or
99 kernel non-interrupt context.
103 See \fBattributes\fR(5) for descriptions of the following attributes:
111 ATTRIBUTE TYPE ATTRIBUTE VALUE
113 Interface Stability Committed
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
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.