Kernel Functions for Drivers ddifminit(9F)
NAME
ddifminit, ddifmfini, ddifmcapable - initialize and
get the FM capabilities for a device instance
SYNOPSIS
#include
void ddifminit(devinfot *dip, int *fmcapability,
ddiiblockcookiet *ibcp);
void ddifmfini(devinfot *dip);
int ddifmcapable(devinfot *dip, int *fmcapability);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
ddifminit()
dip Pointer to the devinfo structure
fmcapability Fault Management capability bit mask
ibcp Pointer to where the interrupt block cookie
should be returned.
DESCRIPTION
A device driver can declare its fault management capabili-
ties to the I/O Fault Management framework by calling
ddifminit(). The ddifminit() function allocates and ini-
tializes resources according to the bitwise-inclusive-OR of
the fault management capabilities, described in the follow-
ing and supported by the driver's immediate nexus parent.
DIFMNOTCAPABLE The driver does not support any
FMA features. This is the default
value assigned to device drivers.
DIFMEREPORTCAPABLE The driver generates FMA protocol
error events (ereports) upon the
detection of an error condition.
SunOS 5.11 Last change: 14 May 2007 1
Kernel Functions for Drivers ddifminit(9F)
DIFMACHKCAPABLE The driver checks for errors upon
the completion of one or more
access I/O transactions.
DIFMDMACHKCAPABLE The driver checks for errors upon
the completion of one or more DMA
I/O transactions.
DIFMERCBCAPABLE The driver is capable of error
handler callback registration.
If the parent nexus is not capable of supporting any one of
the requested capabilities, the associated bit will not be
set and returned as such to the driver. Before returning
from ddifminit(), the I/O Fault Management framework
creates a set of fault management capability properties:
fm-ereport-capable, fm-errcb-capable, fm-accchk-capable, and
fm-dmachk-capable. The current supported fault management
capability levels are observable via prtconf(1M).
A driver can support the administrative selection of fault
management capabilities by exporting and setting a fault
management capability level property in its driver.conf(4)
file to the values described above. The fmcapable proper-
ties must be set and read prior to calling ddifminit()
with the desired capability list.
ddifmfini() This function cleans up resources allocated
to support fault management for the dip
structure.
ddifmcapable() This function returns the capability bit
mask currently set for the dip struc-
ture.
CONTEXT
These functions can be called from kernel context in a
driver attach(9E) or detach(9E) operation.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 14 May 2007 2
Kernel Functions for Drivers ddifminit(9F)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
SEE ALSO
prtconf(1M), driver.conf(4), attributes(5), attach(9E),
detach(9E)
Writing Device Drivers
SunOS 5.11 Last change: 14 May 2007 3
|