emlxs_dfclib.h revision fe199829b492e6b3aa36dd76af597360bb4af121
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Emulex. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _EMLXS_DFCLIB_H
#define _EMLXS_DFCLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_DFC_EVENTS 16
#define MAX_EMLXS_BRDS 128
#define MAX_CFG_PARAM 64
#define MAX_NODES 4096
#ifndef MAX_VPORTS
#define MAX_VPORTS 256
#endif /* MAX_VPORTS */
#ifdef EMLXS_SPARC
#define EMLXS_BIG_ENDIAN
#endif /* EMLXS_SPARC */
#ifdef EMLXS_I386
#define EMLXS_LITTLE_ENDIAN
#endif /* EMLXS_I386 */
typedef struct brdinfo
{
} brdinfo_t;
typedef struct dfc_brdinfo
{
typedef struct ulp_bde
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} ulp_bde_t;
typedef struct ulp_bde64
{
union
{
uint32_t w;
struct
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} f;
} tus;
} ulp_bde64_t;
/* ==== Mailbox Commands ==== */
#define MBX_SHUTDOWN 0x00
#define MBX_LOAD_SM 0x01
#define MBX_READ_NV 0x02
#define MBX_WRITE_NV 0x03
#define MBX_RUN_BIU_DIAG 0x04
#define MBX_INIT_LINK 0x05
#define MBX_DOWN_LINK 0x06
#define MBX_CONFIG_LINK 0x07
#define MBX_PART_SLIM 0x08
#define MBX_CONFIG_RING 0x09
#define MBX_RESET_RING 0x0A
#define MBX_READ_CONFIG 0x0B
#define MBX_READ_RCONFIG 0x0C
#define MBX_READ_SPARM 0x0D
#define MBX_READ_STATUS 0x0E
#define MBX_READ_RPI 0x0F
#define MBX_READ_XRI 0x10
#define MBX_READ_REV 0x11
#define MBX_READ_LNK_STAT 0x12
#define MBX_REG_LOGIN 0x13
#define MBX_UNREG_LOGIN 0x14
#define MBX_READ_LA 0x15
#define MBX_CLEAR_LA 0x16
#define MBX_DUMP_MEMORY 0x17
#define MBX_DUMP_CONTEXT 0x18
#define MBX_RUN_DIAGS 0x19
#define MBX_RESTART 0x1A
#define MBX_UPDATE_CFG 0x1B
#define MBX_DOWN_LOAD 0x1C
#define MBX_DEL_LD_ENTRY 0x1D
#define MBX_RUN_PROGRAM 0x1E
#define MBX_SET_MASK 0x20
#define MBX_SET_SLIM 0x21
#define MBX_UNREG_D_ID 0x23
#define MBX_KILL_BOARD 0x24
#define MBX_CONFIG_FARP 0x25
#define MBX_WRITE_VPARMS 0x32
#define MBX_LOAD_AREA 0x81
#define MBX_RUN_BIU_DIAG64 0x84
#define MBX_CONFIG_PORT 0x88
#define MBX_READ_SPARM64 0x8D
#define MBX_READ_RPI64 0x8F
#define MBX_CONFIG_MSI 0x90
#define MBX_REG_LOGIN64 0x93
#define MBX_READ_LA64 0x95
#define MBX_FLASH_WR_ULA 0x98
#define MBX_SET_DEBUG 0x99
#define MBX_SLI_CONFIG 0x9B
#define MBX_LOAD_EXP_ROM 0x9C
#define MBX_REQUEST_FEATURES 0x9D
#define MBX_RESUME_RPI 0x9E
#define MBX_REG_VFI 0x9F
#define MBX_REG_FCFI 0xA0
#define MBX_UNREG_VFI 0xA1
#define MBX_UNREG_FCFI 0xA2
#define MBX_INIT_VFI 0xA3
#define MBX_INIT_VPI 0xA4
#define MBX_ACCESS_VDATA 0xA5
#define MBX_MAX_CMDS 0xA6
#define MBX_SLI2_CMD_MASK 0x80
typedef struct read_sparm_var
{
union
{
} un;
typedef struct read_rev_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
union
{
struct
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} b;
} un;
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
typedef struct dump_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} dump_var_t;
typedef struct dump4_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} dump4_var_t;
typedef struct update_cfg
{
#ifdef EMLXS_BIG_ENDIAN
#define INIT_REGION 1
#define UPDATE_DATA 2
#define CLEAN_UP_CFG 3
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#define INIT_REGION 1
#define UPDATE_DATA 2
#define CLEAN_UP_CFG 3
#endif
typedef struct
{
union {
struct {
#ifdef EMLXS_BIG_ENDIAN
#else
#endif
}req;
struct {
#ifdef EMLXS_BIG_ENDIAN
/* dw 0 */
/* dw 1 */
#else
/* dw 0 */
/* dw 1 */
#endif
}rsp;
}u0;
} common_hdr_t;
typedef struct get_oem_attrs
{
union {
struct {
}req;
struct {
#ifdef EMLXS_BIG_ENDIAN
#else
#endif
}rsp;
}params;
typedef struct read_write_flashrom {
typedef struct
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
typedef struct
{
union
{
} un;
typedef struct read_cfg_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
/* Defines for topology (defined previously) */
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
#define LMT_1GB_CAPABLE 0x0004
#define LMT_2GB_CAPABLE 0x0008
#define LMT_4GB_CAPABLE 0x0040
#define LMT_8GB_CAPABLE 0x0080
#define LMT_10GB_CAPABLE 0x0100
typedef struct read_log_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
typedef struct log_status_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
typedef struct read_evt_log_var
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
union
{
} un;
typedef struct dfc_mailbox
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
union
{
} un;
typedef struct dfc_mailbox4
{
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
union
{
} un;
/* Config Region 23 Records */
typedef struct tlv_fcoe {
#define TLV_FCOE_VER 1
#define TLV_FCOE_FIP 0x40
#define TLV_FCOE_VLAN 0x01
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
} tlv_fcoe_t;
typedef struct tlv_fcfconnectentry {
#ifdef EMLXS_BIG_ENDIAN
#endif
#ifdef EMLXS_LITTLE_ENDIAN
#endif
#define MAX_FCFCONNECTLIST_ENTRIES 16
typedef struct tlv_fcfconnectlist {
typedef struct dfc_ioinfo
{
} dfc_ioinfo_t;
typedef struct dfc_linkinfo
{
/* values for a_topology */
#define LNK_LOOP 0x1
#define LNK_PUBLIC_LOOP 0x2
#define LNK_FABRIC 0x3
#define LNK_PT2PT 0x4
#define LNK_MENLO_MAINTENANCE 0x5
/* values for a_linkState */
#define LNK_DOWN 0x1
#define LNK_UP 0x2
#define LNK_FLOGI 0x3
#define LNK_DISCOVERY 0x4
#define LNK_REDISCOVERY 0x5
#define LNK_READY 0x6
#define LNK_DOWN_PERSIST 0x7
typedef struct dfc_traceinfo
{
typedef struct dfc_cfgparam
{
char a_string[32];
/* reboot */
/* restart */
char a_help[80];
typedef struct dfc_nodeinfo
{
/* Defines for a_state */
#define NODE_UNUSED 0 /* unused NL_PORT entry */
/* Defines for a_flag */
typedef struct dfc_vpd
{
#define DFC_VPD_VERSION 1
} dfc_vpd_t;
typedef struct dfc_destid
{
} dfc_destid_t;
typedef struct dfc_loopback
{
typedef struct dfc_drvinfo
{
#define DFC_DRVINFO_VERSION2 0x02
#ifdef DHCHAP_SUPPORT
#endif /* DHCHAP_SUPPORT */
/* Support Level */
#if (DFC_DRVINFO_VERSION >= DFC_DRVINFO_VERSION3)
#define DFC_DRVINFO_NPIV_DRV 0x00000001
#define DFC_DRVINFO_NPIV_MODS 0x00000002
#define DFC_DRVINFO_NPIV_PARMS 0x00000004
#define DFC_DRVINFO_NPIV_FW 0x00000008
#endif /* >= DFC_DRVINFO_VERSION3 */
#if (DFC_DRVINFO_VERSION >= DFC_DRVINFO_VERSION4)
#define DFC_DRVINFO_FEATURE_DIAG 0x00000001
#define DFC_DRVINFO_FEATURE_MAPPING 0x00000002
#define DFC_DRVINFO_FEATURE_DHCHAP 0x00000004
#define DFC_DRVINFO_FEATURE_IKE 0x00000008
#define DFC_DRVINFO_FEATURE_NPIV 0x00000010
#define DFC_DRVINFO_FEATURE_RESET_WWN 0x00000020
#define DFC_DRVINFO_FEATURE_VOLATILE_WWN 0x00000040
#define DFC_DRVINFO_FEATURE_E2E_AUTH 0x00000080
#define DFC_DRVINFO_FEATURE_SAN_DIAG 0x00000100
#define DFC_DRVINFO_FEATURE_FCOE 0x00000200
#define DFC_DRVINFO_FEATURE_PERSISTLINK 0x00000400
#define DFC_DRVINFO_FEATURE_TARGET_MODE 0x00000800
#endif /* >= DFC_DRVINFO_VERSION4 */
typedef struct dfc_regevent
{
void *ctx;
void (*func) ();
/* state */
#define CHILD_UNKNOWN 0
#define CHILD_UNBORN 1
#define CHILD_ALIVE 2
#define CHILD_REGISTERED 3
#define CHILD_ASLEEP 4
#define CHILD_AWAKE 5
#define CHILD_DIED 6
/* flags */
#define EVENT_REGISTERED 0x01
#define EVENT_SERVICE_ACTIVE 0x02
#ifdef SAN_DIAG_SUPPORT
#endif /* SAN_DIAG_SUPPORT */
/* Defines for RegisterForEvent mask */
/* events */
/* events */
/* events */
/* Dump events */
/* events */
/* events */
#ifdef SAN_DIAG_SUPPORT
/* events */
/* Fabric events */
/* events */
/* events */
#endif /* SAN_DIAG_SUPPORT */
/* FCOE events */
#define MAX_RSCN_PAYLOAD 1024
/* Temperature event types */
#define DFC_TEMP_CRITICAL 1
#define DFC_TEMP_WARNING 2
#define DFC_TEMP_SAFE 3
/* bits in a_onmask */
/* commands */
/* info */
/* memory */
/* registers */
/* registers */
/* parameters */
/* bits in a_offmask */
/* memory */
/* memory */
/* registers */
/* registers */
/* registers */
/* registers */
/* state */
#define DDI_SHOW 0x0
#define DDI_ONDI 0x1
#define DDI_OFFDI 0x2
#define DDI_WARMDI 0x3
#define DDI_DIAGDI 0x4
/* mbxStatus */
#define DFC_MBX_SUCCESS 0x00
#define DFC_MBXERR_NUM_RINGS 0x01
#define DFC_MBXERR_NUM_IOCBS 0x02
#define DFC_MBXERR_IOCBS_EXCEEDED 0x03
#define DFC_MBXERR_BAD_RING_NUMBER 0x04
#define DFC_MBXERR_MASK_ENTRIES_RANGE 0x05
#define DFC_MBXERR_MASKS_EXCEEDED 0x06
#define DFC_MBXERR_BAD_PROFILE 0x07
#define DFC_MBXERR_BAD_DEF_CLASS 0x08
#define DFC_MBXERR_BAD_MAX_RESPONDER 0x09
#define DFC_MBXERR_BAD_MAX_ORIGINATOR 0x0A
#define DFC_MBXERR_RPI_REGISTERED 0x0B
#define DFC_MBXERR_RPI_FULL 0x0C
#define DFC_MBXERR_NO_RESOURCES 0x0D
#define DFC_MBXERR_BAD_RCV_LENGTH 0x0E
#define DFC_MBXERR_DMA_ERROR 0x0F
#define DFC_MBXERR_ERROR 0x10
#define DFC_MBXERR_OVERTEMP_ERROR 0xFA
#define DFC_MBXERR_HARDWARE_ERROR 0xFB
#define DFC_MBXERR_DRVR_ERROR 0xFC
#define DFC_MBXERR_BUSY 0xFD
#define DFC_MBXERR_TIMEOUT 0xFE
#define DFC_MBX_NOT_FINISHED 0xFF
/* Error codes for library calls */
#define DFC_ERR_GENERAL_ERROR 0x1
#define DFC_ERR_MBOX_ERROR 0x2
#define DFC_ERR_LINK_DOWN 0x2
#define DFC_ERR_INCORRECT_VER 0x2
#define DFC_ERR_INVALID_ID 0x2
#define DFC_ERR_TIMEOUT 0x2
#define DFC_ERR_NOT_SUPPORTED 0x2
#define DFC_ERR_NPIV_ACTIVE 0x2
#define DFC_ERR_NO_RPI 0x3
#define DFC_ERR_BUFFER_OVERFLOW 0x3
#define DFC_ERR_INVALID_LOOPBACK_TYPE 0x3
#define DFC_ERR_OVERTEMP 0x3
#define DFC_ERR_LOOPBACK_BUSY 0x4
#define DFC_ERR_INVALID_RESET_TYPE 0x4
#define DFC_ERR_MENLO_LINKDOWN 0x4
#define DFC_ERR_SEQ_TIMEOUT 0x5
#define DFC_ERR_NO_XMIT 0x6
#define DFC_ERR_INVALID_NUMBER 0x6
#define DFC_ERR_RESET_RECV 0x7
/* type definitions for GetBindList function */
typedef enum dfc_bindtype
{
typedef struct dfc_bind_entry
{
/* Bind Entry flags */
typedef struct dfc_bind_list
{
/* Defines for error codes -OLD- */
#define FC_ERROR_BUFFER_OVERFLOW 0xff
#define FC_ERROR_RESPONSE_TIMEOUT 0xfe
#define FC_ERROR_LINK_UNAVAILABLE 0xfd
#define FC_ERROR_INSUFFICIENT_RESOURCES 0xfc
#define FC_ERROR_EXISTING_REGISTRATION 0xfb
#define FC_ERROR_INVALID_TAG 0xfa
#define FC_ERROR_INVALID_WWN 0xf9
#define FC_ERROR_CREATEVENT_FAILED 0xf8
typedef union dfc_ct_rev
{
/* Structure is in Big Endian format */
struct
{
} bits;
} dfc_ct_rev_t;
typedef union dfc_ct_resp
{
/* Structure is in Big Endian format */
struct
{
} bits;
typedef struct dfc_ct_request
{
/* Structure is in Big Endian format */
#define SLI_CT_REVISION 1
/* Emulex Vendor-Unique CT Request Command Codes */
/* 0x0106 is reserved */
/* 0x0115 is reserved */
/* 0x0116 is reserved */
/* 0x0131 is reserved */
/* 0x0132 is reserved */
/* (AutoPilotManager) */
/* (AutoPilotManager) */
/* Information [GDLM] */
/* NPIV return codes */
#define DFC_NPIV_SUCCESS 0
#define DFC_NPIV_GENERAL_ERROR 1
#define DFC_NPIV_NOT_SUPPORTED 2
#define DFC_NPIV_NO_RESOURCES 3
#define DFC_NPIV_INVALID_HANDLE 3
#define DFC_NPIV_ILLEGAL_WWPN 4
#define DFC_NPIV_TOO_MANY_VPORTS 4
#define DFC_NPIV_ILLEGAL_WWN 5
#define DFC_NPIV_BUSY 5
#define DFC_NPIV_INVALID_WWN 6
#define DFC_NPIV_LINK_DOWN 7
#define DFC_NPIV_MORE_DATA 7
#define DFC_NPIV_FABRIC_NOT_SUPPORTED 8
#define DFC_NPIV_FABRIC_OUT_OF_RESOURCE 9
#define DFC_NPIV_INVALID_ACCESS_KEY 10
#define DFC_NPIV_INVALID_HANDLE_AT_CREATE 11
#define DFC_NPIV_UNSUPPORTED_OPTION 12
typedef struct dfc_vport_QoS
{
/* VPORT type */
#define VPORT_TYPE_PHYSICAL 0
#define VPORT_TYPE_VIRTUAL 1
/* VPORT States */
#define VPORT_STATE_UNKNOWN 0
#define VPORT_STATE_LINKDOWN 1
#define VPORT_STATE_INIT 2
#define VPORT_STATE_NO_FABRIC_SUPPORT 3
#define VPORT_STATE_NO_FABRIC_RESOURCE 4
#define VPORT_STATE_FABRIC_LOGOUT 5
#define VPORT_STATE_FABRIC_REJECT_WWN 6
#define VPORT_STATE_FABRIC_LOGIN_FAIL 7
#define VPORT_STATE_ACTIVE 8
#define VPORT_STATE_AUTH_FAILED 9
/* VPORT Options */
#define VPORT_OPT_AUTORETRY 0x00000001
#define VPORT_OPT_AUTOWWN 0x00000002
#define VPORT_OPT_ACTIVATE 0x00000004
#define VPORT_OPT_SAVE_CREATE_ONLY 0x00000000
#define VPORT_OPT_SAVE_CREATE_UPDATE 0x00000010
#define VPORT_OPT_SAVE_UPDATE_ONLY 0x00000018
#define VPORT_OPT_SAVE_MASK 0x00000018
#define VPORT_OPT_RESTRICT 0x00000020
#define VPORT_OPT_UNRESTRICT 0x00000040
#define VPORT_OPT_RESTRICT_MASK 0x00000060
#define VPORT_OPT_FAILOVER 0x00000080
/* Check list bit-mapped value */
#define CL_NPIV_PARM_ENABLE 0x00000001
#define CL_SLI3_ENABLE 0x00000002
#define CL_HBA_SUPPORT_NPIV 0x00000004
#define CL_HBA_HAS_RESOURCES 0x00000008
#define CL_HBA_LINKUP 0x00000010
#define CL_P2P_TOPOLOGY 0x00000020
#define CL_FABRIC_SUPPORTS_NPIV 0x00000040
#define CL_FABRIC_HAS_RESOURCES 0x00000080
#define CL_NPIV_READY 0x000000FF
#define DFC_VPORT_ATTR_VERSION 2
typedef struct dfc_vport_attrs
{
/* for compatibility check */
/* fabric */
/* created successfully */
typedef struct dfc_vport_entry
{
/* virtual port */
typedef struct dfc_vport_entry_list
{
typedef struct dfc_vport_nodeinfo_entry
{
#define VPORT_NODE_BINDDID 0x0000
#define VPORT_NODE_BINDWWNN 0x0001
#define VPORT_NODE_BINDWWPN 0x0002
#define VPORT_NODE_AUTOMAP 0x0004
#define VPORT_NODE_UNMASK_ALL_LUN 0x0008
#define VPORT_NODE_DISABLE_LUN_AUTOMAP 0x0010
#define VPORT_NODE_ALPA 0x0020
#define VPORT_NODESTATE_EXIST 0x0001
#define VPORT_NODESTATE_READY 0x0002
#define VPORT_NODESTATE_LINKDOWN 0x0004
#define VPORT_NODESTATE_UNMAPPED 0x0008
#define VPORT_NODESTATE_BOUND 0x0010
typedef struct dfc_vport_get_nodeinfo
{
typedef struct dfc_vport_resource
{
typedef struct dfc_vlinkinfo
{
#define VPORT_FAIL_UNKNOWN 0
#define VPORT_FAIL_LINKDOWN 1
#define VPORT_FAIL_FAB_UNSUPPORTED 2
#define VPORT_FAIL_FAB_NORESOURCES 3
#define VPORT_FAIL_FAB_LOGOUT 4
#define VPORT_FAIL_HBA_NORESOURCES 5
void *vlink;
#ifdef DHCHAP_SUPPORT
/* DHCHAP return code */
#define DFC_AUTH_STATUS_NOT_CONFIGURED 0x8001
#define DFC_AUTH_STATUS_AUTH_FAILED_NO_SA_FOUND 0x8002
#define DFC_AUTH_STATUS_AUTH_INIT_OK_AUTH_FAILED 0x8003
#define DFC_AUTH_STATUS_COMPARE_FAILED 0x8004
#define DFC_AUTH_STATUS_WWN_NOT_FOUND 0x8005
#define DFC_AUTH_STATUS_PASSWORD_INVALID 0x8006
#define DFC_AUTH_STATUS_INVALID_ENTITY 0x8007
#define DFC_AUTH_STATUS_ENTITY_NOT_ACTIVE 0x8008
#define DFC_AUTH_STATUS_INVALID_OPERATION 0x8009
#define DFC_AUTH_STATUS_OUT_OF_RESOURCES 0x800a
#define DFC_AUTH_STATUS_AUTHENTICATION_GOINGON 0x800b
#define DFC_AUTH_STATUS_INVALID_BOARD_NO 0x800c
#define DFC_AUTH_STATUS_IO_ERROR 0x800d
#define DFC_AUTH_STATUS_CREATE_STORKEY_ERROR 0x800e
#define DFC_AUTH_STATUS_CREATE_PARMKEY_ERROR 0x800f
#define DFC_AUTH_STATUS_CREATE_AUTHKEY_ERROR 0x8010
#define DFC_AUTH_STATUS_LOCAL_REMOTE_PASSWORD_SAME 0x8011
#define DFC_AUTH_STATUS_CREATE_BORDKEY_ERROR 0x8020
#define DFC_AUTH_STATUS_DRVTYPE_NOT_SUPPORTED 0x8030
#define DFC_AUTH_STATUS_AUTHENTICATION_NOT_SUPPORTED 0x8031
#define DFC_AUTH_STATUS_GENERAL_ERROR 0x8032
#define DFC_AUTH_STATUS_CONFIG_NOT_FOUND 0x8034
#define DFC_AUTH_STATUS_NOT_PRIVILEGE_USER 0x8040
typedef struct dfc_fcsp_config
{
#define DFC_AUTH_TOV_MIN 20
#define DFC_AUTH_TOV_MAX 1000
#define DFC_AUTH_TOV_DEFAULT 45
#define DFC_AUTH_MODE_DISABLED 1
#define DFC_AUTH_MODE_ACTIVE 2
#define DFC_AUTH_MODE_PASSIVE 3
#define DFC_AUTH_BIDIR_DISABLED 0
#define DFC_AUTH_BIDIR_ENABLED 1
#define DFC_AUTH_TYPE_FCAP 2
#define DFC_AUTH_TYPE_FCPAP 3
#define DFC_AUTH_TYPE_KERBEROS 4
#define DFC_AUTH_TYPE_MAX 4
#define DFC_AUTH_TYPE_DEFAULT1 0
#define DFC_AUTH_TYPE_DEFAULT2 0
#define DFC_AUTH_TYPE_DEFAULT3 0
#define DFC_AUTH_HASH_MD5 1
#define DFC_AUTH_HASH_SHA1 2
#define DFC_AUTH_HASH_MAX 2
#define DFC_AUTH_HASH_DEFAULT2 0
#define DFC_AUTH_HASH_DEFAULT3 0
#define DFC_AUTH_GROUP_NULL 1
#define DFC_AUTH_GROUP_1024 2
#define DFC_AUTH_GROUP_1280 3
#define DFC_AUTH_GROUP_1536 4
#define DFC_AUTH_GROUP_2048 5
#define DFC_AUTH_GROUP_MAX 5
#define DFC_AUTH_GROUP_DEFAULT5 0
#define DFC_AUTH_GROUP_DEFAULT6 0
#define DFC_AUTH_GROUP_DEFAULT7 0
#define DFC_REAUTH_TOV_MIN 0
#define DFC_REAUTH_TOV_MAX 7200
#define DFC_REAUTH_TOV_DEFAULT 1440
typedef struct dfc_password
{
#define DFC_PASSWORD_LENGTH_MIN 8
#define DFC_PASSWORD_LENGTH_MAX 128
#define DFC_PASSWORD_TYPE_ASCII 1
#define DFC_PASSWORD_TYPE_BINARY 2
#define DFC_PASSWORD_TYPE_IGNORE 3
typedef struct dfc_auth_password
{
typedef struct dfc_auth_cfglist
{
typedef struct dfc_auth_status
{
#define DFC_AUTH_STATE_OFF 1
#define DFC_AUTH_STATE_INP 2
#define DFC_AUTH_STATE_ON 3
#define DFC_AUTH_STATE_FAILED 4
#define DFC_AUTH_FAIL_GENERIC 1
#define DFC_AUTH_FAIL_ELS_TMO 2
#define DFC_AUTH_FAIL_XACT_TMO 3
#define DFC_AUTH_FAIL_LS_RJT 4
#define DFC_AUTH_FAIL_BSY_LS_RJT 5
#define DFC_AUTH_FAIL_REJECTED 6
#endif /* DHCHAP_SUPPORT */
/*
* Start of FCP specific structures
*/
#ifndef MAX_FCP_SNS
typedef struct emlxs_fcp_rsp
{
#define SCSI_STAT_GOOD 0x00
#define SCSI_STAT_CHECK_COND 0x02
#define SCSI_STAT_COND_MET 0x04
#define SCSI_STAT_BUSY 0x08
#define SCSI_STAT_INTERMED 0x10
#define SCSI_STAT_INTERMED_CM 0x14
#define SCSI_STAT_RES_CNFLCT 0x18
#define SCSI_STAT_CMD_TERM 0x22
#define SCSI_STAT_QUE_FULL 0x28
#define SCSI_STAT_ACA_ACTIVE 0x30
#define SCSI_STAT_TASK_ABORT 0x40
/* fcpStatus2 */
/* Received in Big Endian format */
/* received in Big Endian format */
/* fcpRspInfo */
/* Received In Big Endian format */
#define RSP_NO_FAILURE 0x00
#define RSP_DATA_BURST_ERR 0x01
#define RSP_CMD_FIELD_ERR 0x02
#define RSP_RO_MISMATCH_ERR 0x03
/*
* Define maximum size of SCSI Sense buffer.
* Seagate never issues more than 18 bytes of Sense data.
*/
#define MAX_FCP_SNS 128
typedef emlxs_fcp_rsp FCP_RSP;
#endif /* MAX_FCP_SNS */
#ifndef FC_LUN_SHIFT
typedef struct emlxs_fcp_cmd
{
/*
* # of bits to shift lun id to end up in right payload word,
* little endian = 8, big = 16.
*/
#ifdef EMLXS_LITTLE_ENDIAN
#define FC_LUN_SHIFT 8
#define FC_ADDR_MODE_SHIFT 0
#endif
#ifdef EMLXS_BIG_ENDIAN
#define FC_LUN_SHIFT 16
#define FC_ADDR_MODE_SHIFT 24
#endif
#define SIMPLE_Q 0x00
#define HEAD_OF_Q 0x01
#define ORDERED_Q 0x02
#define ACA_Q 0x04
#define UNTAGGED 0x05
/* codes */
typedef emlxs_fcp_cmd_t FCP_CMND;
#endif /* FC_LUN_SHIFT */
/*
* Used by libdfc (SendScsiCmd, SendFcpCmd, DFC_SendScsiCmdV2, DFC_SendFcpCmdV2
* and emlxs_dfc_send_scsi_fcp functions
*/
typedef struct dfc_send_scsi_fcp_cmd_info
{
#define SCSI_RSP_CNT(x) x.cnt1
#define SCSI_SNS_CNT(x) x.cnt2
#define FC_DATA_CNT(x) x.cnt1
#define FC_RSP_CNT(x) x.cnt2
#define DFC_SEND_SCSI_FCP_V1 1
#define DFC_SEND_SCSI_FCP_V2 2
typedef struct DFC_FCoEParam
{
#define DFC_FCoE_PARAM_VERSION 1
#define VLAN_ID_INVALID 0x0
#define VLAN_ID_VALID 0x1
typedef struct DFC_FCoEFCFConnectEntry
{
#define FCFCNCT_RSVD 0x00000001
#define FCFCNCT_BOOT 0x00000002
#define FCFCNCT_PRIMARY 0x00000004
#define FCFCNCT_FBNM_VALID 0x00000008
#define FCFCNCT_SWNM_VALID 0x00000010
#define FCFCNCT_VLAN_VALID 0x00000020
#define FCFCNCT_MASK 0xFFFFFF00
typedef struct DFC_FCoEFCFConnectList
{
#define DFC_FCoE_FCFCONNECTLIST_VERSION 1
typedef struct DFC_FCoEFCFInfo
{
#define FCF_AVAILABLE_STATE 0x1
typedef struct DFC_FCoEFCFList
{
#define DFC_FCoE_FCFLIST_VERSION 1
#ifdef __cplusplus
}
#endif
#endif /* _EMLXS_DFCLIB_H */