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

NAME

6       ddi_fm_init,  ddi_fm_fini,  ddi_fm_capable  - initialize and get the FM
7       capabilities for a device instance
8

SYNOPSIS

10       #include <sys/ddifm.h>
11
12       void ddi_fm_init(dev_info_t *dip, int *fm_capability,
13            ddi_iblock_cookie_t *ibcp);
14
15
16       void ddi_fm_fini(dev_info_t *dip);
17
18
19       int ddi_fm_capable(dev_info_t *dip, int *fm_capability);
20
21

INTERFACE LEVEL

23       Solaris DDI specific (Solaris DDI)
24

PARAMETERS

26       ddi_fm_init()
27
28       dip              Pointer to the dev_info structure
29
30
31       fm_capability    Fault Management capability bit mask
32
33
34       ibcp             Pointer to where the interrupt block cookie should  be
35                        returned.
36
37

DESCRIPTION

39       A  device  driver  can declare its fault management capabilities to the
40       I/O  Fault  Management  framework   by   calling   ddi_fm_init().   The
41       ddi_fm_init() function allocates and initializes resources according to
42       the  bitwise-inclusive-OR  of  the   fault   management   capabilities,
43       described  in  the  following  and  supported by the driver's immediate
44       nexus parent.
45
46       DDI_FM_NOT_CAPABLE        The driver does not support any FMA features.
47                                 This  is the default value assigned to device
48                                 drivers.
49
50
51       DDI_FM_EREPORT_CAPABLE    The  driver  generates  FMA  protocol   error
52                                 events  (ereports)  upon  the detection of an
53                                 error condition.
54
55
56       DDI_FM_ACCCHK_CAPABLE     The driver checks for errors upon the comple‐
57                                 tion of one or more access I/O transactions.
58
59
60       DDI_FM_DMACHK_CAPABLE     The driver checks for errors upon the comple‐
61                                 tion of one or more DMA I/O transactions.
62
63
64       DDI_FM_ERRCB_CAPABLE      The driver is capable of error handler  call‐
65                                 back registration.
66
67
68
69       If  the  parent  nexus  is  not  capable  of  supporting any one of the
70       requested capabilities, the associated bit will not be set and returned
71       as  such  to  the  driver. Before returning from ddi_fm_init(), the I/O
72       Fault Management framework creates a set of fault management capability
73       properties:  fm-ereport-capable,  fm-errcb-capable,  fm-accchk-capable,
74       and fm-dmachk-capable. The current supported fault management  capabil‐
75       ity levels are observable via prtconf(1M).
76
77
78       A  driver  can support the administrative selection of fault management
79       capabilities by exporting and setting  a  fault  management  capability
80       level  property  in  its  driver.conf(4)  file  to the values described
81       above. The fm_capable properties must be set and read prior to  calling
82       ddi_fm_init() with the desired capability list.
83
84       ddi_fm_fini()    This function cleans up resources allocated to support
85                        fault management for the dip structure.
86
87
88       ddi_fm_capable()    This function returns the capability bit mask  cur‐
89                           rently set for the dip structure.
90
91

CONTEXT

93       These  functions  can  be  called  from  kernel  context  in  a  driver
94       attach(9E) or detach(9E) operation.
95

ATTRIBUTES

97       See attributes(5) for descriptions of the following attributes:
98
99
100
101
102       ┌─────────────────────────────┬─────────────────────────────┐
103       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
104       ├─────────────────────────────┼─────────────────────────────┤
105       │Interface Stability          │Committed                    │
106       └─────────────────────────────┴─────────────────────────────┘
107

SEE ALSO

109       prtconf(1M), driver.conf(4), attributes(5), attach(9E), detach(9E)
110
111
112       Writing Device Drivers
113
114
115
116SunOS 5.11                        14 May 2007                  ddi_fm_init(9F)
Impressum