xref: /titanic_52/usr/src/uts/sun/sys/dada/dada_ctl.h (revision 911106dfb16696472af8c1b7b4c554a829354fa8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1996, by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_SYS_DADA_DADA_CTL_H
28 #define	_SYS_DADA_DADA_CTL_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/dada/dada_types.h>
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * DCD control information
40  *
41  * Defines for stating level of reset
42  */
43 
44 #define	RESET_ALL	0	/* Reset all the target on the bus. */
45 #define	RESET_TARGET	1	/* Reset a specific target */
46 
47 /*
48  * Defines for reset_notify flag, to regsiter or cancel
49  * the notification of external and internal bus resets
50  */
51 
52 #define	DCD_RESET_NOTIFY	0x01	/* register the reset notification */
53 #define	DCD_RESET_CANCEL	0x02	/* Cancel the reset notification */
54 
55 
56 /*
57  * Define for the dcd_get_addr/ dcd_get_name first argument.
58  */
59 #define	DCD_GET_INITIATOR_ID	((struct dcd_device *)NULL)
60 				/* return initiator-id */
61 
62 /*
63  * Define for dcd_get_name string length.
64  * This is needed ebcause MAXNAMELEN is not part of DDI.
65  */
66 
67 #define	DCD_MAXNAMELEN		MAXNAMELEN
68 
69 #ifdef _KERNEL
70 
71 /*
72  * kernel function decalarations
73  */
74 
75 /*
76  * Abort and reset functions
77  */
78 
79 #ifdef	__STDC__
80 extern	int dcd_abort(struct dcd_address *ap, struct dcd_pkt *pkt);
81 extern  int dcd_reset(struct dcd_address *ap, int level);
82 #else /* __STDC__ */
83 extern 	int dcd_abort(), dcd_reset();
84 #endif
85 
86 /*
87  * Other functions
88  */
89 
90 #ifdef	__STDC__
91 extern int	dcd_get_bus_addr(struct dcd_device *devp, char *name, int len);
92 extern int	dcd_get_name(struct dcd_device *devp, char *name, int len);
93 #else	/* __STDC__ */
94 extern int 	dcd_get_bus_addr();
95 extern int	dcd_get_name();
96 #endif	/* __STDC__ */
97 
98 #endif	/* _KERNEL */
99 
100 #ifdef	__cplusplus
101 }
102 #endif
103 
104 #endif	/* _SYS_DADA_DADA_CTL_H */
105