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