6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / uts / common / sys / fibre-channel / fca / emlxs / emlxs_config.h
blobd2e7fe3c81747120330b8c747b5728a6969d967c
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2009 Emulex. All rights reserved.
24 * Use is subject to License terms.
28 #ifndef _EMLXS_CONFIG_H
29 #define _EMLXS_CONFIG_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 #define EMLXS_CFG_STR_SIZE 32
36 #define EMLXS_CFG_HELP_SIZE 80
38 typedef struct emlxs_config
40 char string[EMLXS_CFG_STR_SIZE];
41 uint32_t low;
42 uint32_t hi;
43 uint32_t def;
44 uint32_t current;
45 uint32_t flags;
46 char help[EMLXS_CFG_HELP_SIZE];
47 } emlxs_config_t;
50 typedef enum emlxs_cfg_parm
52 CFG_CONSOLE_NOTICES, /* console-notices */
53 CFG_CONSOLE_WARNINGS, /* console-warnings */
54 CFG_CONSOLE_ERRORS, /* console-errors */
55 CFG_CONSOLE_DEBUGS, /* console-debugs (hidden) */
56 CFG_CONSOLE_EVENTS, /* console-events (hidden) */
57 CFG_LOG_NOTICES, /* log-notices */
58 CFG_LOG_WARNINGS, /* log-warnings */
59 CFG_LOG_ERRORS, /* log-errors */
60 CFG_LOG_DEBUGS, /* log-debugs (hidden) */
61 CFG_LOG_EVENTS, /* log-events (hidden) */
62 CFG_NUM_IOCBS, /* num-iocbs */
63 CFG_MAX_XFER_SIZE, /* max-xfer-size */
64 CFG_UB_BUFS, /* ub-bufs */
65 CFG_NETWORK_ON, /* network-on */
66 CFG_ACK0, /* ack0 */
67 CFG_TOPOLOGY, /* topology */
68 CFG_LINK_SPEED, /* link-speed */
69 CFG_NUM_NODES, /* num-nodes */
70 CFG_CR_DELAY, /* cr-delay */
71 CFG_CR_COUNT, /* cr-count */
72 CFG_ASSIGN_ALPA, /* assign-alpa */
73 CFG_ADISC_SUPPORT, /* adisc-support */
74 CFG_PM_SUPPORT, /* pm-support */
75 CFG_PM_IDLE, /* pm-idle */
76 CFG_FW_CHECK, /* fw-check (hidden) */
77 CFG_TRI_REQUIRED, /* tri-required (hidden) */
78 CFG_DISC_TIMEOUT, /* discovery-timeout (hidden) */
79 CFG_LINKUP_TIMEOUT, /* linkup-timeout (hidden) */
80 CFG_LINKUP_DELAY, /* linkup-delay */
81 CFG_OFFLINE_TIMEOUT, /* offline-timeout (hidden) */
82 CFG_LILP_ENABLE, /* enable-lilp (hidden) */
83 CFG_PCI_MAX_READ, /* pci-max-read */
84 CFG_HEARTBEAT_ENABLE, /* heartbeat-enable (hidden) */
85 CFG_RESET_ENABLE, /* reset-enable (hidden) */
86 CFG_TIMEOUT_ENABLE, /* timeout-enable (hidden) */
87 CFG_NUM_IOTAGS, /* num-iotags (hidden) */
89 #ifdef FMA_SUPPORT
90 CFG_FM_CAPS, /* fm-cap, fma capabilities (hidden) */
91 #endif /* FMA_SUPPORT */
93 #ifdef MAX_RRDY_PATCH
94 CFG_MAX_RRDY, /* max-rrdy (hidden) */
95 #endif /* MAX_RRDY_PATCH */
97 #ifdef MSI_SUPPORT
98 CFG_MSI_MODE, /* msi-mode (hidden) */
99 #endif /* MSI_SUPPORT */
101 #ifdef SLI3_SUPPORT
102 CFG_SLI_MODE, /* sli-mode (hidden) */
103 #ifdef NPIV_SUPPORT
104 CFG_NPIV_ENABLE, /* enable-npiv */
105 CFG_VPORT_RESTRICTED, /* vport-restrict-login */
106 CFG_NPIV_DELAY, /* enable-npiv-delay */
107 #endif /* NPIV_SUPPORT */
108 #endif /* SLI3_SUPPORT */
110 #ifdef DHCHAP_SUPPORT
111 CFG_AUTH_ENABLE, /* enable-auth */
112 CFG_AUTH_E2E, /* auth-e2e */
113 CFG_AUTH_NPIV, /* auth-npiv (hidden) */
114 CFG_AUTH_TMO, /* auth-tmo (hidden) */
115 CFG_AUTH_MODE, /* auth-mode (hidden) */
116 CFG_AUTH_BIDIR, /* auth-bidir (hidden) */
117 CFG_AUTH_TYPE, /* auth-type (hidden) */
118 CFG_AUTH_HASH, /* auth-hash (hidden) */
119 CFG_AUTH_GROUP, /* auth-group (hidden) */
120 CFG_AUTH_INTERVAL, /* auth-interval (hidden) */
121 #endif /* DHCHAP_SUPPORT */
123 #ifdef SFCT_SUPPORT
124 CFG_TARGET_MODE, /* target-mode */
125 #endif /* SFCT_SUPPORT */
127 NUM_CFG_PARAM
129 } emlxs_cfg_parm_t;
131 #define PARM_HIDDEN 0x80000000
135 #ifdef DEF_ICFG
138 * The entries in this array must be in the exact order
139 * defined in emlxs_cfg_parm_t
141 emlxs_config_t emlxs_cfg[] = {
142 /* CFG_CONSOLE_NOTICES */
143 {"console-notices",
144 0, 0xffffffff, 0, 0,
145 PARM_DYNAMIC | PARM_HEX,
146 "Verbose mask for notice messages to the console."},
148 /* CFG_CONSOLE_WARNINGS */
149 {"console-warnings",
150 0, 0xffffffff, 0, 0,
151 PARM_DYNAMIC | PARM_HEX,
152 "Verbose mask for warning messages to the console."},
154 /* CFG_CONSOLE_ERRORS */
155 {"console-errors",
156 0, 0xffffffff, 0, 0,
157 PARM_DYNAMIC | PARM_HEX,
158 "Verbose mask for error messages to the console."},
160 /* CFG_CONSOLE_DEBUGS */
161 {"console-debugs",
162 0, 0xffffffff, 0, 0,
163 PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
164 "Verbose mask for debugging messages to the console."},
166 /* CFG_CONSOLE_EVENTS */
167 {"console-events",
168 0, 0xffffffff, 0, 0,
169 PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
170 "Verbose mask for event messages to the console."},
172 /* CFG_LOG_NOTICES */
173 {"log-notices",
174 0, 0xffffffff, 0xffffffff, 0,
175 PARM_DYNAMIC | PARM_HEX,
176 "Verbose mask for notice messages to the messages file."},
178 /* CFG_LOG_WARNINGS */
179 {"log-warnings",
180 0, 0xffffffff, 0xffffffff, 0,
181 PARM_DYNAMIC | PARM_HEX,
182 "Verbose mask for warning messages to the messages file."},
184 /* CFG_LOG_ERRORS */
185 {"log-errors",
186 0, 0xffffffff, 0xffffffff, 0,
187 PARM_DYNAMIC | PARM_HEX,
188 "Verbose mask for error messages to the messages file."},
190 /* CFG_LOG_DEBUGS */
191 {"log-debugs",
192 0, 0xffffffff, 0, 0,
193 PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
194 "Verbose mask for debugging messages to the messages file."},
196 /* CFG_LOG_EVENTS */
197 {"log-events",
198 0, 0xffffffff, 0, 0,
199 PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
200 "Verbose mask for event messages to the messages file."},
202 /* CFG_NUM_IOCBS */
203 {"num-iocbs",
204 128, 10240, 1024, 0,
205 PARM_DYNAMIC_RESET,
206 "Number of IOCB buffers the driver should allocate."},
208 /* CFG_MAX_XFER_SIZE */
209 {"max-xfer-size",
210 131072, 1388544, 339968, 0,
212 "Sets maximum bytes per IO the driver can transfer."},
214 /* CFG_UB_BUFS */
215 {"ub-bufs",
216 40, 16320, 1000, 0,
218 "Number of unsolicited buffers the driver should allocate."},
220 /* IP specific parameters */
222 /* CFG_NETWORK_ON */
223 {"network-on",
224 0, 1, 1, 0,
225 PARM_BOOLEAN,
226 "Enable IP processing. [0=Disabled, 1=Enabled]"},
228 /* Fibre Channel specific parameters */
230 /* CFG_ACK0 */
231 {"ack0",
232 0, 1, 0, 0,
233 PARM_DYNAMIC_LINK | PARM_BOOLEAN,
234 "Enables ACK0 support. [0=Disabled, 1=Enabled]"},
236 /* CFG_TOPOLOGY */
237 {"topology",
238 0, 6, 0, 0,
239 PARM_DYNAMIC_LINK,
240 "Select Fibre Channel topology. "
241 "[0=Loop->PTP, 2=PTP, 4=Loop, 6=PTP->Loop]"},
243 /* CFG_LINK_SPEED */
244 {"link-speed",
245 0, 8, 0, 0,
246 PARM_DYNAMIC_LINK,
247 "Select link speed. [0=Auto, 1=1Gb, 2=2Gb, 4=4Gb, 8=8Gb]"},
249 /* CFG_NUM_NODES */
250 {"num-nodes",
251 0, 4096, 0, 0,
252 PARM_DYNAMIC_RESET,
253 "Number of fibre channel nodes (NPorts) the driver will support. "
254 "[0=no_limit]"},
256 /* CFG_CR_DELAY */
257 {"cr-delay",
258 0, 63, 0, 0,
259 PARM_DYNAMIC_LINK,
260 "A count of milliseconds after which "
261 "an interrupt response is generated"},
263 /* CFG_CR_COUNT */
264 {"cr-count",
265 1, 255, 1, 0,
266 PARM_DYNAMIC_LINK,
267 "A count of I/O completions after "
268 "which an interrupt response is generated"},
270 /* CFG_ASSIGN_ALPA */
271 {"assign-alpa",
272 0, 0xef, 0, 0,
273 PARM_DYNAMIC_LINK | PARM_HEX,
274 "Assigns a preferred ALPA to the port. Only used in Loop topology."},
276 /* CFG_ADISC_SUPPORT */
277 {"adisc-support",
278 0, 2, 1, 0,
279 PARM_DYNAMIC,
280 "Sets the Fibre Channel ADISC login support level. "
281 "[0=None, 1=Partial, 2=Full]"},
283 /* CFG_PM_SUPPORT */
284 {"pm-support",
285 0, 1, 0, 0,
286 PARM_BOOLEAN,
287 "Enables power management support. [0=Disabled, 1=Enabled]"},
289 /* CFG_PM_IDLE */
290 {"pm-idle",
291 0, 3600, 300, 0,
292 PARM_DYNAMIC | PARM_HIDDEN,
293 "Sets power management idle timeout value (seconds)."},
295 /* CFG_FW_CHECK */
296 {"fw-check",
297 0, 2, 1, 0,
298 PARM_DYNAMIC_RESET | PARM_BOOLEAN | PARM_HIDDEN,
299 "Enables firmware revision checking of adapters. "
300 "[0=Off 1=Sun-only 2=All]"},
302 /* CFG_TRI_REQUIRED */
303 {"tri-required",
304 0, 1, 0, 0,
305 PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
306 "Requires Task Retry Id support by a remote device "
307 "for FCP-2 error recovery."},
309 /* CFG_DISC_TIMEOUT */
310 {"discovery-timeout",
311 0, 600, 25, 0,
312 PARM_DYNAMIC | PARM_HIDDEN,
313 "Sets the discovery timeout period (seconds) "
314 "for managing FCP-2 devices."},
316 /* CFG_LINKUP_TIMEOUT */
317 {"linkup-timeout",
318 0, 10, 2, 0,
319 PARM_DYNAMIC | PARM_HIDDEN,
320 "Sets the linkup timeout period (seconds)."},
322 /* CFG_LINKUP_DELAY */
323 {"linkup-delay",
324 0, 60, 10, 0,
325 PARM_DYNAMIC_RESET,
326 "Sets the driver wait period (seconds) "
327 "for a linkup after initialization."},
329 /* CFG_OFFLINE_TIMEOUT */
330 {"offline-timeout",
331 0, 600, 45, 0,
332 PARM_DYNAMIC | PARM_HIDDEN,
333 "Sets the offline timeout period (seconds)."},
335 /* CFG_LILP_ENABLE */
336 {"enable-lilp",
337 0, 1, 1, 0,
338 PARM_DYNAMIC_RESET | PARM_BOOLEAN | PARM_HIDDEN,
339 "Enables LIRP/LILP support in the driver. [0=Disabled, 1=Enabled]"},
341 /* CFG_PCI_MAX_READ */
342 {"pci-max-read",
343 512, 4096, 2048, 0,
344 PARM_DYNAMIC_RESET,
345 "Sets the PCI-X max memory read byte count. [512,1024,2048 or 4096]"},
347 /* CFG_HEARTBEAT_ENABLE */
348 {"heartbeat-enable",
349 0, 1, 1, 0,
350 PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
351 "Enables driver's mailbox heartbeat to the adapter. "
352 "[0=Disabled, 1=Enabled]"},
354 /* CFG_RESET_ENABLE */
355 {"reset-enable",
356 0, 1, 1, 0,
357 PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
358 "Enables driver's ability to reset the adapter. "
359 "[0=Disabled, 1=Enabled]"},
361 /* CFG_TIMEOUT_ENABLE */
362 {"timeout-enable",
363 0, 1, 1, 0,
364 PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
365 "Enables driver's ability to timeout commands. "
366 "[0=Disabled, 1=Enabled]"},
368 /* CFG_NUM_IOTAGS */
369 {"num-iotags",
370 512, 32768, 4096, 0,
371 PARM_DYNAMIC_RESET | PARM_HIDDEN,
372 "Sets maximum number of FCP IO's the driver can manage."},
374 #ifdef FMA_SUPPORT
375 /* CFG_FM_CAPS */
376 {"fm-cap",
377 0, 0xF, 0xF, 0,
378 PARM_HIDDEN,
379 "Sets FMA capabilities."},
380 #endif /* FMA_SUPPORT */
382 #ifdef MAX_RRDY_PATCH
383 /* CFG_MAX_RRDY */
384 {"max-rrdy",
385 0, 255, 2, 0,
386 PARM_DYNAMIC_RESET | PARM_HIDDEN,
387 "Sets maximum number RRDY's for the adapter on private loop."},
388 #endif /* MAX_RRDY_PATCH */
390 #ifdef MSI_SUPPORT
391 /* CFG_MSI_MODE */
392 {"msi-mode",
393 0, 3, 3, 0,
394 PARM_HIDDEN,
395 "Sets the default MSI mode in driver. "
396 "[0=Off 1=Single-MSI 2=Multi-MSI 3=Auto]"},
397 #endif /* MSI_SUPPORT */
399 #ifdef SLI3_SUPPORT
400 /* CFG_SLI_MODE */
401 {"sli-mode",
402 0, 3, 0, 0,
403 PARM_DYNAMIC_RESET | PARM_HIDDEN,
404 "Sets default SLI mode. "
405 "[0=Auto, 2=SLI2-remove all vports first, 3=SLI3]"},
407 #ifdef NPIV_SUPPORT
408 /* CFG_NPIV_ENABLE */
409 {"enable-npiv",
410 0, 1, 0, 0,
411 PARM_DYNAMIC_RESET | PARM_BOOLEAN,
412 "Enables NPIV. [0=Disabled-remove all vports first, "
413 "1=Enabled-requires SLI3]"},
415 /* CFG_VPORT_RESTRICTED */
416 {"vport-restrict-login",
417 0, 1, 1, 0,
418 PARM_DYNAMIC_LINK | PARM_BOOLEAN,
419 "Restricts login to virtual ports to conserve resources. "
420 "[0=Disabled, 1=Enabled]"},
422 /* CFG_NPIV_DELAY */
423 {"enable-npiv-delay",
424 0, 1, 1, 0,
425 PARM_DYNAMIC | PARM_HIDDEN,
426 "Enable FDISC/NS command delay from vports to switch. "
427 "[0=Disabled, 1=Enabled]"},
428 #endif /* NPIV_SUPPORT */
430 #endif /* SLI3_SUPPORT */
432 #ifdef DHCHAP_SUPPORT
433 /* CFG_AUTH_ENABLE */
434 {"enable-auth",
435 0, 1, 0, 0,
436 PARM_DYNAMIC_LINK | PARM_BOOLEAN,
437 "Enables DHCHAP support in the driver. [0=Disabled, 1=Enabled]"},
439 /* CFG_AUTH_E2E */
440 {"auth-e2e",
441 0, 1, 0, 0,
442 PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
443 "Enables end-to-end DHCHAP support in the driver. "
444 "[0=Disabled, 1=Enabled]"},
446 /* CFG_AUTH_NPIV */
447 {"auth-npiv",
448 0, 1, 0, 0,
449 PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
450 "Enables DHCHAP support for virtual ports. [0=Disabled, 1=Enabled]"},
452 /* CFG_AUTH_TMO */
453 {"auth-tmo",
454 20, 999, 45, 0,
455 PARM_DYNAMIC_LINK | PARM_HIDDEN,
456 "Sets authentication timeout value. (seconds)"},
458 /* CFG_AUTH_MODE */
459 {"auth-mode",
460 1, 3, 1, 0,
461 PARM_DYNAMIC_LINK | PARM_HIDDEN,
462 "Sets authentication mode. [1=Disabled, 2=Active, 3=Passive]"},
464 /* CFG_AUTH_BIDIR */
465 {"auth-bidir",
466 0, 1, 0, 0,
467 PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
468 "Sets authentication bidirectional mode. [0=Disabled, 1=Enabled]"},
470 /* CFG_AUTH_TYPE */
471 {"auth-type",
472 0, 0x1111, 0x1000, 0,
473 PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
474 "Sets authentication type priorities[4]. [0=Undef, 1=DHCHAP]"},
476 /* CFG_AUTH_HASH */
477 {"auth-hash",
478 0, 0x2222, 0x1200, 0,
479 PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
480 "Sets authentication hash priorities[4]. [0=Undef, 1=MD5, 2=SHA1]"},
482 /* CFG_AUTH_GROUP */
483 {"auth-group",
484 0, 0x55555555, 0x54321000, 0,
485 PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
486 "Sets auth group priorities[8]. "
487 "[0=Undef,1=NULL,2=1024,3=1280,4=1536,5=2048]"},
489 /* CFG_AUTH_INTERVAL */
490 {"auth-interval",
491 0, 3600, 300, 0,
492 PARM_DYNAMIC_LINK | PARM_HIDDEN,
493 "Sets re-authentication interval. (minutes)"},
495 #endif /* DHCHAP_SUPPORT */
497 #ifdef SFCT_SUPPORT
498 /* CFG_TARGET_MODE */
499 {"target-mode",
500 #ifdef SFCT_ENABLED
501 0, 1, 1, 0,
502 #else
503 0, 1, 0, 0,
504 #endif /* SFCT_ENABLED */
505 PARM_BOOLEAN,
506 "Enables target mode support in driver. [0=Disabled, 1=Enabled]"},
507 #endif /* SFCT_SUPPORT */
511 #endif /* DEF_ICFG */
513 #ifdef __cplusplus
515 #endif
517 #endif /* _EMLXS_CONFIG_H */