Print this page
NEX-5717 import QLogic 16G FC drivers
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_debug.h
+++ new/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_debug.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 2009 QLogic Corporation */
22 +/* Copyright 2015 QLogic Corporation */
23 23
24 24 /*
25 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 - * Use is subject to license terms.
25 + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
27 26 */
28 27
29 28 #ifndef _QL_DEBUG_H
30 29 #define _QL_DEBUG_H
31 30
32 31 /*
33 32 * ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
34 33 *
35 34 * ***********************************************************************
36 35 * * **
37 36 * * NOTICE **
38 - * * COPYRIGHT (C) 1996-2009 QLOGIC CORPORATION **
37 + * * COPYRIGHT (C) 1996-2015 QLOGIC CORPORATION **
39 38 * * ALL RIGHTS RESERVED **
40 39 * * **
41 40 * ***********************************************************************
42 41 *
43 42 */
44 43
45 44 #ifdef __cplusplus
46 45 extern "C" {
47 46 #endif
48 47
49 48 /*
50 49 * Driver debug definitions in makefile.
51 50 *
52 51 * QL_DEBUG_LEVEL_1=0x1
53 52 * QL_DEBUG_LEVEL_2=0x2 Output error msgs.
54 53 * QL_DEBUG_LEVEL_3=0x4 Output function trace msgs.
55 54 * QL_DEBUG_LEVEL_4=0x8 Output NVRAM trace msgs.
56 55 * QL_DEBUG_LEVEL_5=0x10 Output ring trace msgs.
57 56 * QL_DEBUG_LEVEL_6=0x20 Output WATCHDOG timer trace.
58 57 * QL_DEBUG_LEVEL_7=0x40
59 58 * QL_DEBUG_LEVEL_8=0x80 Output ring staturation msgs.
60 59 * QL_DEBUG_LEVEL_9=0x100 Output IOCTL trace.
|
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
61 60 * QL_DEBUG_LEVEL_10=0x200
62 61 * QL_DEBUG_LEVEL_11=0x400
63 62 * QL_DEBUG_LEVEL_12=0x1000
64 63 * QL_DEBUG_LEVEL_13=0x2000
65 64 * QL_DEBUG_LEVEL_14=0x4000
66 65 * QL_DEBUG_LEVEL_15=0x8000
67 66 */
68 67
69 68 void ql_dump_buffer(uint8_t *, uint8_t, uint32_t);
70 69 void ql_el_msg(ql_adapter_state_t *, const char *, int, ...);
71 -void ql_dbg_msg(const char *, int, ...);
70 +void ql_dbg_msg(ql_adapter_state_t *, const char *, int, ...);
72 71 int ql_flash_errlog(ql_adapter_state_t *, uint16_t, uint16_t, uint16_t,
73 72 uint16_t);
74 73 void ql_dump_el_trace_buffer(ql_adapter_state_t *);
75 74
76 75 #if (QL_DEBUG & 0xffff)
77 76 #define QL_DEBUG_ROUTINES
78 77 #define QL_BANG
79 78 #define QL_QUESTION
80 79 #define QL_CAROT
81 80 #else
82 81 #define QL_BANG "!"
|
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
83 82 #define QL_QUESTION "?"
84 83 #define QL_CAROT "^"
85 84 #endif
86 85
87 86 /*
88 87 * Macros.
89 88 */
90 89 #define GLOBAL_EL_LOCK() mutex_enter(&ql_global_el_mutex)
91 90 #define GLOBAL_EL_UNLOCK() mutex_exit(&ql_global_el_mutex)
92 91
93 -#define TRACE_BUFFER_LOCK(ha) mutex_enter(&ha->el_trace_desc->mutex)
94 -#define TRACE_BUFFER_UNLOCK(ha) mutex_exit(&ha->el_trace_desc->mutex)
92 +#define TRACE_BUFFER_LOCK(ha) mutex_enter(&ha->ql_trace_desc->mutex)
93 +#define TRACE_BUFFER_UNLOCK(ha) mutex_exit(&ha->ql_trace_desc->mutex)
95 94
96 -#define EL(ha, ...) ql_el_msg(ha, __func__, CE_CONT, __VA_ARGS__);
95 +#define EL(ha, ...) ql_el_msg(ha, __func__, CE_CONT, __VA_ARGS__);
97 96
98 97 #define ER(s) cmn_err(CE_CONT, QL_BANG "%s", s);
99 98 #define ERV(s, ...) cmn_err(CE_CONT, QL_BANG s, __VA_ARGS__);
100 99
101 100 #define EL_BUFFER_RESERVE 256
102 101 #define DEBUG_STK_DEPTH 24
103 102
104 103 #if QL_DEBUG & 1
105 104 #define QL_DEBUG_LEVEL_1
106 -#define QL_PRINT_1(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
105 +#define QL_PRINT_1(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
107 106 #define QL_DUMP_1(bp, wdsize, count) \
108 107 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
109 108 #else
110 109 #define QL_PRINT_1(...)
111 110 #define QL_DUMP_1(bp, wdsize, count)
112 111 #endif
113 112
114 113 #ifdef QL_DEBUG_ROUTINES
115 114 #define QL_DEBUG_LEVEL_2
116 -#define QL_PRINT_2(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
115 +#define QL_PRINT_2(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
117 116 #define QL_DUMP_2(bp, wdsize, count) \
118 117 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
119 118 #else
120 119 #define QL_PRINT_2(...)
121 120 #define QL_DUMP_2(bp, wdsize, count)
122 121 #endif
123 122
124 123 #if QL_DEBUG & 4
125 124 #define QL_DEBUG_LEVEL_3
126 -#define QL_PRINT_3(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
125 +#define QL_PRINT_3(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
127 126 #define QL_DUMP_3(bp, wdsize, count) \
128 127 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
129 128 #else
130 129 #define QL_PRINT_3(...)
131 130 #define QL_DUMP_3(bp, wdsize, count)
132 131 #endif
133 132
134 133 #if QL_DEBUG & 8
135 134 #define QL_DEBUG_LEVEL_4
136 -#define QL_PRINT_4(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
135 +#define QL_PRINT_4(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
137 136 #define QL_DUMP_4(bp, wdsize, count) \
138 137 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
139 138 #else
140 139 #define QL_PRINT_4(...)
141 140 #define QL_DUMP_4(bp, wdsize, count)
142 141 #endif
143 142
144 143 #if QL_DEBUG & 0x10
145 144 #define QL_DEBUG_LEVEL_5
146 -#define QL_PRINT_5(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
145 +#define QL_PRINT_5(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
147 146 #define QL_DUMP_5(bp, wdsize, count) \
148 147 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
149 148 #else
150 149 #define QL_PRINT_5(...)
151 150 #define QL_DUMP_5(bp, wdsize, count)
152 151 #endif
153 152
154 153 #if QL_DEBUG & 0x20
155 154 #define QL_DEBUG_LEVEL_6
156 -#define QL_PRINT_6(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
155 +#define QL_PRINT_6(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
157 156 #define QL_DUMP_6(bp, wdsize, count) \
158 157 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
159 158 #else
160 159 #define QL_PRINT_6(...)
161 160 #define QL_DUMP_6(bp, wdsize, count)
162 161 #endif
163 162
164 163 #if QL_DEBUG & 0x40
165 164 #define QL_DEBUG_LEVEL_7
166 -#define QL_PRINT_7(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
165 +#define QL_PRINT_7(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
167 166 #define QL_DUMP_7(bp, wdsize, count) \
168 167 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
169 168 #else
170 169 #define QL_PRINT_7(...)
171 170 #define QL_DUMP_7(bp, wdsize, count)
172 171 #endif
173 172
174 173 #if QL_DEBUG & 0x80
175 174 #define QL_DEBUG_LEVEL_8
176 -#define QL_PRINT_8(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
175 +#define QL_PRINT_8(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
177 176 #define QL_DUMP_8(bp, wdsize, count) \
178 177 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
179 178 #else
180 179 #define QL_PRINT_8(...)
181 180 #define QL_DUMP_8(bp, wdsize, count)
182 181 #endif
183 182
184 183 #if QL_DEBUG & 0x104
185 -#define QL_PRINT_9(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
184 +#define QL_PRINT_9(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
186 185 #define QL_DUMP_9(bp, wdsize, count) \
187 186 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
188 187 #else
189 188 #define QL_PRINT_9(...)
190 189 #define QL_DUMP_9(bp, wdsize, count)
191 190 #endif
192 191
193 192 #if QL_DEBUG & 0x200
194 193 #define QL_DEBUG_LEVEL_10
195 -#define QL_PRINT_10(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
194 +#define QL_PRINT_10(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
196 195 #define QL_DUMP_10(bp, wdsize, count) \
197 196 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
198 197 #else
199 198 #define QL_PRINT_10(...)
200 199 #define QL_DUMP_10(bp, wdsize, count)
201 200 #endif
202 201
203 202 #if QL_DEBUG & 0x400
204 203 #define QL_DEBUG_LEVEL_11
205 -#define QL_PRINT_11(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
204 +#define QL_PRINT_11(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
206 205 #define QL_DUMP_11(bp, wdsize, count) \
207 206 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
208 207 #else
209 208 #define QL_PRINT_11(...)
210 209 #define QL_DUMP_11(bp, wdsize, count)
211 210 #endif
212 211
213 212 #if QL_DEBUG & 0x800
214 213 #define QL_DEBUG_LEVEL_12
215 -#define QL_PRINT_12(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
214 +#define QL_PRINT_12(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
216 215 #define QL_DUMP_12(bp, wdsize, count) \
217 216 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
218 217 #else
219 218 #define QL_PRINT_12(...)
220 219 #define QL_DUMP_12(bp, wdsize, count)
221 220 #endif
222 221
223 222 #if QL_DEBUG & 0x1000
224 223 #define QL_DEBUG_LEVEL_13
225 -#define QL_PRINT_13(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
224 +#define QL_PRINT_13(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
226 225 #define QL_DUMP_13(bp, wdsize, count) \
227 226 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
228 227 #else
229 228 #define QL_PRINT_13(...)
230 229 #define QL_DUMP_13(bp, wdsize, count)
231 230 #endif
232 231
233 232 #if QL_DEBUG & 0x2000
234 233 #define QL_DEBUG_LEVEL_14
235 -#define QL_PRINT_14(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
234 +#define QL_PRINT_14(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
236 235 #define QL_DUMP_14(bp, wdsize, count) \
237 236 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
238 237 #else
239 238 #define QL_PRINT_14(...)
240 239 #define QL_DUMP_14(bp, wdsize, count)
241 240 #endif
242 241
243 242 #if QL_DEBUG & 0x4000
244 243 #define QL_DEBUG_LEVEL_15
245 -#define QL_PRINT_15(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
244 +#define QL_PRINT_15(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
246 245 #define QL_DUMP_15(bp, wdsize, count) \
247 246 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
248 247 #else
249 248 #define QL_PRINT_15(...)
250 249 #define QL_DUMP_15(bp, wdsize, count)
251 250 #endif
252 251
253 252 #if QL_DEBUG & 0x8000
254 253 #define QL_DEBUG_LEVEL_16
255 -#define QL_PRINT_16(ce, ...) ql_dbg_msg(__func__, ce, __VA_ARGS__)
254 +#define QL_PRINT_16(ha, ...) ql_dbg_msg(ha, __func__, CE_CONT, __VA_ARGS__)
256 255 #define QL_DUMP_16(bp, wdsize, count) \
257 256 ql_dump_buffer((uint8_t *)bp, (uint8_t)wdsize, (uint32_t)count)
258 257 #else
259 258 #define QL_PRINT_16(...)
260 259 #define QL_DUMP_16(bp, wdsize, count)
261 260 #endif
262 261
263 262 #ifdef __cplusplus
264 263 }
265 264 #endif
266 265
267 266 #endif /* _QL_DEBUG_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX