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]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_BOFI_IMPL_H
27 #define _SYS_BOFI_IMPL_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
36 struct bofi_errent
*next
; /* next on in-use chain */
37 struct bofi_errent
*cnext
; /* next on clone chain */
38 struct bofi_errent
*cprev
; /* prev on clone chain */
39 struct bofi_errdef errdef
;
40 struct bofi_errstate errstate
;
42 struct acc_log_elem
*logbase
;
45 ddi_softintr_t softintr_id
;
51 #define BOFI_DEV_ACTIVE 1
52 #define BOFI_NEW_MESSAGE 2
53 #define BOFI_MESSAGE_WAIT 4
56 #define BOFI_NLINKS 8192
59 struct bofi_link
*link
; /* next on shadow handle chain */
60 struct bofi_errent
*errentp
; /* pointer to corresponding errent */
67 uint_t (*int_handler
)(caddr_t
, caddr_t
);
68 caddr_t int_handler_arg1
;
69 caddr_t int_handler_arg2
;
72 struct bofi_shadow
*next
; /* next on inuse chain */
73 struct bofi_shadow
*prev
; /* prev on inuse chain */
74 struct bofi_shadow
*hnext
; /* next on hhash chain */
75 struct bofi_shadow
*hprev
; /* prev on hhash chain */
76 struct bofi_shadow
*dnext
; /* next on dhash chain */
77 struct bofi_shadow
*dprev
; /* prev on dhash chain */
78 struct bofi_link
*link
; /* errdef chain */
81 ddi_dma_handle_t dma_handle
;
82 ddi_acc_handle_t acc_handle
;
86 char name
[NAMESIZE
]; /* as returned by ddi_get_name() */
87 int instance
; /* as returned by ddi_get_instance() */
99 struct bofi_shadow
**hparrayp
;
101 ddi_umem_cookie_t umem_cookie
;
107 #define BOFI_ACC_HDL 1
108 #define BOFI_DMA_HDL 2
109 #define BOFI_INT_HDL 3
116 #endif /* _SYS_BOFI_IMPL_H */