1ddi_intr_get_cap(9F)     Kernel Functions for Drivers     ddi_intr_get_cap(9F)
2
3
4

NAME

6       ddi_intr_get_cap,  ddi_intr_set_cap - get or set interrupt capabilities
7       for a given interrupt type
8

SYNOPSIS

10       #include <sys/types.h>
11       #include <sys/conf.h>
12       #include <sys/ddi.h>
13       #include <sys/sunddi.h>
14
15       int ddi_intr_get_cap(ddi_intr_handle_t h, int *flagsp);
16
17
18       int ddi_intr_set_cap(ddi_intr_handle_t h, int flags);
19
20

INTERFACE LEVEL

22       Solaris DDI specific (Solaris DDI).
23

PARAMETERS

25       ddi_intr_get_cap()
26
27       h         DDI interrupt handle
28
29
30       flagsp    Pointer to the capability flags returned for this handle
31
32
33
34       ddi_intr_set_cap()
35
36       h        DDI interrupt handle
37
38
39       flags    Contains the capability flag to be set
40
41

DESCRIPTION

43       The ddi_intr_get_cap() function returns the interrupt capability  flags
44       for  the  interrupt  handle  h. Upon a successful return, the flags are
45       returned in the integer pointed to by the flagsp argument.
46
47
48       These flags are typically combinations of the following:
49
50       DDI_INTR_FLAG_EDGE        For discrete interrupts,  the  host  supports
51                                 edge  type  of  trigger.  This  flag  is  not
52                                 returned     for     DDI_INTR_TYPE_MSI     or
53                                 DDI_INTR_TYPE_MSIX interrupt types. This is a
54                                 read-write (RW) flag.
55
56
57       DDI_INTR_FLAG_LEVEL       For discrete  interrupts  the  host  supports
58                                 level,  edge, or both types of triggers. This
59                                 flag is not returned for DDI_INTR_TYPE_MSI or
60                                 DDI_INTR_TYPE_MSIX interrupt types.
61
62
63       DDI_INTR_FLAG_MASKABLE    The  interrupt  can  be  masked either by the
64                                 device or by the host bridge,  or  optionally
65                                 by the host. This is a read-only (RO) flag.
66
67
68       DDI_INTR_FLAG_PENDING     The  interrupt  supports an interrupt pending
69                                 bit. This is a read-only (RO) flag.
70
71
72       DDI_INTR_FLAG_BLOCK       All interrupts of  the  given  type  must  be
73                                 block-enabled  and are not individually mask‐
74                                 able. This is a read-only (RO) flag.
75
76
77
78       The ddi_intr_set_cap() function allows a driver to specify the capabil‐
79       ity  flags  for  the  interrupt  handle h. Only DDI_INTR_FLAG_LEVEL and
80       DDI_INTR_FLAG_EDGE flags can be set.  Some  devices  can  support  both
81       level  and  edge  capability  and  either  can  be  set  by  using  the
82       ddi_intr_set_cap() function. Setting the capability flags is device and
83       platform dependent.
84
85
86       The  ddi_intr_set_cap()  function  can  be  called after interrupts are
87       allocated and prior to adding the  interrupt  handler.  For  all  other
88       times it returns failure.
89

RETURN VALUES

91       The ddi_intr_get_cap() and ddi_intr_set_cap() functions return:
92
93       DDI_SUCCESS    On success.
94
95
96       DDI_EINVAL     On encountering invalid input parameters.
97
98
99       DDI_FAILURE    On any implementation specific failure.
100
101
102       DDI_ENOTSUP    On device not supporting operation.
103
104

CONTEXT

106       The  ddi_intr_get_cap()  and ddi_intr_set_cap() functions can be called
107       from either user or kernel non-interrupt context.
108

ATTRIBUTES

110       See attributes(5) for descriptions of the following attributes:
111
112
113
114
115       ┌─────────────────────────────┬─────────────────────────────┐
116       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
117       ├─────────────────────────────┼─────────────────────────────┤
118       │Interface Stability          │Committed                    │
119       └─────────────────────────────┴─────────────────────────────┘
120

SEE ALSO

122       attributes(5),      ddi_intr_alloc(9F),      ddi_intr_block_enable(9F),
123       ddi_intr_get_nintrs(9F),   ddi_intr_get_pending(9F),  ddi_intr_get_sup‐
124       ported_types(9F), ddi_intr_set_mask(9F)
125
126
127       Writing Device Drivers
128

NOTES

130       Consumers of these interfaces should verify that the  return  value  is
131       not  equal  to DDI_SUCCESS. Incomplete checking for failure codes could
132       result in inconsistent behavior among platforms.
133
134
135
136SunOS 5.11                        20 Apr 2005             ddi_intr_get_cap(9F)
Impressum