add idl4k kernel firmware version 1.13.0.105

This commit is contained in:
Jaroslav Kysela
2015-03-26 17:22:37 +01:00
parent 5194d2792e
commit e9070cdc77
31064 changed files with 12769984 additions and 0 deletions

View File

@@ -0,0 +1,492 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __CT_H__
#define __CT_H__
#include <protocol/types.h>
#pragma pack(1)
struct ct_hdr_s{
u32 rev_id:8; /* Revision of the CT */
u32 in_id:24; /* Initiator Id */
u32 gs_type:8; /* Generic service Type */
u32 gs_sub_type:8; /* Generic service sub type */
u32 options:8; /* options */
u32 rsvrd:8; /* reserved */
u32 cmd_rsp_code:16;/* ct command/response code */
u32 max_res_size:16;/* maximum/residual size */
u32 frag_id:8; /* fragment ID */
u32 reason_code:8; /* reason code */
u32 exp_code:8; /* explanation code */
u32 vendor_unq:8; /* vendor unique */
};
/*
* defines for the Revision
*/
enum {
CT_GS3_REVISION = 0x01,
};
/*
* defines for gs_type
*/
enum {
CT_GSTYPE_KEYSERVICE = 0xF7,
CT_GSTYPE_ALIASSERVICE = 0xF8,
CT_GSTYPE_MGMTSERVICE = 0xFA,
CT_GSTYPE_TIMESERVICE = 0xFB,
CT_GSTYPE_DIRSERVICE = 0xFC,
};
/*
* defines for gs_sub_type for gs type directory service
*/
enum {
CT_GSSUBTYPE_NAMESERVER = 0x02,
};
/*
* defines for gs_sub_type for gs type management service
*/
enum {
CT_GSSUBTYPE_CFGSERVER = 0x01,
CT_GSSUBTYPE_UNZONED_NS = 0x02,
CT_GSSUBTYPE_ZONESERVER = 0x03,
CT_GSSUBTYPE_LOCKSERVER = 0x04,
CT_GSSUBTYPE_HBA_MGMTSERVER = 0x10, /* for FDMI */
};
/*
* defines for CT response code field
*/
enum {
CT_RSP_REJECT = 0x8001,
CT_RSP_ACCEPT = 0x8002,
};
/*
* defintions for CT reason code
*/
enum {
CT_RSN_INV_CMD = 0x01,
CT_RSN_INV_VER = 0x02,
CT_RSN_LOGIC_ERR = 0x03,
CT_RSN_INV_SIZE = 0x04,
CT_RSN_LOGICAL_BUSY = 0x05,
CT_RSN_PROTO_ERR = 0x07,
CT_RSN_UNABLE_TO_PERF = 0x09,
CT_RSN_NOT_SUPP = 0x0B,
CT_RSN_SERVER_NOT_AVBL = 0x0D,
CT_RSN_SESSION_COULD_NOT_BE_ESTBD = 0x0E,
CT_RSN_VENDOR_SPECIFIC = 0xFF,
};
/*
* definitions for explanations code for Name server
*/
enum {
CT_NS_EXP_NOADDITIONAL = 0x00,
CT_NS_EXP_ID_NOT_REG = 0x01,
CT_NS_EXP_PN_NOT_REG = 0x02,
CT_NS_EXP_NN_NOT_REG = 0x03,
CT_NS_EXP_CS_NOT_REG = 0x04,
CT_NS_EXP_IPN_NOT_REG = 0x05,
CT_NS_EXP_IPA_NOT_REG = 0x06,
CT_NS_EXP_FT_NOT_REG = 0x07,
CT_NS_EXP_SPN_NOT_REG = 0x08,
CT_NS_EXP_SNN_NOT_REG = 0x09,
CT_NS_EXP_PT_NOT_REG = 0x0A,
CT_NS_EXP_IPP_NOT_REG = 0x0B,
CT_NS_EXP_FPN_NOT_REG = 0x0C,
CT_NS_EXP_HA_NOT_REG = 0x0D,
CT_NS_EXP_FD_NOT_REG = 0x0E,
CT_NS_EXP_FF_NOT_REG = 0x0F,
CT_NS_EXP_ACCESSDENIED = 0x10,
CT_NS_EXP_UNACCEPTABLE_ID = 0x11,
CT_NS_EXP_DATABASEEMPTY = 0x12,
CT_NS_EXP_NOT_REG_IN_SCOPE = 0x13,
CT_NS_EXP_DOM_ID_NOT_PRESENT = 0x14,
CT_NS_EXP_PORT_NUM_NOT_PRESENT = 0x15,
CT_NS_EXP_NO_DEVICE_ATTACHED = 0x16
};
/*
* defintions for the explanation code for all servers
*/
enum {
CT_EXP_AUTH_EXCEPTION = 0xF1,
CT_EXP_DB_FULL = 0xF2,
CT_EXP_DB_EMPTY = 0xF3,
CT_EXP_PROCESSING_REQ = 0xF4,
CT_EXP_UNABLE_TO_VERIFY_CONN = 0xF5,
CT_EXP_DEVICES_NOT_IN_CMN_ZONE = 0xF6
};
/*
* Command codes for Name server
*/
enum {
GS_GID_PN = 0x0121, /* Get Id on port name */
GS_GPN_ID = 0x0112, /* Get port name on ID */
GS_GNN_ID = 0x0113, /* Get node name on ID */
GS_GID_FT = 0x0171, /* Get Id on FC4 type */
GS_GSPN_ID = 0x0118, /* Get symbolic PN on ID */
GS_RFT_ID = 0x0217, /* Register fc4type on ID */
GS_RSPN_ID = 0x0218, /* Register symbolic PN on ID */
GS_RPN_ID = 0x0212, /* Register port name */
GS_RNN_ID = 0x0213, /* Register node name */
GS_RCS_ID = 0x0214, /* Register class of service */
GS_RPT_ID = 0x021A, /* Register port type */
GS_GA_NXT = 0x0100, /* Get all next */
GS_RFF_ID = 0x021F, /* Register FC4 Feature */
};
struct fcgs_id_req_s{
u32 rsvd:8;
u32 dap:24; /* port identifier */
};
#define fcgs_gpnid_req_t struct fcgs_id_req_s
#define fcgs_gnnid_req_t struct fcgs_id_req_s
#define fcgs_gspnid_req_t struct fcgs_id_req_s
struct fcgs_gidpn_req_s{
wwn_t port_name; /* port wwn */
};
struct fcgs_gidpn_resp_s{
u32 rsvd:8;
u32 dap:24; /* port identifier */
};
/**
* RFT_ID
*/
struct fcgs_rftid_req_s {
u32 rsvd:8;
u32 dap:24; /* port identifier */
u32 fc4_type[8]; /* fc4 types */
};
/**
* RFF_ID : Register FC4 features.
*/
#define FC_GS_FCP_FC4_FEATURE_INITIATOR 0x02
#define FC_GS_FCP_FC4_FEATURE_TARGET 0x01
struct fcgs_rffid_req_s{
u32 rsvd :8;
u32 dap :24; /* port identifier */
u32 rsvd1 :16;
u32 fc4ftr_bits :8; /* fc4 feature bits */
u32 fc4_type :8; /* corresponding FC4 Type */
};
/**
* GID_FT Request
*/
struct fcgs_gidft_req_s{
u8 reserved;
u8 domain_id; /* domain, 0 - all fabric */
u8 area_id; /* area, 0 - whole domain */
u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */
}; /* GID_FT Request */
/**
* GID_FT Response
*/
struct fcgs_gidft_resp_s {
u8 last:1; /* last port identifier flag */
u8 reserved:7;
u32 pid:24; /* port identifier */
}; /* GID_FT Response */
/**
* RSPN_ID
*/
struct fcgs_rspnid_req_s{
u32 rsvd:8;
u32 dap:24; /* port identifier */
u8 spn_len; /* symbolic port name length */
u8 spn[256]; /* symbolic port name */
};
/**
* RPN_ID
*/
struct fcgs_rpnid_req_s{
u32 rsvd:8;
u32 port_id:24;
wwn_t port_name;
};
/**
* RNN_ID
*/
struct fcgs_rnnid_req_s{
u32 rsvd:8;
u32 port_id:24;
wwn_t node_name;
};
/**
* RCS_ID
*/
struct fcgs_rcsid_req_s{
u32 rsvd:8;
u32 port_id:24;
u32 cos;
};
/**
* RPT_ID
*/
struct fcgs_rptid_req_s{
u32 rsvd:8;
u32 port_id:24;
u32 port_type:8;
u32 rsvd1:24;
};
/**
* GA_NXT Request
*/
struct fcgs_ganxt_req_s{
u32 rsvd:8;
u32 port_id:24;
};
/**
* GA_NXT Response
*/
struct fcgs_ganxt_rsp_s{
u32 port_type:8; /* Port Type */
u32 port_id:24; /* Port Identifier */
wwn_t port_name; /* Port Name */
u8 spn_len; /* Length of Symbolic Port Name */
char spn[255]; /* Symbolic Port Name */
wwn_t node_name; /* Node Name */
u8 snn_len; /* Length of Symbolic Node Name */
char snn[255]; /* Symbolic Node Name */
u8 ipa[8]; /* Initial Process Associator */
u8 ip[16]; /* IP Address */
u32 cos; /* Class of Service */
u32 fc4types[8]; /* FC-4 TYPEs */
wwn_t fabric_port_name;
/* Fabric Port Name */
u32 rsvd:8; /* Reserved */
u32 hard_addr:24; /* Hard Address */
};
/*
* Fabric Config Server
*/
/*
* Command codes for Fabric Configuration Server
*/
enum {
GS_FC_GFN_CMD = 0x0114, /* GS FC Get Fabric Name */
GS_FC_GMAL_CMD = 0x0116, /* GS FC GMAL */
GS_FC_TRACE_CMD = 0x0400, /* GS FC Trace Route */
GS_FC_PING_CMD = 0x0401, /* GS FC Ping */
};
/*
* Source or Destination Port Tags.
*/
enum {
GS_FTRACE_TAG_NPORT_ID = 1,
GS_FTRACE_TAG_NPORT_NAME = 2,
};
/*
* Port Value : Could be a Port id or wwn
*/
union fcgs_port_val_u{
u32 nport_id;
wwn_t nport_wwn;
};
#define GS_FTRACE_MAX_HOP_COUNT 20
#define GS_FTRACE_REVISION 1
/*
* Ftrace Related Structures.
*/
/*
* STR (Switch Trace) Reject Reason Codes. From FC-SW.
*/
enum {
GS_FTRACE_STR_CMD_COMPLETED_SUCC = 0,
GS_FTRACE_STR_CMD_NOT_SUPP_IN_NEXT_SWITCH,
GS_FTRACE_STR_NO_RESP_FROM_NEXT_SWITCH,
GS_FTRACE_STR_MAX_HOP_CNT_REACHED,
GS_FTRACE_STR_SRC_PORT_NOT_FOUND,
GS_FTRACE_STR_DST_PORT_NOT_FOUND,
GS_FTRACE_STR_DEVICES_NOT_IN_COMMON_ZONE,
GS_FTRACE_STR_NO_ROUTE_BW_PORTS,
GS_FTRACE_STR_NO_ADDL_EXPLN,
GS_FTRACE_STR_FABRIC_BUSY,
GS_FTRACE_STR_FABRIC_BUILD_IN_PROGRESS,
GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_START = 0xf0,
GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_END = 0xff,
};
/*
* Ftrace Request
*/
struct fcgs_ftrace_req_s{
u32 revision;
u16 src_port_tag; /* Source Port tag */
u16 src_port_len; /* Source Port len */
union fcgs_port_val_u src_port_val; /* Source Port value */
u16 dst_port_tag; /* Destination Port tag */
u16 dst_port_len; /* Destination Port len */
union fcgs_port_val_u dst_port_val; /* Destination Port value */
u32 token;
u8 vendor_id[8]; /* T10 Vendor Identifier */
u8 vendor_info[8]; /* Vendor specific Info */
u32 max_hop_cnt; /* Max Hop Count */
};
/*
* Path info structure
*/
struct fcgs_ftrace_path_info_s{
wwn_t switch_name; /* Switch WWN */
u32 domain_id;
wwn_t ingress_port_name; /* Ingress ports wwn */
u32 ingress_phys_port_num; /* Ingress ports physical port
* number
*/
wwn_t egress_port_name; /* Ingress ports wwn */
u32 egress_phys_port_num; /* Ingress ports physical port
* number
*/
};
/*
* Ftrace Acc Response
*/
struct fcgs_ftrace_resp_s{
u32 revision;
u32 token;
u8 vendor_id[8]; /* T10 Vendor Identifier */
u8 vendor_info[8]; /* Vendor specific Info */
u32 str_rej_reason_code; /* STR Reject Reason Code */
u32 num_path_info_entries; /* No. of path info entries */
/*
* path info entry/entries.
*/
struct fcgs_ftrace_path_info_s path_info[1];
};
/*
* Fabric Config Server : FCPing
*/
/*
* FC Ping Request
*/
struct fcgs_fcping_req_s{
u32 revision;
u16 port_tag;
u16 port_len; /* Port len */
union fcgs_port_val_u port_val; /* Port value */
u32 token;
};
/*
* FC Ping Response
*/
struct fcgs_fcping_resp_s{
u32 token;
};
/*
* Command codes for zone server query.
*/
enum {
ZS_GZME = 0x0124, /* Get zone member extended */
};
/*
* ZS GZME request
*/
#define ZS_GZME_ZNAMELEN 32
struct zs_gzme_req_s{
u8 znamelen;
u8 rsvd[3];
u8 zname[ZS_GZME_ZNAMELEN];
};
enum zs_mbr_type{
ZS_MBR_TYPE_PWWN = 1,
ZS_MBR_TYPE_DOMPORT = 2,
ZS_MBR_TYPE_PORTID = 3,
ZS_MBR_TYPE_NWWN = 4,
};
struct zs_mbr_wwn_s{
u8 mbr_type;
u8 rsvd[3];
wwn_t wwn;
};
struct zs_query_resp_s{
u32 nmbrs; /* number of zone members */
struct zs_mbr_wwn_s mbr[1];
};
/*
* GMAL Command ( Get ( interconnect Element) Management Address List)
* To retrieve the IP Address of a Switch.
*/
#define CT_GMAL_RESP_PREFIX_TELNET "telnet://"
#define CT_GMAL_RESP_PREFIX_HTTP "http://"
/* GMAL/GFN request */
struct fcgs_req_s {
wwn_t wwn; /* PWWN/NWWN */
};
#define fcgs_gmal_req_t struct fcgs_req_s
#define fcgs_gfn_req_t struct fcgs_req_s
/* Accept Response to GMAL */
struct fcgs_gmal_resp_s {
u32 ms_len; /* Num of entries */
u8 ms_ma[256];
};
struct fc_gmal_entry_s {
u8 len;
u8 prefix[7]; /* like "http://" */
u8 ip_addr[248];
};
#pragma pack()
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,224 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __FC_SP_H__
#define __FC_SP_H__
#include <protocol/types.h>
#pragma pack(1)
enum auth_els_flags{
FC_AUTH_ELS_MORE_FRAGS_FLAG = 0x80, /*! bit-7. More Fragments
* Follow
*/
FC_AUTH_ELS_CONCAT_FLAG = 0x40, /*! bit-6. Concatenation Flag */
FC_AUTH_ELS_SEQ_NUM_FLAG = 0x01 /*! bit-0. Sequence Number */
};
enum auth_msg_codes{
FC_AUTH_MC_AUTH_RJT = 0x0A, /*! Auth Reject */
FC_AUTH_MC_AUTH_NEG = 0x0B, /*! Auth Negotiate */
FC_AUTH_MC_AUTH_DONE = 0x0C, /*! Auth Done */
FC_AUTH_MC_DHCHAP_CHAL = 0x10, /*! DHCHAP Challenge */
FC_AUTH_MC_DHCHAP_REPLY = 0x11, /*! DHCHAP Reply */
FC_AUTH_MC_DHCHAP_SUCC = 0x12, /*! DHCHAP Success */
FC_AUTH_MC_FCAP_REQ = 0x13, /*! FCAP Request */
FC_AUTH_MC_FCAP_ACK = 0x14, /*! FCAP Acknowledge */
FC_AUTH_MC_FCAP_CONF = 0x15, /*! FCAP Confirm */
FC_AUTH_MC_FCPAP_INIT = 0x16, /*! FCPAP Init */
FC_AUTH_MC_FCPAP_ACC = 0x17, /*! FCPAP Accept */
FC_AUTH_MC_FCPAP_COMP = 0x18, /*! FCPAP Complete */
FC_AUTH_MC_IKE_SA_INIT = 0x22, /*! IKE SA INIT */
FC_AUTH_MC_IKE_SA_AUTH = 0x23, /*! IKE SA Auth */
FC_AUTH_MC_IKE_CREATE_CHILD_SA = 0x24, /*! IKE Create Child SA */
FC_AUTH_MC_IKE_INFO = 0x25, /*! IKE informational */
};
enum auth_proto_version{
FC_AUTH_PROTO_VER_1 = 1, /*! Protocol Version 1 */
};
enum {
FC_AUTH_ELS_COMMAND_CODE = 0x90,/*! Authentication ELS Command code */
FC_AUTH_PROTO_PARAM_LEN_SZ = 4, /*! Size of Proto Parameter Len Field */
FC_AUTH_PROTO_PARAM_VAL_SZ = 4, /*! Size of Proto Parameter Val Field */
FC_MAX_AUTH_SECRET_LEN = 256,
/*! Maximum secret string length */
FC_AUTH_NUM_USABLE_PROTO_LEN_SZ = 4,
/*! Size of usable protocols field */
FC_AUTH_RESP_VALUE_LEN_SZ = 4,
/*! Size of response value length */
FC_MAX_CHAP_KEY_LEN = 256, /*! Maximum md5 digest length */
FC_MAX_AUTH_RETRIES = 3, /*! Maximum number of retries */
FC_MD5_DIGEST_LEN = 16, /*! MD5 digest length */
FC_SHA1_DIGEST_LEN = 20, /*! SHA1 digest length */
FC_MAX_DHG_SUPPORTED = 1, /*! Maximum DH Groups supported */
FC_MAX_ALG_SUPPORTED = 1, /*! Maximum algorithms supported */
FC_MAX_PROTO_SUPPORTED = 1, /*! Maximum protocols supported */
FC_START_TXN_ID = 2, /*! Starting transaction ID */
};
enum auth_proto_id{
FC_AUTH_PROTO_DHCHAP = 0x00000001,
FC_AUTH_PROTO_FCAP = 0x00000002,
FC_AUTH_PROTO_FCPAP = 0x00000003,
FC_AUTH_PROTO_IKEv2 = 0x00000004,
FC_AUTH_PROTO_IKEv2_AUTH = 0x00000005,
};
struct auth_name_s{
u16 name_tag; /*! Name Tag = 1 for Authentication */
u16 name_len; /*! Name Length = 8 for Authentication
*/
wwn_t name; /*! Name. TODO - is this PWWN */
};
enum auth_hash_func{
FC_AUTH_HASH_FUNC_MD5 = 0x00000005,
FC_AUTH_HASH_FUNC_SHA_1 = 0x00000006,
};
enum auth_dh_gid{
FC_AUTH_DH_GID_0_DHG_NULL = 0x00000000,
FC_AUTH_DH_GID_1_DHG_1024 = 0x00000001,
FC_AUTH_DH_GID_2_DHG_1280 = 0x00000002,
FC_AUTH_DH_GID_3_DHG_1536 = 0x00000003,
FC_AUTH_DH_GID_4_DHG_2048 = 0x00000004,
FC_AUTH_DH_GID_6_DHG_3072 = 0x00000006,
FC_AUTH_DH_GID_7_DHG_4096 = 0x00000007,
FC_AUTH_DH_GID_8_DHG_6144 = 0x00000008,
FC_AUTH_DH_GID_9_DHG_8192 = 0x00000009,
};
struct auth_els_msg_s {
u8 auth_els_code; /* Authentication ELS Code (0x90) */
u8 auth_els_flag; /* Authentication ELS Flags */
u8 auth_msg_code; /* Authentication Message Code */
u8 proto_version; /* Protocol Version */
u32 msg_len; /* Message Length */
u32 trans_id; /* Transaction Identifier (T_ID) */
/* Msg payload follows... */
};
enum auth_neg_param_tags {
FC_AUTH_NEG_DHCHAP_HASHLIST = 0x0001,
FC_AUTH_NEG_DHCHAP_DHG_ID_LIST = 0x0002,
};
struct dhchap_param_format_s {
u16 tag; /*! Parameter Tag. See
* auth_neg_param_tags_t
*/
u16 word_cnt;
/* followed by variable length parameter value... */
};
struct auth_proto_params_s {
u32 proto_param_len;
u32 proto_id;
/*
* Followed by variable length Protocol specific parameters. DH-CHAP
* uses dhchap_param_format_t
*/
};
struct auth_neg_msg_s {
struct auth_name_s auth_ini_name;
u32 usable_auth_protos;
struct auth_proto_params_s proto_params[1]; /*! (1..usable_auth_proto)
* protocol params
*/
};
struct auth_dh_val_s {
u32 dh_val_len;
u32 dh_val[1];
};
struct auth_dhchap_chal_msg_s {
struct auth_els_msg_s hdr;
struct auth_name_s auth_responder_name; /* TODO VRK - is auth_name_t
* type OK?
*/
u32 hash_id;
u32 dh_grp_id;
u32 chal_val_len;
char chal_val[1];
/* ...followed by variable Challenge length/value and DH length/value */
};
enum auth_rjt_codes {
FC_AUTH_RJT_CODE_AUTH_FAILURE = 0x01,
FC_AUTH_RJT_CODE_LOGICAL_ERR = 0x02,
};
enum auth_rjt_code_exps {
FC_AUTH_CEXP_AUTH_MECH_NOT_USABLE = 0x01,
FC_AUTH_CEXP_DH_GROUP_NOT_USABLE = 0x02,
FC_AUTH_CEXP_HASH_FUNC_NOT_USABLE = 0x03,
FC_AUTH_CEXP_AUTH_XACT_STARTED = 0x04,
FC_AUTH_CEXP_AUTH_FAILED = 0x05,
FC_AUTH_CEXP_INCORRECT_PLD = 0x06,
FC_AUTH_CEXP_INCORRECT_PROTO_MSG = 0x07,
FC_AUTH_CEXP_RESTART_AUTH_PROTO = 0x08,
FC_AUTH_CEXP_AUTH_CONCAT_NOT_SUPP = 0x09,
FC_AUTH_CEXP_PROTO_VER_NOT_SUPP = 0x0A,
};
enum auth_status {
FC_AUTH_STATE_INPROGRESS = 0, /*! authentication in progress */
FC_AUTH_STATE_FAILED = 1, /*! authentication failed */
FC_AUTH_STATE_SUCCESS = 2 /*! authentication successful */
};
struct auth_rjt_msg_s {
struct auth_els_msg_s hdr;
u8 reason_code;
u8 reason_code_exp;
u8 rsvd[2];
};
struct auth_dhchap_neg_msg_s {
struct auth_els_msg_s hdr;
struct auth_neg_msg_s nego;
};
struct auth_dhchap_reply_msg_s {
struct auth_els_msg_s hdr;
/*
* followed by response value length & Value + DH Value Length & Value
*/
};
#pragma pack()
#endif /* __FC_SP_H__ */

