⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lpfc_hw.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 5 页
字号:
/******************************************************************* * This file is part of the Emulex Linux Device Driver for         * * Fibre Channel Host Bus Adapters.                                * * Copyright (C) 2004-2005 Emulex.  All rights reserved.           * * EMULEX and SLI are trademarks of Emulex.                        * * www.emulex.com                                                  * *                                                                 * * This program is free software; you can redistribute it and/or   * * modify it under the terms of version 2 of the GNU General       * * Public License as published by the Free Software Foundation.    * * This program is distributed in the hope that it will be useful. * * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          * * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  * * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      * * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * * TO BE LEGALLY INVALID.  See the GNU General Public License for  * * more details, a copy of which can be found in the file COPYING  * * included with this package.                                     * *******************************************************************/#define FDMI_DID        0xfffffaU#define NameServer_DID  0xfffffcU#define SCR_DID         0xfffffdU#define Fabric_DID      0xfffffeU#define Bcast_DID       0xffffffU#define Mask_DID        0xffffffU#define CT_DID_MASK     0xffff00U#define Fabric_DID_MASK 0xfff000U#define WELL_KNOWN_DID_MASK 0xfffff0U#define PT2PT_LocalID	1#define PT2PT_RemoteID	2#define FF_DEF_EDTOV          2000	/* Default E_D_TOV (2000ms) */#define FF_DEF_ALTOV            15	/* Default AL_TIME (15ms) */#define FF_DEF_RATOV             2	/* Default RA_TOV (2s) */#define FF_DEF_ARBTOV         1900	/* Default ARB_TOV (1900ms) */#define LPFC_BUF_RING0        64	/* Number of buffers to post to RING					   0 */#define FCELSSIZE             1024	/* maximum ELS transfer size */#define LPFC_FCP_RING            0	/* ring 0 for FCP initiator commands */#define LPFC_IP_RING             1	/* ring 1 for IP commands */#define LPFC_ELS_RING            2	/* ring 2 for ELS commands */#define LPFC_FCP_NEXT_RING       3#define SLI2_IOCB_CMD_R0_ENTRIES    172	/* SLI-2 FCP command ring entries */#define SLI2_IOCB_RSP_R0_ENTRIES    134	/* SLI-2 FCP response ring entries */#define SLI2_IOCB_CMD_R1_ENTRIES      4	/* SLI-2 IP command ring entries */#define SLI2_IOCB_RSP_R1_ENTRIES      4	/* SLI-2 IP response ring entries */#define SLI2_IOCB_CMD_R1XTRA_ENTRIES 36	/* SLI-2 extra FCP cmd ring entries */#define SLI2_IOCB_RSP_R1XTRA_ENTRIES 52	/* SLI-2 extra FCP rsp ring entries */#define SLI2_IOCB_CMD_R2_ENTRIES     20	/* SLI-2 ELS command ring entries */#define SLI2_IOCB_RSP_R2_ENTRIES     20	/* SLI-2 ELS response ring entries */#define SLI2_IOCB_CMD_R3_ENTRIES      0#define SLI2_IOCB_RSP_R3_ENTRIES      0#define SLI2_IOCB_CMD_R3XTRA_ENTRIES 24#define SLI2_IOCB_RSP_R3XTRA_ENTRIES 32/* Common Transport structures and definitions */union CtRevisionId {	/* Structure is in Big Endian format */	struct {		uint32_t Revision:8;		uint32_t InId:24;	} bits;	uint32_t word;};union CtCommandResponse {	/* Structure is in Big Endian format */	struct {		uint32_t CmdRsp:16;		uint32_t Size:16;	} bits;	uint32_t word;};struct lpfc_sli_ct_request {	/* Structure is in Big Endian format */	union CtRevisionId RevisionId;	uint8_t FsType;	uint8_t FsSubType;	uint8_t Options;	uint8_t Rsrvd1;	union CtCommandResponse CommandResponse;	uint8_t Rsrvd2;	uint8_t ReasonCode;	uint8_t Explanation;	uint8_t VendorUnique;	union {		uint32_t PortID;		struct gid {			uint8_t PortType;	/* for GID_PT requests */			uint8_t DomainScope;			uint8_t AreaScope;			uint8_t Fc4Type;	/* for GID_FT requests */		} gid;		struct rft {			uint32_t PortId;	/* For RFT_ID requests */#ifdef __BIG_ENDIAN_BITFIELD			uint32_t rsvd0:16;			uint32_t rsvd1:7;			uint32_t fcpReg:1;	/* Type 8 */			uint32_t rsvd2:2;			uint32_t ipReg:1;	/* Type 5 */			uint32_t rsvd3:5;#else	/*  __LITTLE_ENDIAN_BITFIELD */			uint32_t rsvd0:16;			uint32_t fcpReg:1;	/* Type 8 */			uint32_t rsvd1:7;			uint32_t rsvd3:5;			uint32_t ipReg:1;	/* Type 5 */			uint32_t rsvd2:2;#endif			uint32_t rsvd[7];		} rft;		struct rnn {			uint32_t PortId;	/* For RNN_ID requests */			uint8_t wwnn[8];		} rnn;		struct rsnn {	/* For RSNN_ID requests */			uint8_t wwnn[8];			uint8_t len;			uint8_t symbname[255];		} rsnn;	} un;};#define  SLI_CT_REVISION        1#define  GID_REQUEST_SZ         (sizeof(struct lpfc_sli_ct_request) - 260)#define  RFT_REQUEST_SZ         (sizeof(struct lpfc_sli_ct_request) - 228)#define  RNN_REQUEST_SZ         (sizeof(struct lpfc_sli_ct_request) - 252)#define  RSNN_REQUEST_SZ        (sizeof(struct lpfc_sli_ct_request))/* * FsType Definitions */#define  SLI_CT_MANAGEMENT_SERVICE        0xFA#define  SLI_CT_TIME_SERVICE              0xFB#define  SLI_CT_DIRECTORY_SERVICE         0xFC#define  SLI_CT_FABRIC_CONTROLLER_SERVICE 0xFD/* * Directory Service Subtypes */#define  SLI_CT_DIRECTORY_NAME_SERVER     0x02/* * Response Codes */#define  SLI_CT_RESPONSE_FS_RJT           0x8001#define  SLI_CT_RESPONSE_FS_ACC           0x8002/* * Reason Codes */#define  SLI_CT_NO_ADDITIONAL_EXPL	  0x0#define  SLI_CT_INVALID_COMMAND           0x01#define  SLI_CT_INVALID_VERSION           0x02#define  SLI_CT_LOGICAL_ERROR             0x03#define  SLI_CT_INVALID_IU_SIZE           0x04#define  SLI_CT_LOGICAL_BUSY              0x05#define  SLI_CT_PROTOCOL_ERROR            0x07#define  SLI_CT_UNABLE_TO_PERFORM_REQ     0x09#define  SLI_CT_REQ_NOT_SUPPORTED         0x0b#define  SLI_CT_HBA_INFO_NOT_REGISTERED	  0x10#define  SLI_CT_MULTIPLE_HBA_ATTR_OF_SAME_TYPE  0x11#define  SLI_CT_INVALID_HBA_ATTR_BLOCK_LEN      0x12#define  SLI_CT_HBA_ATTR_NOT_PRESENT	  0x13#define  SLI_CT_PORT_INFO_NOT_REGISTERED  0x20#define  SLI_CT_MULTIPLE_PORT_ATTR_OF_SAME_TYPE 0x21#define  SLI_CT_INVALID_PORT_ATTR_BLOCK_LEN     0x22#define  SLI_CT_VENDOR_UNIQUE             0xff/* * Name Server SLI_CT_UNABLE_TO_PERFORM_REQ Explanations */#define  SLI_CT_NO_PORT_ID                0x01#define  SLI_CT_NO_PORT_NAME              0x02#define  SLI_CT_NO_NODE_NAME              0x03#define  SLI_CT_NO_CLASS_OF_SERVICE       0x04#define  SLI_CT_NO_IP_ADDRESS             0x05#define  SLI_CT_NO_IPA                    0x06#define  SLI_CT_NO_FC4_TYPES              0x07#define  SLI_CT_NO_SYMBOLIC_PORT_NAME     0x08#define  SLI_CT_NO_SYMBOLIC_NODE_NAME     0x09#define  SLI_CT_NO_PORT_TYPE              0x0A#define  SLI_CT_ACCESS_DENIED             0x10#define  SLI_CT_INVALID_PORT_ID           0x11#define  SLI_CT_DATABASE_EMPTY            0x12/* * Name Server Command Codes */#define  SLI_CTNS_GA_NXT      0x0100#define  SLI_CTNS_GPN_ID      0x0112#define  SLI_CTNS_GNN_ID      0x0113#define  SLI_CTNS_GCS_ID      0x0114#define  SLI_CTNS_GFT_ID      0x0117#define  SLI_CTNS_GSPN_ID     0x0118#define  SLI_CTNS_GPT_ID      0x011A#define  SLI_CTNS_GID_PN      0x0121#define  SLI_CTNS_GID_NN      0x0131#define  SLI_CTNS_GIP_NN      0x0135#define  SLI_CTNS_GIPA_NN     0x0136#define  SLI_CTNS_GSNN_NN     0x0139#define  SLI_CTNS_GNN_IP      0x0153#define  SLI_CTNS_GIPA_IP     0x0156#define  SLI_CTNS_GID_FT      0x0171#define  SLI_CTNS_GID_PT      0x01A1#define  SLI_CTNS_RPN_ID      0x0212#define  SLI_CTNS_RNN_ID      0x0213#define  SLI_CTNS_RCS_ID      0x0214#define  SLI_CTNS_RFT_ID      0x0217#define  SLI_CTNS_RSPN_ID     0x0218#define  SLI_CTNS_RPT_ID      0x021A#define  SLI_CTNS_RIP_NN      0x0235#define  SLI_CTNS_RIPA_NN     0x0236#define  SLI_CTNS_RSNN_NN     0x0239#define  SLI_CTNS_DA_ID       0x0300/* * Port Types */#define  SLI_CTPT_N_PORT      0x01#define  SLI_CTPT_NL_PORT     0x02#define  SLI_CTPT_FNL_PORT    0x03#define  SLI_CTPT_IP          0x04#define  SLI_CTPT_FCP         0x08#define  SLI_CTPT_NX_PORT     0x7F#define  SLI_CTPT_F_PORT      0x81#define  SLI_CTPT_FL_PORT     0x82#define  SLI_CTPT_E_PORT      0x84#define SLI_CT_LAST_ENTRY     0x80000000/* Fibre Channel Service Parameter definitions */#define FC_PH_4_0   6		/* FC-PH version 4.0 */#define FC_PH_4_1   7		/* FC-PH version 4.1 */#define FC_PH_4_2   8		/* FC-PH version 4.2 */#define FC_PH_4_3   9		/* FC-PH version 4.3 */#define FC_PH_LOW   8		/* Lowest supported FC-PH version */#define FC_PH_HIGH  9		/* Highest supported FC-PH version */#define FC_PH3   0x20		/* FC-PH-3 version */#define FF_FRAME_SIZE     2048struct lpfc_name {	union {		struct {#ifdef __BIG_ENDIAN_BITFIELD			uint8_t nameType:4;	/* FC Word 0, bit 28:31 */			uint8_t IEEEextMsn:4;	/* FC Word 0, bit 24:27, bit 8:11 of IEEE ext */#else	/*  __LITTLE_ENDIAN_BITFIELD */			uint8_t IEEEextMsn:4;	/* FC Word 0, bit 24:27, bit 8:11 of IEEE ext */			uint8_t nameType:4;	/* FC Word 0, bit 28:31 */#endif#define NAME_IEEE           0x1	/* IEEE name - nameType */#define NAME_IEEE_EXT       0x2	/* IEEE extended name */#define NAME_FC_TYPE        0x3	/* FC native name type */#define NAME_IP_TYPE        0x4	/* IP address */#define NAME_CCITT_TYPE     0xC#define NAME_CCITT_GR_TYPE  0xE			uint8_t IEEEextLsb;	/* FC Word 0, bit 16:23, IEEE extended Lsb */			uint8_t IEEE[6];	/* FC IEEE address */		} s;		uint8_t wwn[8];	} u;};struct csp {	uint8_t fcphHigh;	/* FC Word 0, byte 0 */	uint8_t fcphLow;	uint8_t bbCreditMsb;	uint8_t bbCreditlsb;	/* FC Word 0, byte 3 */#ifdef __BIG_ENDIAN_BITFIELD	uint16_t increasingOffset:1;	/* FC Word 1, bit 31 */	uint16_t randomOffset:1;	/* FC Word 1, bit 30 */	uint16_t word1Reserved2:1;	/* FC Word 1, bit 29 */	uint16_t fPort:1;	/* FC Word 1, bit 28 */	uint16_t altBbCredit:1;	/* FC Word 1, bit 27 */	uint16_t edtovResolution:1;	/* FC Word 1, bit 26 */	uint16_t multicast:1;	/* FC Word 1, bit 25 */	uint16_t broadcast:1;	/* FC Word 1, bit 24 */	uint16_t huntgroup:1;	/* FC Word 1, bit 23 */	uint16_t simplex:1;	/* FC Word 1, bit 22 */	uint16_t word1Reserved1:3;	/* FC Word 1, bit 21:19 */	uint16_t dhd:1;		/* FC Word 1, bit 18 */	uint16_t contIncSeqCnt:1;	/* FC Word 1, bit 17 */	uint16_t payloadlength:1;	/* FC Word 1, bit 16 */#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint16_t broadcast:1;	/* FC Word 1, bit 24 */	uint16_t multicast:1;	/* FC Word 1, bit 25 */	uint16_t edtovResolution:1;	/* FC Word 1, bit 26 */	uint16_t altBbCredit:1;	/* FC Word 1, bit 27 */	uint16_t fPort:1;	/* FC Word 1, bit 28 */	uint16_t word1Reserved2:1;	/* FC Word 1, bit 29 */	uint16_t randomOffset:1;	/* FC Word 1, bit 30 */	uint16_t increasingOffset:1;	/* FC Word 1, bit 31 */	uint16_t payloadlength:1;	/* FC Word 1, bit 16 */	uint16_t contIncSeqCnt:1;	/* FC Word 1, bit 17 */	uint16_t dhd:1;		/* FC Word 1, bit 18 */	uint16_t word1Reserved1:3;	/* FC Word 1, bit 21:19 */	uint16_t simplex:1;	/* FC Word 1, bit 22 */	uint16_t huntgroup:1;	/* FC Word 1, bit 23 */#endif	uint8_t bbRcvSizeMsb;	/* Upper nibble is reserved */	uint8_t bbRcvSizeLsb;	/* FC Word 1, byte 3 */	union {		struct {			uint8_t word2Reserved1;	/* FC Word 2 byte 0 */			uint8_t totalConcurrSeq;	/* FC Word 2 byte 1 */			uint8_t roByCategoryMsb;	/* FC Word 2 byte 2 */			uint8_t roByCategoryLsb;	/* FC Word 2 byte 3 */		} nPort;		uint32_t r_a_tov;	/* R_A_TOV must be in B.E. format */	} w2;	uint32_t e_d_tov;	/* E_D_TOV must be in B.E. format */};struct class_parms {#ifdef __BIG_ENDIAN_BITFIELD	uint8_t classValid:1;	/* FC Word 0, bit 31 */	uint8_t intermix:1;	/* FC Word 0, bit 30 */	uint8_t stackedXparent:1;	/* FC Word 0, bit 29 */	uint8_t stackedLockDown:1;	/* FC Word 0, bit 28 */	uint8_t seqDelivery:1;	/* FC Word 0, bit 27 */	uint8_t word0Reserved1:3;	/* FC Word 0, bit 24:26 */#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint8_t word0Reserved1:3;	/* FC Word 0, bit 24:26 */	uint8_t seqDelivery:1;	/* FC Word 0, bit 27 */	uint8_t stackedLockDown:1;	/* FC Word 0, bit 28 */	uint8_t stackedXparent:1;	/* FC Word 0, bit 29 */	uint8_t intermix:1;	/* FC Word 0, bit 30 */	uint8_t classValid:1;	/* FC Word 0, bit 31 */#endif	uint8_t word0Reserved2;	/* FC Word 0, bit 16:23 */#ifdef __BIG_ENDIAN_BITFIELD	uint8_t iCtlXidReAssgn:2;	/* FC Word 0, Bit 14:15 */	uint8_t iCtlInitialPa:2;	/* FC Word 0, bit 12:13 */	uint8_t iCtlAck0capable:1;	/* FC Word 0, bit 11 */	uint8_t iCtlAckNcapable:1;	/* FC Word 0, bit 10 */	uint8_t word0Reserved3:2;	/* FC Word 0, bit  8: 9 */#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint8_t word0Reserved3:2;	/* FC Word 0, bit  8: 9 */	uint8_t iCtlAckNcapable:1;	/* FC Word 0, bit 10 */	uint8_t iCtlAck0capable:1;	/* FC Word 0, bit 11 */	uint8_t iCtlInitialPa:2;	/* FC Word 0, bit 12:13 */	uint8_t iCtlXidReAssgn:2;	/* FC Word 0, Bit 14:15 */#endif	uint8_t word0Reserved4;	/* FC Word 0, bit  0: 7 */#ifdef __BIG_ENDIAN_BITFIELD	uint8_t rCtlAck0capable:1;	/* FC Word 1, bit 31 */	uint8_t rCtlAckNcapable:1;	/* FC Word 1, bit 30 */	uint8_t rCtlXidInterlck:1;	/* FC Word 1, bit 29 */	uint8_t rCtlErrorPolicy:2;	/* FC Word 1, bit 27:28 */	uint8_t word1Reserved1:1;	/* FC Word 1, bit 26 */	uint8_t rCtlCatPerSeq:2;	/* FC Word 1, bit 24:25 */#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint8_t rCtlCatPerSeq:2;	/* FC Word 1, bit 24:25 */	uint8_t word1Reserved1:1;	/* FC Word 1, bit 26 */	uint8_t rCtlErrorPolicy:2;	/* FC Word 1, bit 27:28 */	uint8_t rCtlXidInterlck:1;	/* FC Word 1, bit 29 */	uint8_t rCtlAckNcapable:1;	/* FC Word 1, bit 30 */	uint8_t rCtlAck0capable:1;	/* FC Word 1, bit 31 */#endif	uint8_t word1Reserved2;	/* FC Word 1, bit 16:23 */	uint8_t rcvDataSizeMsb;	/* FC Word 1, bit  8:15 */	uint8_t rcvDataSizeLsb;	/* FC Word 1, bit  0: 7 */	uint8_t concurrentSeqMsb;	/* FC Word 2, bit 24:31 */	uint8_t concurrentSeqLsb;	/* FC Word 2, bit 16:23 */	uint8_t EeCreditSeqMsb;	/* FC Word 2, bit  8:15 */	uint8_t EeCreditSeqLsb;	/* FC Word 2, bit  0: 7 */	uint8_t openSeqPerXchgMsb;	/* FC Word 3, bit 24:31 */	uint8_t openSeqPerXchgLsb;	/* FC Word 3, bit 16:23 */	uint8_t word3Reserved1;	/* Fc Word 3, bit  8:15 */	uint8_t word3Reserved2;	/* Fc Word 3, bit  0: 7 */};struct serv_parm {	/* Structure is in Big Endian format */	struct csp cmn;	struct lpfc_name portName;	struct lpfc_name nodeName;	struct class_parms cls1;	struct class_parms cls2;	struct class_parms cls3;	struct class_parms cls4;	uint8_t vendorVersion[16];};/* *  Extended Link Service LS_COMMAND codes (Payload Word 0) */#ifdef __BIG_ENDIAN_BITFIELD#define ELS_CMD_MASK      0xffff0000#define ELS_RSP_MASK      0xff000000#define ELS_CMD_LS_RJT    0x01000000#define ELS_CMD_ACC       0x02000000#define ELS_CMD_PLOGI     0x03000000#define ELS_CMD_FLOGI     0x04000000#define ELS_CMD_LOGO      0x05000000#define ELS_CMD_ABTX      0x06000000#define ELS_CMD_RCS       0x07000000#define ELS_CMD_RES       0x08000000#define ELS_CMD_RSS       0x09000000#define ELS_CMD_RSI       0x0A000000#define ELS_CMD_ESTS      0x0B000000#define ELS_CMD_ESTC      0x0C000000#define ELS_CMD_ADVC      0x0D000000#define ELS_CMD_RTV       0x0E000000#define ELS_CMD_RLS       0x0F000000#define ELS_CMD_ECHO      0x10000000#define ELS_CMD_TEST      0x11000000#define ELS_CMD_RRQ       0x12000000#define ELS_CMD_PRLI      0x20100014#define ELS_CMD_PRLO      0x21100014#define ELS_CMD_PDISC     0x50000000#define ELS_CMD_FDISC     0x51000000#define ELS_CMD_ADISC     0x52000000#define ELS_CMD_FARP      0x54000000#define ELS_CMD_FARPR     0x55000000#define ELS_CMD_FAN       0x60000000#define ELS_CMD_RSCN      0x61040000#define ELS_CMD_SCR       0x62000000#define ELS_CMD_RNID      0x78000000#else	/*  __LITTLE_ENDIAN_BITFIELD */#define ELS_CMD_MASK      0xffff

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -