xref: /illumos-gate/usr/src/uts/common/sys/dktp/fctypes.h (revision 2d6eb4a5)
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) 1992 Sun Microsystems, Inc.  All Rights Reserved.
24  */
25 
26 #ifndef _SYS_DKTP_FCTYPES_H
27 #define	_SYS_DKTP_FCTYPES_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #define	DMULT_MAXCNT	2
34 #define	DUPLX_MAXCNT	2
35 
36 #define	ds_kstat	ds_cmn.dsc_kstat
37 #define	ds_mutex	ds_cmn.dsc_mutex
38 #define	ds_tgcomobjp	ds_cmn.dsc_tgcomobjp
39 
40 struct  fc_data_cmn {
41 	kstat_t		*dsc_kstat;
42 	kmutex_t	dsc_mutex;
43 	opaque_t	dsc_tgcomobjp;
44 };
45 
46 struct	fc_data {
47 	struct fc_data_cmn ds_cmn;
48 
49 	short		ds_flag;
50 	short		ds_outcnt;
51 	struct diskhd	ds_tab;
52 	opaque_t	ds_queobjp;
53 };
54 
55 #define	ds_actf 	ds_tab.b_actf
56 #define	ds_actl 	ds_tab.b_actl
57 #define	ds_waitcnt	ds_tab.b_bcount
58 #define	ds_bp 		ds_actf
59 
60 struct  fc_que  {
61 	struct fc_que   *next;
62 	opaque_t	fc_qobjp;
63 	struct buf	*fc_bp;
64 	short		fc_outcnt;
65 	short		fc_maxcnt;
66 };
67 
68 struct	duplx_data {
69 	struct fc_data_cmn ds_cmn;
70 
71 	struct fc_que   ds_readq;
72 	struct fc_que   ds_writeq;
73 };
74 
75 #ifdef	__cplusplus
76 }
77 #endif
78 
79 #endif	/* _SYS_DKTP_FCTYPES_H */
80