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]
23 * Copyright 2009 Emulex. All rights reserved.
24 * Use is subject to License terms.
28 #ifndef _EMLXS_CONFIG_H
29 #define _EMLXS_CONFIG_H
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
];
46 char help
[EMLXS_CFG_HELP_SIZE
];
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 */
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) */
90 CFG_FM_CAPS
, /* fm-cap, fma capabilities (hidden) */
91 #endif /* FMA_SUPPORT */
94 CFG_MAX_RRDY
, /* max-rrdy (hidden) */
95 #endif /* MAX_RRDY_PATCH */
98 CFG_MSI_MODE
, /* msi-mode (hidden) */
99 #endif /* MSI_SUPPORT */
102 CFG_SLI_MODE
, /* sli-mode (hidden) */
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 */
124 CFG_TARGET_MODE
, /* target-mode */
125 #endif /* SFCT_SUPPORT */
131 #define PARM_HIDDEN 0x80000000
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 */
145 PARM_DYNAMIC
| PARM_HEX
,
146 "Verbose mask for notice messages to the console."},
148 /* CFG_CONSOLE_WARNINGS */
151 PARM_DYNAMIC
| PARM_HEX
,
152 "Verbose mask for warning messages to the console."},
154 /* CFG_CONSOLE_ERRORS */
157 PARM_DYNAMIC
| PARM_HEX
,
158 "Verbose mask for error messages to the console."},
160 /* CFG_CONSOLE_DEBUGS */
163 PARM_DYNAMIC
| PARM_HEX
| PARM_HIDDEN
,
164 "Verbose mask for debugging messages to the console."},
166 /* CFG_CONSOLE_EVENTS */
169 PARM_DYNAMIC
| PARM_HEX
| PARM_HIDDEN
,
170 "Verbose mask for event messages to the console."},
172 /* CFG_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 */
180 0, 0xffffffff, 0xffffffff, 0,
181 PARM_DYNAMIC
| PARM_HEX
,
182 "Verbose mask for warning messages to the messages file."},
186 0, 0xffffffff, 0xffffffff, 0,
187 PARM_DYNAMIC
| PARM_HEX
,
188 "Verbose mask for error messages to the messages file."},
193 PARM_DYNAMIC
| PARM_HEX
| PARM_HIDDEN
,
194 "Verbose mask for debugging messages to the messages file."},
199 PARM_DYNAMIC
| PARM_HEX
| PARM_HIDDEN
,
200 "Verbose mask for event messages to the messages file."},
206 "Number of IOCB buffers the driver should allocate."},
208 /* CFG_MAX_XFER_SIZE */
210 131072, 1388544, 339968, 0,
212 "Sets maximum bytes per IO the driver can transfer."},
218 "Number of unsolicited buffers the driver should allocate."},
220 /* IP specific parameters */
226 "Enable IP processing. [0=Disabled, 1=Enabled]"},
228 /* Fibre Channel specific parameters */
233 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
,
234 "Enables ACK0 support. [0=Disabled, 1=Enabled]"},
240 "Select Fibre Channel topology. "
241 "[0=Loop->PTP, 2=PTP, 4=Loop, 6=PTP->Loop]"},
247 "Select link speed. [0=Auto, 1=1Gb, 2=2Gb, 4=4Gb, 8=8Gb]"},
253 "Number of fibre channel nodes (NPorts) the driver will support. "
260 "A count of milliseconds after which "
261 "an interrupt response is generated"},
267 "A count of I/O completions after "
268 "which an interrupt response is generated"},
270 /* CFG_ASSIGN_ALPA */
273 PARM_DYNAMIC_LINK
| PARM_HEX
,
274 "Assigns a preferred ALPA to the port. Only used in Loop topology."},
276 /* CFG_ADISC_SUPPORT */
280 "Sets the Fibre Channel ADISC login support level. "
281 "[0=None, 1=Partial, 2=Full]"},
287 "Enables power management support. [0=Disabled, 1=Enabled]"},
292 PARM_DYNAMIC
| PARM_HIDDEN
,
293 "Sets power management idle timeout value (seconds)."},
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 */
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",
312 PARM_DYNAMIC
| PARM_HIDDEN
,
313 "Sets the discovery timeout period (seconds) "
314 "for managing FCP-2 devices."},
316 /* CFG_LINKUP_TIMEOUT */
319 PARM_DYNAMIC
| PARM_HIDDEN
,
320 "Sets the linkup timeout period (seconds)."},
322 /* CFG_LINKUP_DELAY */
326 "Sets the driver wait period (seconds) "
327 "for a linkup after initialization."},
329 /* CFG_OFFLINE_TIMEOUT */
332 PARM_DYNAMIC
| PARM_HIDDEN
,
333 "Sets the offline timeout period (seconds)."},
335 /* CFG_LILP_ENABLE */
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 */
345 "Sets the PCI-X max memory read byte count. [512,1024,2048 or 4096]"},
347 /* CFG_HEARTBEAT_ENABLE */
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 */
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 */
364 PARM_DYNAMIC
| PARM_BOOLEAN
| PARM_HIDDEN
,
365 "Enables driver's ability to timeout commands. "
366 "[0=Disabled, 1=Enabled]"},
371 PARM_DYNAMIC_RESET
| PARM_HIDDEN
,
372 "Sets maximum number of FCP IO's the driver can manage."},
379 "Sets FMA capabilities."},
380 #endif /* FMA_SUPPORT */
382 #ifdef MAX_RRDY_PATCH
386 PARM_DYNAMIC_RESET
| PARM_HIDDEN
,
387 "Sets maximum number RRDY's for the adapter on private loop."},
388 #endif /* MAX_RRDY_PATCH */
395 "Sets the default MSI mode in driver. "
396 "[0=Off 1=Single-MSI 2=Multi-MSI 3=Auto]"},
397 #endif /* MSI_SUPPORT */
403 PARM_DYNAMIC_RESET
| PARM_HIDDEN
,
404 "Sets default SLI mode. "
405 "[0=Auto, 2=SLI2-remove all vports first, 3=SLI3]"},
408 /* CFG_NPIV_ENABLE */
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",
418 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
,
419 "Restricts login to virtual ports to conserve resources. "
420 "[0=Disabled, 1=Enabled]"},
423 {"enable-npiv-delay",
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 */
436 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
,
437 "Enables DHCHAP support in the driver. [0=Disabled, 1=Enabled]"},
442 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
| PARM_HIDDEN
,
443 "Enables end-to-end DHCHAP support in the driver. "
444 "[0=Disabled, 1=Enabled]"},
449 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
| PARM_HIDDEN
,
450 "Enables DHCHAP support for virtual ports. [0=Disabled, 1=Enabled]"},
455 PARM_DYNAMIC_LINK
| PARM_HIDDEN
,
456 "Sets authentication timeout value. (seconds)"},
461 PARM_DYNAMIC_LINK
| PARM_HIDDEN
,
462 "Sets authentication mode. [1=Disabled, 2=Active, 3=Passive]"},
467 PARM_DYNAMIC_LINK
| PARM_BOOLEAN
| PARM_HIDDEN
,
468 "Sets authentication bidirectional mode. [0=Disabled, 1=Enabled]"},
472 0, 0x1111, 0x1000, 0,
473 PARM_DYNAMIC_LINK
| PARM_HEX
| PARM_HIDDEN
,
474 "Sets authentication type priorities[4]. [0=Undef, 1=DHCHAP]"},
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]"},
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 */
492 PARM_DYNAMIC_LINK
| PARM_HIDDEN
,
493 "Sets re-authentication interval. (minutes)"},
495 #endif /* DHCHAP_SUPPORT */
498 /* CFG_TARGET_MODE */
504 #endif /* SFCT_ENABLED */
506 "Enables target mode support in driver. [0=Disabled, 1=Enabled]"},
507 #endif /* SFCT_SUPPORT */
511 #endif /* DEF_ICFG */
517 #endif /* _EMLXS_CONFIG_H */