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]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
31 * Definitions which deal with things other than registers.
34 #pragma ident "%Z%%M% %I% %E% SMI"
40 #include <sys/sunddi.h>
45 #define NAMEINST(dip) ddi_driver_name(dip), ddi_get_instance(dip)
47 /* Used for data structure retrieval during kstat update. */
48 typedef struct n2piu_ksinfo
{
50 struct n2piupc
*n2piupc_p
;
54 /* State structure. */
55 typedef struct n2piupc
{
56 dev_info_t
*n2piupc_dip
;
57 cntr_handle_t n2piupc_handle
;
58 void * n2piupc_biterr_p
;
59 n2piu_ksinfo_t
*n2piupc_ksinfo_p
[NUM_GRPS
];
62 /* Debugging facility. */
64 extern int n2piupc_debug
;
65 #define N2PIUPC_DBG1 if (n2piupc_debug >= 1) printf
66 #define N2PIUPC_DBG2 if (n2piupc_debug >= 2) printf
68 #define N2PIUPC_DBG1 0 &&
69 #define N2PIUPC_DBG2 0 &&
73 /* Function definitions exported among different modules. */
74 extern int n2piupc_kstat_init();
75 extern void n2piupc_kstat_fini();
76 extern int n2piupc_kstat_attach(n2piupc_t
*n2piupc_p
);
77 extern void n2piupc_kstat_detach(n2piupc_t
*n2piupc_p
);
83 #endif /* _N2PIUPC_H */