uts: make emu10k non-verbose
[unleashed.git] / include / sys / ndifm.h
blob962fee08c93fae1e6a501e18528cd757c9414edb
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_NDIFM_H
28 #define _SYS_NDIFM_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #include <sys/ddifm.h>
35 #include <sys/ddifm_impl.h>
37 /* FM handle cache support */
38 #define DMA_HANDLE 0
39 #define ACC_HANDLE 1
40 #define DEFAULT_DMACACHE_SZ 100
41 #define DEFAULT_ACCCACHE_SZ 10
43 extern int default_dmacache_sz;
44 extern int default_acccache_sz;
46 /* Forward declarations for FM NDI */
48 typedef struct i_ddi_fmc ndi_fmc_t;
49 typedef struct i_ddi_fmc_entry ndi_fmcentry_t;
51 /* Per-handle NDI error status */
52 typedef struct i_ndi_err {
53 uint64_t err_ena; /* ENA for this error */
54 int err_status; /* error status */
55 int err_expected; /* was this error expected? */
56 void *err_ontrap; /* ontrap protection, if any */
57 struct i_ddi_fmc_entry *err_fep; /* FM cache link */
58 int (*err_cf)(); /* compare function */
59 } ndi_err_t;
61 #ifdef _KERNEL
63 extern void ndi_fmc_insert(dev_info_t *, int, void *, void *);
64 extern void ndi_fmc_remove(dev_info_t *, int, const void *);
65 extern int ndi_fmc_error(dev_info_t *, dev_info_t *, int, uint64_t,
66 const void *);
67 extern int ndi_fmc_entry_error(dev_info_t *, int, ddi_fm_error_t *,
68 const void *);
69 extern int ndi_fmc_entry_error_all(dev_info_t *, int, ddi_fm_error_t *);
71 extern int ndi_fm_handler_dispatch(dev_info_t *, dev_info_t *,
72 const ddi_fm_error_t *);
73 extern int i_ddi_fm_handler_dispatch(dev_info_t *, const ddi_fm_error_t *);
75 extern void ndi_fm_acc_err_set(ddi_acc_handle_t, ddi_fm_error_t *);
76 extern void ndi_fm_dma_err_set(ddi_dma_handle_t, ddi_fm_error_t *);
78 #endif /* _KERNEL */
80 #ifdef __cplusplus
82 #endif
84 #endif /* _SYS_NDIFM_H */