#ifndef _EMLXS_CONFIG_H
#define _EMLXS_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
#define EMLXS_CFG_STR_SIZE 32
#define EMLXS_CFG_HELP_SIZE 80
typedef struct emlxs_config
{
char string[EMLXS_CFG_STR_SIZE];
uint32_t low;
uint32_t hi;
uint32_t def;
uint32_t current;
uint32_t flags;
char help[EMLXS_CFG_HELP_SIZE];
} emlxs_config_t;
typedef enum emlxs_cfg_parm
{
CFG_CONSOLE_NOTICES,
CFG_CONSOLE_WARNINGS,
CFG_CONSOLE_ERRORS,
CFG_CONSOLE_DEBUGS,
CFG_LOG_NOTICES,
CFG_LOG_WARNINGS,
CFG_LOG_ERRORS,
CFG_LOG_DEBUGS,
CFG_NUM_IOCBS,
CFG_MAX_XFER_SIZE,
CFG_UB_BUFS,
CFG_NETWORK_ON,
CFG_ACK0,
CFG_TOPOLOGY,
CFG_LINK_SPEED,
CFG_NUM_NODES,
CFG_CR_DELAY,
CFG_CR_COUNT,
CFG_ASSIGN_ALPA,
CFG_ADISC_SUPPORT,
CFG_PM_SUPPORT,
CFG_PM_IDLE,
CFG_FW_CHECK,
CFG_TRI_REQUIRED,
CFG_DISC_TIMEOUT,
CFG_LINKUP_TIMEOUT,
CFG_LINKUP_DELAY,
CFG_OFFLINE_TIMEOUT,
CFG_LILP_ENABLE,
CFG_PCI_MAX_READ,
CFG_HEARTBEAT_ENABLE,
CFG_RESET_ENABLE,
CFG_TIMEOUT_ENABLE,
CFG_NUM_IOTAGS,
#ifdef NODE_THROTTLE_SUPPORT
CFG_TGT_DEPTH,
#endif
CFG_MEM_DYNAMIC,
#ifdef FMA_SUPPORT
CFG_FM_CAPS,
#endif
#ifdef MAX_RRDY_SUPPORT
CFG_MAX_RRDY,
#endif
#ifdef MSI_SUPPORT
CFG_MSI_MODE,
#endif
CFG_SLI_MODE,
CFG_NPIV_ENABLE,
CFG_VPORT_RESTRICTED,
CFG_NPIV_DELAY,
#ifdef DHCHAP_SUPPORT
CFG_AUTH_ENABLE,
CFG_AUTH_E2E,
CFG_AUTH_NPIV,
CFG_AUTH_TMO,
CFG_AUTH_MODE,
CFG_AUTH_BIDIR,
CFG_AUTH_TYPE,
CFG_AUTH_HASH,
CFG_AUTH_GROUP,
CFG_AUTH_INTERVAL,
#endif
#ifdef SFCT_SUPPORT
CFG_DTM_ENABLE,
CFG_TARGET_MODE,
CFG_VPORT_MODE_MASK,
CFG_FCT_QDEPTH,
#endif
CFG_NUM_WQ,
CFG_PERSIST_LINKDOWN,
CFG_ENABLE_PATCH,
CFG_FAST_TGT_RESET,
CFG_FAST_TGT_RESET_TMR,
CFG_FCF_SOLICIT_DELAY,
CFG_FCF_FAILOVER_DELAY,
CFG_FCF_RESOLICIT_DELAY,
CFG_FCF_RPI_IDLE_TIMEOUT,
CFG_DELAY_DISCOVERY,
CFG_RQD_MODE,
CFG_PERF_HINT,
NUM_CFG_PARAM
} emlxs_cfg_parm_t;
#define PARM_HIDDEN 0x80000000
#ifdef DEF_ICFG
emlxs_config_t emlxs_cfg[] = {
{"console-notices",
0, 0xffffffff, 0, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for notice messages to the console."},
{"console-warnings",
0, 0xffffffff, 0, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for warning messages to the console."},
{"console-errors",
0, 0xffffffff, 0, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for error messages to the console."},
{"console-debugs",
0, 0xffffffff, 0, 0,
PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
"Verbose mask for debugging messages to the console."},
{"log-notices",
0, 0xffffffff, 0xffffffff, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for notice messages to the messages file."},
{"log-warnings",
0, 0xffffffff, 0xffffffff, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for warning messages to the messages file."},
{"log-errors",
0, 0xffffffff, 0xffffffff, 0,
PARM_DYNAMIC | PARM_HEX,
"Verbose mask for error messages to the messages file."},
{"log-debugs",
0, 0xffffffff, 0, 0,
PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
"Verbose mask for debugging messages to the messages file."},
{"num-iocbs",
128, 10240, 1024, 0,
PARM_DYNAMIC_RESET,
"Number of IOCB buffers the driver should allocate."},
{"max-xfer-size",
131072, 1388544, 339968, 0,
0,
"Sets maximum bytes per IO the driver can transfer."},
{"ub-bufs",
40, 16320, 1000, 0,
0,
"Number of unsolicited buffers the driver should allocate."},
{"network-on",
0, 1, 1, 0,
PARM_BOOLEAN,
"Enable IP processing. "
"[0=Disabled, 1=Enabled]"},
{"ack0",
0, 1, 0, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN,
"Enables ACK0 support. "
"[0=Disabled, 1=Enabled]"},
{"topology",
0, 6, 0, 0,
PARM_DYNAMIC_LINK,
"Select Fibre Channel topology. "
"[0=Loop->PTP, 2=PTP, 4=Loop, 6=PTP->Loop]"},
{"link-speed",
0, 16, 0, 0,
PARM_DYNAMIC_LINK,
"Select link speed. "
"[0=Auto, 1=1Gb, 2=2Gb, 4=4Gb, 8=8Gb, 16=16Gb]"},
{"num-nodes",
0, 4096, 0, 0,
PARM_DYNAMIC_RESET,
"Number of remote FC nodes the driver will support. "
"[0=no_limit, else must be >2]"},
{"cr-delay",
0, 63, 0, 0,
PARM_DYNAMIC_LINK,
"A count of milliseconds after which "
"an interrupt response is generated"},
{"cr-count",
1, 255, 1, 0,
PARM_DYNAMIC_LINK,
"A count of I/O completions after "
"which an interrupt response is generated"},
{"assign-alpa",
0, 0xef, 0, 0,
PARM_DYNAMIC_LINK | PARM_HEX,
"Assigns a preferred ALPA to the port. Only used in Loop topology."},
{"adisc-support",
0, 2, 1, 0,
PARM_DYNAMIC,
"Sets the Fibre Channel ADISC login support level. "
"[0=None, 1=Partial, 2=Full]"},
{"pm-support",
0, 1, 0, 0,
PARM_BOOLEAN,
"Enables power management support. "
"[0=Disabled, 1=Enabled]"},
{"pm-idle",
0, 3600, 300, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets power management idle timeout value (seconds)."},
{"fw-check",
0, 7, 1, 0,
PARM_DYNAMIC_RESET | PARM_HEX | PARM_HIDDEN,
"Enables firmware revision checking. "
"[0=Off 1=Sun-only 2=All 4=kern-update]"},
{"tri-required",
0, 1, 0, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Requires Task Retry Id support by a remote device "
"for FCP-2 error recovery."},
{"discovery-timeout",
0, 600, 25, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets the discovery timeout period (seconds) "
"for managing FCP-2 devices."},
{"linkup-timeout",
0, 10, 2, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets the linkup timeout period (seconds)."},
{"linkup-delay",
0, 60, 10, 0,
PARM_DYNAMIC_RESET,
"Sets the driver wait period (seconds) "
"for a linkup after initialization."},
{"offline-timeout",
0, 600, 45, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets the offline timeout period (seconds)."},
{"enable-lilp",
0, 1, 1, 0,
PARM_DYNAMIC_RESET | PARM_BOOLEAN | PARM_HIDDEN,
"Enables LIRP/LILP support in the driver. "
"[0=Disabled, 1=Enabled]"},
{"pci-max-read",
512, 4096, 2048, 0,
PARM_DYNAMIC_RESET,
"Sets the PCI-X max memory read byte count. "
"[512,1024,2048 or 4096]"},
{"heartbeat-enable",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Enables driver's mailbox heartbeat to the adapter. "
"[0=Disabled, 1=Enabled]"},
{"reset-enable",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Enables driver's ability to reset the adapter. "
"[0=Disabled, 1=Enabled]"},
{"timeout-enable",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Enables driver's ability to timeout commands. "
"[0=Disabled, 1=Enabled]"},
{"num-iotags",
0, 4096, 0, 0,
PARM_DYNAMIC_RESET | PARM_HIDDEN,
"Sets number of outstanding IO's. "
"[0=max determined by type of HBA]"},
#ifdef NODE_THROTTLE_SUPPORT
{"target-depth",
0, MAX_NODE_THROTTLE, 512, 0,
PARM_DYNAMIC_LINK,
"Sets remote FCP target queue depth. "
"[0=no_limit, N=Maximum active IO's]"},
#endif
{"mem-dynamic",
0, 86400, 180, 0,
PARM_DYNAMIC_RESET | PARM_HIDDEN,
"Enables dynamic memory pools "
"[0=Disabled, 1-N=Enabled w/cleaning every N secs]"},
#ifdef FMA_SUPPORT
{"fm-capable",
0, 0xF, 0xB, 0,
PARM_HEX | PARM_HIDDEN,
"Sets FMA capabilities. "
"[bit 3:errcb, 2:dmachk, 1:accchk, 0:ereport]"},
#endif
#ifdef MAX_RRDY_SUPPORT
{"max-rrdy",
0, 255, 2, 0,
PARM_DYNAMIC_RESET | PARM_HIDDEN,
"Sets maximum number RRDY's for the adapter on private loop."},
#endif
#ifdef MSI_SUPPORT
{"msi-mode",
0, 3, 3, 0,
PARM_HIDDEN,
"Sets the default MSI mode in driver. "
"[0=Off 1=Single-MSI 2=Multi-MSI 3=Auto]"},
#endif
{"sli-mode",
0, 4, 0, 0,
PARM_DYNAMIC_RESET | PARM_HIDDEN,
"Sets default SLI mode. "
"[0=Auto, 2=SLI2-remove all vports first, 3=SLI3, 4=SLI4]"},
{"enable-npiv",
0, 1, 0, 0,
PARM_DYNAMIC_RESET | PARM_BOOLEAN,
"Enables NPIV. [0=Disabled-remove all vports first, "
"[1=Enabled-requires SLI3+]"},
{"vport-restrict-login",
0, 1, 1, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN,
"Restricts login to virtual ports to conserve resources. "
"[0=Disabled, 1=Enabled]"},
{"enable-npiv-delay",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Enable FDISC/NS command delay from vports to switch. "
"[0=Disabled, 1=Enabled]"},
#ifdef DHCHAP_SUPPORT
{"enable-auth",
0, 1, 0, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN,
"Enables DHCHAP support in the driver. "
"[0=Disabled, 1=Enabled]"},
{"auth-e2e",
0, 1, 0, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
"Enables end-to-end DHCHAP support in the driver. "
"[0=Disabled, 1=Enabled]"},
{"auth-npiv",
0, 1, 0, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
"Enables DHCHAP support for virtual ports. "
"[0=Disabled, 1=Enabled]"},
{"auth-tmo",
20, 999, 45, 0,
PARM_DYNAMIC_LINK | PARM_HIDDEN,
"Sets authentication timeout value. (seconds)"},
{"auth-mode",
1, 3, 1, 0,
PARM_DYNAMIC_LINK | PARM_HIDDEN,
"Sets authentication mode. "
"[1=Disabled, 2=Active, 3=Passive]"},
{"auth-bidir",
0, 1, 0, 0,
PARM_DYNAMIC_LINK | PARM_BOOLEAN | PARM_HIDDEN,
"Sets authentication bidirectional mode. "
"[0=Disabled, 1=Enabled]"},
{"auth-type",
0, 0x1111, 0x1000, 0,
PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
"Sets authentication type priorities[4]. "
"[0=Undef, 1=DHCHAP]"},
{"auth-hash",
0, 0x2222, 0x1200, 0,
PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
"Sets authentication hash priorities[4]. "
"[0=Undef, 1=MD5, 2=SHA1]"},
{"auth-group",
0, 0x55555555, 0x54321000, 0,
PARM_DYNAMIC_LINK | PARM_HEX | PARM_HIDDEN,
"Sets auth group priorities[8]. "
"[0=Undef,1=NULL,2=1024,3=1280,4=1536,5=2048]"},
{"auth-interval",
0, 3600, 300, 0,
PARM_DYNAMIC_LINK | PARM_HIDDEN,
"Sets re-authentication interval. (minutes)"},
#endif
#ifdef SFCT_SUPPORT
{"enable-dtm",
0, 1, 0, 0,
PARM_BOOLEAN | PARM_HIDDEN,
"Enables dynamic target mode. "
"[0=Disabled, 1=Enabled]"},
{"target-mode",
0, 1, 0, 0,
PARM_BOOLEAN,
"Enables target mode support in driver. "
"[0=Disabled, 1=Enabled]"},
{"vport-mode-mask",
1, 3, 1, 0,
PARM_HEX | PARM_HIDDEN,
"Sets default vport mode mask. "
"[0x1=Initiator, 0x2=Target (enable-dtm=1 reqd)"},
#ifdef FYI
{"vportN-mode-mask",
1, 3, 1, 0,
PARM_HEX | PARM_HIDDEN,
"Sets vportN mode mask. "
"[0x1=Initiator, 0x2=Target (enable-dtm=1 reqd)"},
#endif
{"fct-queue-depth",
0, 4096, 0, 0,
PARM_BOOLEAN,
"Queue depth of target mode port. "
"[0=max determined by type of HBA]"},
#endif
{"num-wq",
1, EMLXS_MAX_WQS_PER_EQ, 1, 0,
PARM_DYNAMIC_RESET | PARM_HIDDEN,
"Defines number of Work Queues (WQs) per EQ."},
{"persist-linkdown",
0, 1, 0, 0,
PARM_DYNAMIC_RESET | PARM_BOOLEAN,
"Set link persistently down. "
"[0=Disabled, 1=Enabled]."},
{"enable-patch",
0, 0xFFFFFFFF, DEFAULT_PATCHES, 0,
PARM_DYNAMIC | PARM_HEX | PARM_HIDDEN,
"Enables patches in driver."},
{"fast-tgt-reset",
0, 1, 0, 0,
PARM_DYNAMIC_RESET | PARM_BOOLEAN | PARM_HIDDEN,
"Enables alternative target reset processing. "
"[0=Disabled 1=Enabled]"},
{"fast-tgt-reset-timer",
0, 60, 10, 0,
PARM_DYNAMIC_RESET | PARM_BOOLEAN | PARM_HIDDEN,
"RSCN notification timer for fast target reset. "
"[0=Disabled 1-60=seconds]"},
{"fcf-solicit-delay",
0, 60, 3, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets delay after FCF solicit request before reading FCF table. "
"[0-60=seconds]"},
{"fcf-failover-delay",
0, 60, 0, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets delay before attempting failover to a new FCF. "
"[0-60=seconds]"},
{"fcf-resolicit-delay",
0, 60, 3, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets delay after total FCF failure before resoliciting. "
"[0-60=seconds]"},
{"fcf-rpi-idle-timeout",
1, 30, 2, 0,
PARM_DYNAMIC | PARM_HIDDEN,
"Sets timeout period of an idle reserved RPI. "
"[1-30=seconds]"},
{"delay-discovery",
0, 2, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Clean Address to delay discovery."
"[0=Disabled 1=Enabled not 1st linkup 2=Enabled]"},
{"rqd-mode",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Request Recovery Qualifier delay."
"[0=Disabled 1=Enabled]"},
{"perf-hint",
0, 1, 1, 0,
PARM_DYNAMIC | PARM_BOOLEAN | PARM_HIDDEN,
"Use performance hints if applicable."
"[0=Disabled 1=Enabled]"},
};
#endif
#ifdef __cplusplus
}
#endif
#endif