Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/fibre-channel/fc_types.h
+++ new/usr/src/uts/common/sys/fibre-channel/fc_types.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 + *
22 24 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 25 * Use is subject to license terms.
24 26 */
25 27
26 28 #ifndef _FC_TYPES_H
27 29 #define _FC_TYPES_H
28 30
29 31
30 32
31 33 /*
32 34 * Types for FC Transport subsystems.
33 35 *
34 36 * This file picks up specific as well as generic type
35 37 * defines, and also serves as a wrapper for many common
36 38 * includes.
37 39 */
38 40
39 41 #include <sys/types.h>
40 42 #include <sys/param.h>
41 43
42 44 #ifdef __cplusplus
43 45 extern "C" {
44 46 #endif
45 47
46 48 #if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
47 49 #error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
48 50 #endif /* _BIT_FIELDS_LTOH */
49 51
50 52 #ifdef _KERNEL
51 53 #include <sys/systm.h>
52 54 #include <sys/cmn_err.h>
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
53 55 #include <sys/debug.h>
54 56 #include <sys/devops.h>
55 57 #include <sys/callb.h>
56 58 #include <sys/disp.h>
57 59 #include <sys/taskq.h>
58 60 #endif /* _KERNEL */
59 61
60 62 #ifndef _SYS_SCSI_SCSI_TYPES_H
61 63
62 64
63 -#ifdef __STDC__
64 65 typedef void *opaque_t;
65 -#else /* __STDC__ */
66 -typedef char *opaque_t;
67 -#endif /* __STDC__ */
68 66
69 67 #endif /* _SYS_SCSI_SCSI_TYPES_H */
70 68
71 69 /* Sysevent defs */
72 70 #define EC_SUNFC "EC_sunfc"
73 71 #define ESC_SUNFC_PORT_ATTACH "ESC_sunfc_port_attach"
74 72 #define ESC_SUNFC_PORT_DETACH "ESC_sunfc_port_detach"
75 73 #define ESC_SUNFC_PORT_ONLINE "ESC_sunfc_port_online"
76 74 #define ESC_SUNFC_PORT_OFFLINE "ESC_sunfc_port_offline"
77 75 #define ESC_SUNFC_PORT_RSCN "ESC_sunfc_port_rscn"
78 76 #define ESC_SUNFC_TARGET_ADD "ESC_sunfc_target_add"
79 77 #define ESC_SUNFC_TARGET_REMOVE "ESC_sunfc_target_remove"
80 78 #define ESC_SUNFC_DEVICE_ONLINE "ESC_sunfc_device_online"
81 79 #define ESC_SUNFC_DEVICE_OFFLINE "ESC_sunfc_device_offline"
82 80
83 81 /* T11 FC-HBA state change tracking */
84 82 typedef uint64_t fc_hba_state_change_t;
85 83
86 84 typedef struct port_id {
87 85 #if defined(_BIT_FIELDS_LTOH)
88 86 uint32_t port_id : 24, /* Port Identifier */
89 87 priv_lilp_posit : 8; /* LILP map position */
90 88 #else
91 89 uint32_t priv_lilp_posit : 8, /* LILP map position */
92 90 port_id : 24; /* Port Identifier */
93 91 #endif /* _BIT_FIELDS_LTOH */
94 92 } fc_portid_t;
95 93
96 94 typedef struct hard_addr {
97 95 #if defined(_BIT_FIELDS_LTOH)
98 96 uint32_t hard_addr : 24, /* hard address */
99 97 rsvd : 8; /* reserved */
100 98 #else
101 99 uint32_t rsvd : 8,
102 100 hard_addr : 24; /* hard address */
103 101 #endif /* _BIT_FIELDS_LTOH */
104 102 } fc_hardaddr_t;
105 103
106 104 typedef struct port_type {
107 105 #if defined(_BIT_FIELDS_LTOH)
108 106 uint32_t rsvd : 24,
109 107 port_type : 8;
110 108 #else
111 109 uint32_t port_type : 8,
112 110 rsvd : 24;
113 111 #endif /* _BIT_FIELDS_LTOH */
114 112 } fc_porttype_t;
115 113
116 114 /*
117 115 * FCA post reset behavior
118 116 */
119 117 typedef enum fc_reset_action {
120 118 FC_RESET_RETURN_NONE, /* Can't return any */
121 119 FC_RESET_RETURN_ALL, /* Return all commands reached here */
122 120 FC_RESET_RETURN_OUTSTANDING /* Return ones that haven't gone out */
123 121 } fc_reset_action_t;
124 122
125 123 /*
126 124 * FCA DMA behavior on Unaligned buffers
127 125 */
128 126 typedef enum fc_dma_behavior {
129 127 FC_ALLOW_STREAMING, /* Streaming mode for all xfers */
130 128 FC_NO_STREAMING /* Disable Streaming on unaligned */
131 129 /* buffer or byte counts */
132 130 } fc_dma_behavior_t;
133 131
134 132
135 133 /*
136 134 * FCA FCP command and response allocation in DVMA space
137 135 */
138 136 typedef enum fc_fcp_dma {
139 137 FC_DVMA_SPACE, /* allocation should be in DVMA mem */
140 138 FC_NO_DVMA_SPACE /* allocation shouldn't be DVMA mem */
141 139 } fc_fcp_dma_t;
142 140
143 141
144 142 /*
145 143 * struct to track rscn info both within the transport layer
146 144 * and between the ULPs and transport.
147 145 */
148 146 typedef struct fc_ulp_rscn_info {
149 147 uint32_t ulp_rscn_count;
150 148 } fc_ulp_rscn_info_t;
151 149
152 150 /*
153 151 * Define a value for ulp_rscn_count to indicate that the contents
154 152 * of the fc_ulp_rscn_info_t struct are invalid. Note that some parts of the
155 153 * code assume that this value is zero, i.e., they use kmem_zalloc().
156 154 */
157 155 #define FC_INVALID_RSCN_COUNT ((uint32_t)0)
158 156
159 157 /*
160 158 * FC Transport exported header files to all Consumers
161 159 */
162 160
163 161 #ifdef _KERNEL
164 162 #include <sys/fibre-channel/impl/fcph.h>
165 163 #include <sys/fibre-channel/fc_appif.h>
166 164 #include <sys/fibre-channel/impl/fc_linkapp.h>
167 165 #include <sys/fibre-channel/impl/fcgs2.h>
168 166 #include <sys/fibre-channel/impl/fc_fla.h>
169 167 #include <sys/fibre-channel/impl/fcal.h>
170 168 #include <sys/fibre-channel/impl/fctl.h>
171 169 #include <sys/fibre-channel/impl/fc_error.h>
172 170 #include <sys/fibre-channel/fcio.h>
173 171 #include <sys/fibre-channel/ulp/fcp.h>
174 172 #include <sys/fibre-channel/ulp/fcp_util.h>
175 173
176 174 /*
177 175 * For drivers which do not include these - must be last
178 176 */
179 177 #include <sys/ddi.h>
180 178 #include <sys/sunddi.h>
181 179 #include <sys/stat.h>
182 180 #include <sys/sunndi.h>
183 181 #include <sys/devctl.h>
184 182 #endif /* _KERNEL */
185 183
186 184 #ifdef __cplusplus
187 185 }
188 186 #endif
189 187
190 188 #endif /* _FC_TYPES_H */
↓ open down ↓ |
113 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX