1ddi_intr_set_mask(9F) Kernel Functions for Drivers ddi_intr_set_mask(9F)
2
3
4
6 ddi_intr_set_mask, ddi_intr_clr_mask - set or clear mask for a given
7 interrupt
8
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_set_mask(ddi_intr_handle_t h);
16
17
18 int ddi_intr_clr_mask(ddi_intr_handle_t h);
19
20
22 Solaris DDI specific (Solaris DDI).
23
25 h DDI interrupt handle
26
27
29 The ddi_intr_set_mask() function masks the given interrupt pointed to
30 by the device's interrupt handle h if the device or host bridge sup‐
31 ports the masking operation. The ddi_intr_get_cap() function returns
32 the RO flag DDI_INTR_FLAG_MASKABLE if the device or host bridge sup‐
33 ports interrupt mask bits for the given interrupt type. In flight
34 interrupts can still be taken and delivered to the driver.
35
36
37 The ddi_intr_clr_mask() function unmasks the given interrupt pointed by
38 the device's interrupt handle h if the device or host bridge supports
39 the masking operation.
40
41
42 The ddi_intr_set_mask() and ddi_intr_clr_mask() functions should be
43 called only if an interrupt is enabled. Otherwise the framework will
44 return DDI_EINVAL to such calls.
45
46
47 The mask cannot be cleared directly if the OS implementation has also
48 temporarily masked the interrupt. A call to ddi_intr_clr_mask() must be
49 preceded by a call to ddi_intr_set_mask(). It is not necessary to call
50 ddi_intr_clr_mask() when adding and enabling the interrupt.
51
53 The ddi_intr_set_mask() and ddi_intr_clr_mask() functions return:
54
55 DDI_SUCCESS On success.
56
57
58 DDI_EINVAL On encountering invalid input parameters or when an
59 interrupt is not enabled.
60
61
62 DDI_FAILURE On any implementation specific failure.
63
64
65 DDI_ENOTSUP On device not supporting operation.
66
67
69 The ddi_intr_set_mask() and ddi_intr_clr_mask() functions can be called
70 from any context.
71
73 See attributes(5) for descriptions of the following attributes:
74
75
76
77
78 ┌─────────────────────────────┬─────────────────────────────┐
79 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
80 ├─────────────────────────────┼─────────────────────────────┤
81 │Interface Stability │Committed │
82 └─────────────────────────────┴─────────────────────────────┘
83
85 attributes(5), ddi_intr_block_disable(9F), ddi_intr_block_enable(9F),
86 ddi_intr_disable(9F), ddi_intr_enable(9F), ddi_intr_get_pending(9F)
87
88
89 Writing Device Drivers
90
92 Consumers of these interfaces should verify that the return value is
93 not equal to DDI_SUCCESS. Incomplete checking for failure codes could
94 result in inconsistent behavior among platforms.
95
96
97
98SunOS 5.11 05 Apri 2006 ddi_intr_set_mask(9F)