View File

@@ -0,0 +1,186 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __FCPPROTO_H__
#define __FCPPROTO_H__
#include <protocol/scsi.h>
#pragma pack(1)
enum {
FCP_RJT = 0x01000000, /* SRR reject */
FCP_SRR_ACCEPT = 0x02000000, /* SRR accept */
FCP_SRR = 0x14000000, /* Sequence Retransmission Request */
};
/*
* SRR FC-4 LS payload
*/
struct fc_srr_s{
u32 ls_cmd;
u32 ox_id:16; /* ox-id */
u32 rx_id:16; /* rx-id */
u32 ro; /* relative offset */
u32 r_ctl:8; /* R_CTL for I.U. */
u32 res:24;
};
/*
* FCP_CMND definitions
*/
#define FCP_CMND_CDB_LEN 16
#define FCP_CMND_LUN_LEN 8
struct fcp_cmnd_s{
lun_t lun; /* 64-bit LU number */
u8 crn; /* command reference number */
#ifdef __BIGENDIAN
u8 resvd:1,
priority:4, /* FCP-3: SAM-3 priority */
taskattr:3; /* scsi task attribute */
#else
u8 taskattr:3, /* scsi task attribute */
priority:4, /* FCP-3: SAM-3 priority */
resvd:1;
#endif
u8 tm_flags; /* task management flags */
#ifdef __BIGENDIAN
u8 addl_cdb_len:6, /* additional CDB length words */
iodir:2; /* read/write FCP_DATA IUs */
#else
u8 iodir:2, /* read/write FCP_DATA IUs */
addl_cdb_len:6; /* additional CDB length */
#endif
struct scsi_cdb_s cdb;
/*
* !!! additional cdb bytes follows here!!!
*/
u32 fcp_dl; /* bytes to be transferred */
};
#define fcp_cmnd_cdb_len(_cmnd) ((_cmnd)->addl_cdb_len * 4 + FCP_CMND_CDB_LEN)
#define fcp_cmnd_fcpdl(_cmnd) ((&(_cmnd)->fcp_dl)[(_cmnd)->addl_cdb_len])
/*
* fcp_cmnd_t.iodir field values
*/
enum fcp_iodir{
FCP_IODIR_NONE = 0,
FCP_IODIR_WRITE = 1,
FCP_IODIR_READ = 2,
FCP_IODIR_RW = 3,
};
/*
* Task attribute field
*/
enum {
FCP_TASK_ATTR_SIMPLE = 0,
FCP_TASK_ATTR_HOQ = 1,
FCP_TASK_ATTR_ORDERED = 2,
FCP_TASK_ATTR_ACA = 4,
FCP_TASK_ATTR_UNTAGGED = 5, /* obsolete in FCP-3 */
};
/*
* Task management flags field - only one bit shall be set
*/
#ifndef BIT
#define BIT(_x) (1 << (_x))
#endif
enum fcp_tm_cmnd{
FCP_TM_ABORT_TASK_SET = BIT(1),
FCP_TM_CLEAR_TASK_SET = BIT(2),
FCP_TM_LUN_RESET = BIT(4),
FCP_TM_TARGET_RESET = BIT(5), /* obsolete in FCP-3 */
FCP_TM_CLEAR_ACA = BIT(6),
};
/*
* FCP_XFER_RDY IU defines
*/
struct fcp_xfer_rdy_s{
u32 data_ro;
u32 burst_len;
u32 reserved;
};
/*
* FCP_RSP residue flags
*/
enum fcp_residue{
FCP_NO_RESIDUE = 0, /* no residue */
FCP_RESID_OVER = 1, /* more data left that was not sent */
FCP_RESID_UNDER = 2, /* less data than requested */
};
enum {
FCP_RSPINFO_GOOD = 0,
FCP_RSPINFO_DATALEN_MISMATCH = 1,
FCP_RSPINFO_CMND_INVALID = 2,
FCP_RSPINFO_ROLEN_MISMATCH = 3,
FCP_RSPINFO_TM_NOT_SUPP = 4,
FCP_RSPINFO_TM_FAILED = 5,
};
struct fcp_rspinfo_s{
u32 res0:24;
u32 rsp_code:8; /* response code (as above) */
u32 res1;
};
struct fcp_resp_s{
u32 reserved[2]; /* 2 words reserved */
u16 reserved2;
#ifdef __BIGENDIAN
u8 reserved3:3;
u8 fcp_conf_req:1; /* FCP_CONF is requested */
u8 resid_flags:2; /* underflow/overflow */
u8 sns_len_valid:1;/* sense len is valid */
u8 rsp_len_valid:1;/* response len is valid */
#else
u8 rsp_len_valid:1;/* response len is valid */
u8 sns_len_valid:1;/* sense len is valid */
u8 resid_flags:2; /* underflow/overflow */
u8 fcp_conf_req:1; /* FCP_CONF is requested */
u8 reserved3:3;
#endif
u8 scsi_status; /* one byte SCSI status */
u32 residue; /* residual data bytes */
u32 sns_len; /* length od sense info */
u32 rsp_len; /* length of response info */
};
#define fcp_snslen(__fcprsp) ((__fcprsp)->sns_len_valid ? \
(__fcprsp)->sns_len : 0)
#define fcp_rsplen(__fcprsp) ((__fcprsp)->rsp_len_valid ? \
(__fcprsp)->rsp_len : 0)
#define fcp_rspinfo(__fcprsp) ((struct fcp_rspinfo_s *)((__fcprsp) + 1))
#define fcp_snsinfo(__fcprsp) (((u8 *)fcp_rspinfo(__fcprsp)) + \
fcp_rsplen(__fcprsp))
struct fcp_cmnd_fr_s{
struct fchs_s fchs;
struct fcp_cmnd_s fcp;
};
#pragma pack()
#endif

