Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
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.
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.
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]
#include <sys/ddifm.h> void ddi_fm_init(dev_info_t *dip, int *fm_capability, ddi_iblock_cookie_t *ibcp);
void ddi_fm_fini(dev_info_t *dip);
int ddi_fm_capable(dev_info_t *dip);
Pointer to the dev_info structure
Fault Management capability bit mask
Pointer to where the interrupt block cookie should be returned.
The driver does not support any FMA features. This is the default value assigned to device drivers.
The driver generates FMA protocol error events (ereports) upon the detection of an error condition.
The driver checks for errors upon the completion of one or more access I/O transactions.
The driver checks for errors upon the completion of one or more DMA I/O transactions.
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 ddi_fm_init(), 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(8).
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(5) file to the values described above. The fm_capable properties must be set and read prior to calling ddi_fm_init() with the desired capability list. ddi_fm_fini()
This function cleans up resources allocated to support fault management for the dip structure.
This function returns the capability bit mask currently set for the dip structure.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
Writing Device Drivers