View File

@@ -0,0 +1,163 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __FDMI_H__
#define __FDMI_H__
#include <protocol/types.h>
#include <protocol/fc.h>
#include <protocol/ct.h>
#pragma pack(1)
/*
* FDMI Command Codes
*/
#define FDMI_GRHL 0x0100
#define FDMI_GHAT 0x0101
#define FDMI_GRPL 0x0102
#define FDMI_GPAT 0x0110
#define FDMI_RHBA 0x0200
#define FDMI_RHAT 0x0201
#define FDMI_RPRT 0x0210
#define FDMI_RPA 0x0211
#define FDMI_DHBA 0x0300
#define FDMI_DPRT 0x0310
/*
* FDMI reason codes
*/
#define FDMI_NO_ADDITIONAL_EXP 0x00
#define FDMI_HBA_ALREADY_REG 0x10
#define FDMI_HBA_ATTRIB_NOT_REG 0x11
#define FDMI_HBA_ATTRIB_MULTIPLE 0x12
#define FDMI_HBA_ATTRIB_LENGTH_INVALID 0x13
#define FDMI_HBA_ATTRIB_NOT_PRESENT 0x14
#define FDMI_PORT_ORIG_NOT_IN_LIST 0x15
#define FDMI_PORT_HBA_NOT_IN_LIST 0x16
#define FDMI_PORT_ATTRIB_NOT_REG 0x20
#define FDMI_PORT_NOT_REG 0x21
#define FDMI_PORT_ATTRIB_MULTIPLE 0x22
#define FDMI_PORT_ATTRIB_LENGTH_INVALID 0x23
#define FDMI_PORT_ALREADY_REGISTEREED 0x24
/*
* FDMI Transmission Speed Mask values
*/
#define FDMI_TRANS_SPEED_1G 0x00000001
#define FDMI_TRANS_SPEED_2G 0x00000002
#define FDMI_TRANS_SPEED_10G 0x00000004
#define FDMI_TRANS_SPEED_4G 0x00000008
#define FDMI_TRANS_SPEED_8G 0x00000010
#define FDMI_TRANS_SPEED_16G 0x00000020
#define FDMI_TRANS_SPEED_UNKNOWN 0x00008000
/*
* FDMI HBA attribute types
*/
enum fdmi_hba_attribute_type {
FDMI_HBA_ATTRIB_NODENAME = 1, /* 0x0001 */
FDMI_HBA_ATTRIB_MANUFACTURER, /* 0x0002 */
FDMI_HBA_ATTRIB_SERIALNUM, /* 0x0003 */
FDMI_HBA_ATTRIB_MODEL, /* 0x0004 */
FDMI_HBA_ATTRIB_MODEL_DESC, /* 0x0005 */
FDMI_HBA_ATTRIB_HW_VERSION, /* 0x0006 */
FDMI_HBA_ATTRIB_DRIVER_VERSION, /* 0x0007 */
FDMI_HBA_ATTRIB_ROM_VERSION, /* 0x0008 */
FDMI_HBA_ATTRIB_FW_VERSION, /* 0x0009 */
FDMI_HBA_ATTRIB_OS_NAME, /* 0x000A */
FDMI_HBA_ATTRIB_MAX_CT, /* 0x000B */
FDMI_HBA_ATTRIB_MAX_TYPE
};
/*
* FDMI Port attribute types
*/
enum fdmi_port_attribute_type {
FDMI_PORT_ATTRIB_FC4_TYPES = 1, /* 0x0001 */
FDMI_PORT_ATTRIB_SUPP_SPEED, /* 0x0002 */
FDMI_PORT_ATTRIB_PORT_SPEED, /* 0x0003 */
FDMI_PORT_ATTRIB_FRAME_SIZE, /* 0x0004 */
FDMI_PORT_ATTRIB_DEV_NAME, /* 0x0005 */
FDMI_PORT_ATTRIB_HOST_NAME, /* 0x0006 */
FDMI_PORT_ATTR_MAX_TYPE
};
/*
* FDMI attribute
*/
struct fdmi_attr_s {
u16 type;
u16 len;
u8 value[1];
};
/*
* HBA Attribute Block
*/
struct fdmi_hba_attr_s {
u32 attr_count; /* # of attributes */
struct fdmi_attr_s hba_attr; /* n attributes */
};
/*
* Registered Port List
*/
struct fdmi_port_list_s {
u32 num_ports; /* number Of Port Entries */
wwn_t port_entry; /* one or more */
};
/*
* Port Attribute Block
*/
struct fdmi_port_attr_s {
u32 attr_count; /* # of attributes */
struct fdmi_attr_s port_attr; /* n attributes */
};
/*
* FDMI Register HBA Attributes
*/
struct fdmi_rhba_s {
wwn_t hba_id; /* HBA Identifier */
struct fdmi_port_list_s port_list; /* Registered Port List */
struct fdmi_hba_attr_s hba_attr_blk; /* HBA attribute block */
};
/*
* FDMI Register Port
*/
struct fdmi_rprt_s {
wwn_t hba_id; /* HBA Identifier */
wwn_t port_name; /* Port wwn */
struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */
};
/*
* FDMI Register Port Attributes
*/
struct fdmi_rpa_s {
wwn_t port_name; /* port wwn */
struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */
};
#pragma pack()
#endif

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
/**
* pcifw.h PCI FW related headers
*/
#ifndef __PCIFW_H__
#define __PCIFW_H__
#pragma pack(1)
struct pnp_hdr_s{
u32 signature; /* "$PnP" */
u8 rev; /* Struct revision */
u8 len; /* Header structure len in multiples
* of 16 bytes */
u16 off; /* Offset to next header 00 if none */
u8 rsvd; /* Reserved byte */
u8 cksum; /* 8-bit checksum for this header */
u32 pnp_dev_id; /* PnP Device Id */
u16 mfstr; /* Pointer to manufacturer string */
u16 prstr; /* Pointer to product string */
u8 devtype[3]; /* Device Type Code */
u8 devind; /* Device Indicator */
u16 bcventr; /* Bootstrap entry vector */
u16 rsvd2; /* Reserved */
u16 sriv; /* Static resource information vector */
};
struct pci_3_0_ds_s{
u32 sig; /* Signature "PCIR" */
u16 vendid; /* Vendor ID */
u16 devid; /* Device ID */
u16 devlistoff; /* Device List Offset */
u16 len; /* PCI Data Structure Length */
u8 rev; /* PCI Data Structure Revision */
u8 clcode[3]; /* Class Code */
u16 imglen; /* Code image length in multiples of
* 512 bytes */
u16 coderev; /* Revision level of code/data */
u8 codetype; /* Code type 0x00 - BIOS */
u8 indr; /* Last image indicator */
u16 mrtimglen; /* Max Run Time Image Length */
u16 cuoff; /* Config Utility Code Header Offset */
u16 dmtfclp; /* DMTF CLP entry point offset */
};
struct pci_optrom_hdr_s{
u16 sig; /* Signature 0x55AA */
u8 len; /* Option ROM length in units of 512 bytes */
u8 inivec[3]; /* Initialization vector */
u8 rsvd[16]; /* Reserved field */
u16 verptr; /* Pointer to version string - private */
u16 pcids; /* Pointer to PCI data structure */
u16 pnphdr; /* Pointer to PnP expansion header */
};
#pragma pack()
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
/**
* types.h Protocol defined base types
*/
#ifndef __TYPES_H__
#define __TYPES_H__
#include <bfa_os_inc.h>
#define wwn_t u64
#define lun_t u64
#define WWN_NULL (0)
#define FC_SYMNAME_MAX 256 /* max name server symbolic name size */
#define FC_ALPA_MAX 128
#pragma pack(1)
#define MAC_ADDRLEN (6)
struct mac_s { u8 mac[MAC_ADDRLEN]; };
#define mac_t struct mac_s
#pragma pack()
#endif