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

📄 lpfc_hw.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 5 页
字号:
 */typedef struct {	struct lpfc_name PortName;} HBA_IDENTIFIER;/* * Registered Port List Format */typedef struct {	uint32_t EntryCnt;	PORT_ENTRY pe;		/* Variable-length array */} REG_PORT_LIST;/* * Register HBA(RHBA) */typedef struct {	HBA_IDENTIFIER hi;	REG_PORT_LIST rpl;	/* variable-length array *//* ATTRIBUTE_BLOCK   ab; */} REG_HBA;/* * Register HBA Attributes (RHAT) */typedef struct {	struct lpfc_name HBA_PortName;	ATTRIBUTE_BLOCK ab;} REG_HBA_ATTRIBUTE;/* * Register Port Attributes (RPA) */typedef struct {	struct lpfc_name PortName;	ATTRIBUTE_BLOCK ab;} REG_PORT_ATTRIBUTE;/* * Get Registered HBA List (GRHL) Accept Payload Format */typedef struct {	uint32_t HBA__Entry_Cnt; /* Number of Registered HBA Identifiers */	struct lpfc_name HBA_PortName;	/* Variable-length array */} GRHL_ACC_PAYLOAD;/* * Get Registered Port List (GRPL) Accept Payload Format */typedef struct {	uint32_t RPL_Entry_Cnt;	/* Number of Registered Port Entries */	PORT_ENTRY Reg_Port_Entry[1];	/* Variable-length array */} GRPL_ACC_PAYLOAD;/* * Get Port Attributes (GPAT) Accept Payload Format */typedef struct {	ATTRIBUTE_BLOCK pab;} GPAT_ACC_PAYLOAD;/* *  Begin HBA configuration parameters. *  The PCI configuration register BAR assignments are: *  BAR0, offset 0x10 - SLIM base memory address *  BAR1, offset 0x14 - SLIM base memory high address *  BAR2, offset 0x18 - REGISTER base memory address *  BAR3, offset 0x1c - REGISTER base memory high address *  BAR4, offset 0x20 - BIU I/O registers *  BAR5, offset 0x24 - REGISTER base io high address *//* Number of rings currently used and available. */#define MAX_CONFIGURED_RINGS     3#define MAX_RINGS                4/* IOCB / Mailbox is owned by FireFly */#define OWN_CHIP        1/* IOCB / Mailbox is owned by Host */#define OWN_HOST        0/* Number of 4-byte words in an IOCB. */#define IOCB_WORD_SZ    8/* defines for type field in fc header */#define FC_ELS_DATA     0x1#define FC_LLC_SNAP     0x5#define FC_FCP_DATA     0x8#define FC_COMMON_TRANSPORT_ULP 0x20/* defines for rctl field in fc header */#define FC_DEV_DATA     0x0#define FC_UNSOL_CTL    0x2#define FC_SOL_CTL      0x3#define FC_UNSOL_DATA   0x4#define FC_FCP_CMND     0x6#define FC_ELS_REQ      0x22#define FC_ELS_RSP      0x23/* network headers for Dfctl field */#define FC_NET_HDR      0x20/* Start FireFly Register definitions */#define PCI_VENDOR_ID_EMULEX        0x10df#define PCI_DEVICE_ID_FIREFLY       0x1ae5#define PCI_DEVICE_ID_SUPERFLY      0xf700#define PCI_DEVICE_ID_DRAGONFLY     0xf800#define PCI_DEVICE_ID_RFLY          0xf095#define PCI_DEVICE_ID_PFLY          0xf098#define PCI_DEVICE_ID_TFLY          0xf0a5#define PCI_DEVICE_ID_CENTAUR       0xf900#define PCI_DEVICE_ID_PEGASUS       0xf980#define PCI_DEVICE_ID_THOR          0xfa00#define PCI_DEVICE_ID_VIPER         0xfb00#define PCI_DEVICE_ID_HELIOS        0xfd00#define PCI_DEVICE_ID_BMID          0xf0d5#define PCI_DEVICE_ID_BSMB          0xf0d1#define PCI_DEVICE_ID_ZEPHYR        0xfe00#define PCI_DEVICE_ID_ZMID          0xf0e5#define PCI_DEVICE_ID_ZSMB          0xf0e1#define PCI_DEVICE_ID_LP101	    0xf0a1#define PCI_DEVICE_ID_LP10000S	    0xfc00#define JEDEC_ID_ADDRESS            0x0080001c#define FIREFLY_JEDEC_ID            0x1ACC#define SUPERFLY_JEDEC_ID           0x0020#define DRAGONFLY_JEDEC_ID          0x0021#define DRAGONFLY_V2_JEDEC_ID       0x0025#define CENTAUR_2G_JEDEC_ID         0x0026#define CENTAUR_1G_JEDEC_ID         0x0028#define PEGASUS_ORION_JEDEC_ID      0x0036#define PEGASUS_JEDEC_ID            0x0038#define THOR_JEDEC_ID               0x0012#define HELIOS_JEDEC_ID             0x0364#define ZEPHYR_JEDEC_ID             0x0577#define VIPER_JEDEC_ID              0x4838#define JEDEC_ID_MASK               0x0FFFF000#define JEDEC_ID_SHIFT              12#define FC_JEDEC_ID(id)             ((id & JEDEC_ID_MASK) >> JEDEC_ID_SHIFT)typedef struct {		/* FireFly BIU registers */	uint32_t hostAtt;	/* See definitions for Host Attention				   register */	uint32_t chipAtt;	/* See definitions for Chip Attention				   register */	uint32_t hostStatus;	/* See definitions for Host Status register */	uint32_t hostControl;	/* See definitions for Host Control register */	uint32_t buiConfig;	/* See definitions for BIU configuration				   register */} FF_REGS;/* IO Register size in bytes */#define FF_REG_AREA_SIZE       256/* Host Attention Register */#define HA_REG_OFFSET  0	/* Byte offset from register base address */#define HA_R0RE_REQ    0x00000001	/* Bit  0 */#define HA_R0CE_RSP    0x00000002	/* Bit  1 */#define HA_R0ATT       0x00000008	/* Bit  3 */#define HA_R1RE_REQ    0x00000010	/* Bit  4 */#define HA_R1CE_RSP    0x00000020	/* Bit  5 */#define HA_R1ATT       0x00000080	/* Bit  7 */#define HA_R2RE_REQ    0x00000100	/* Bit  8 */#define HA_R2CE_RSP    0x00000200	/* Bit  9 */#define HA_R2ATT       0x00000800	/* Bit 11 */#define HA_R3RE_REQ    0x00001000	/* Bit 12 */#define HA_R3CE_RSP    0x00002000	/* Bit 13 */#define HA_R3ATT       0x00008000	/* Bit 15 */#define HA_LATT        0x20000000	/* Bit 29 */#define HA_MBATT       0x40000000	/* Bit 30 */#define HA_ERATT       0x80000000	/* Bit 31 */#define HA_RXRE_REQ    0x00000001	/* Bit  0 */#define HA_RXCE_RSP    0x00000002	/* Bit  1 */#define HA_RXATT       0x00000008	/* Bit  3 */#define HA_RXMASK      0x0000000f/* Chip Attention Register */#define CA_REG_OFFSET  4	/* Byte offset from register base address */#define CA_R0CE_REQ    0x00000001	/* Bit  0 */#define CA_R0RE_RSP    0x00000002	/* Bit  1 */#define CA_R0ATT       0x00000008	/* Bit  3 */#define CA_R1CE_REQ    0x00000010	/* Bit  4 */#define CA_R1RE_RSP    0x00000020	/* Bit  5 */#define CA_R1ATT       0x00000080	/* Bit  7 */#define CA_R2CE_REQ    0x00000100	/* Bit  8 */#define CA_R2RE_RSP    0x00000200	/* Bit  9 */#define CA_R2ATT       0x00000800	/* Bit 11 */#define CA_R3CE_REQ    0x00001000	/* Bit 12 */#define CA_R3RE_RSP    0x00002000	/* Bit 13 */#define CA_R3ATT       0x00008000	/* Bit 15 */#define CA_MBATT       0x40000000	/* Bit 30 *//* Host Status Register */#define HS_REG_OFFSET  8	/* Byte offset from register base address */#define HS_MBRDY       0x00400000	/* Bit 22 */#define HS_FFRDY       0x00800000	/* Bit 23 */#define HS_FFER8       0x01000000	/* Bit 24 */#define HS_FFER7       0x02000000	/* Bit 25 */#define HS_FFER6       0x04000000	/* Bit 26 */#define HS_FFER5       0x08000000	/* Bit 27 */#define HS_FFER4       0x10000000	/* Bit 28 */#define HS_FFER3       0x20000000	/* Bit 29 */#define HS_FFER2       0x40000000	/* Bit 30 */#define HS_FFER1       0x80000000	/* Bit 31 */#define HS_FFERM       0xFF000000	/* Mask for error bits 31:24 *//* Host Control Register */#define HC_REG_OFFSET  12	/* Word offset from register base address */#define HC_MBINT_ENA   0x00000001	/* Bit  0 */#define HC_R0INT_ENA   0x00000002	/* Bit  1 */#define HC_R1INT_ENA   0x00000004	/* Bit  2 */#define HC_R2INT_ENA   0x00000008	/* Bit  3 */#define HC_R3INT_ENA   0x00000010	/* Bit  4 */#define HC_INITHBI     0x02000000	/* Bit 25 */#define HC_INITMB      0x04000000	/* Bit 26 */#define HC_INITFF      0x08000000	/* Bit 27 */#define HC_LAINT_ENA   0x20000000	/* Bit 29 */#define HC_ERINT_ENA   0x80000000	/* Bit 31 *//* Mailbox Commands */#define MBX_SHUTDOWN        0x00	/* terminate testing */#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_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_CONFIG_FARP     0x25#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_REG_LOGIN64     0x93#define MBX_READ_LA64       0x95#define MBX_FLASH_WR_ULA    0x98#define MBX_SET_DEBUG       0x99#define MBX_LOAD_EXP_ROM    0x9C#define MBX_MAX_CMDS        0x9D#define MBX_SLI2_CMD_MASK   0x80/* IOCB Commands */#define CMD_RCV_SEQUENCE_CX     0x01#define CMD_XMIT_SEQUENCE_CR    0x02#define CMD_XMIT_SEQUENCE_CX    0x03#define CMD_XMIT_BCAST_CN       0x04#define CMD_XMIT_BCAST_CX       0x05#define CMD_QUE_RING_BUF_CN     0x06#define CMD_QUE_XRI_BUF_CX      0x07#define CMD_IOCB_CONTINUE_CN    0x08#define CMD_RET_XRI_BUF_CX      0x09#define CMD_ELS_REQUEST_CR      0x0A#define CMD_ELS_REQUEST_CX      0x0B#define CMD_RCV_ELS_REQ_CX      0x0D#define CMD_ABORT_XRI_CN        0x0E#define CMD_ABORT_XRI_CX        0x0F#define CMD_CLOSE_XRI_CN        0x10#define CMD_CLOSE_XRI_CX        0x11#define CMD_CREATE_XRI_CR       0x12#define CMD_CREATE_XRI_CX       0x13#define CMD_GET_RPI_CN          0x14#define CMD_XMIT_ELS_RSP_CX     0x15#define CMD_GET_RPI_CR          0x16#define CMD_XRI_ABORTED_CX      0x17#define CMD_FCP_IWRITE_CR       0x18#define CMD_FCP_IWRITE_CX       0x19#define CMD_FCP_IREAD_CR        0x1A#define CMD_FCP_IREAD_CX        0x1B#define CMD_FCP_ICMND_CR        0x1C#define CMD_FCP_ICMND_CX        0x1D#define CMD_ADAPTER_MSG         0x20#define CMD_ADAPTER_DUMP        0x22/*  SLI_2 IOCB Command Set */#define CMD_RCV_SEQUENCE64_CX   0x81#define CMD_XMIT_SEQUENCE64_CR  0x82#define CMD_XMIT_SEQUENCE64_CX  0x83#define CMD_XMIT_BCAST64_CN     0x84#define CMD_XMIT_BCAST64_CX     0x85#define CMD_QUE_RING_BUF64_CN   0x86#define CMD_QUE_XRI_BUF64_CX    0x87#define CMD_IOCB_CONTINUE64_CN  0x88#define CMD_RET_XRI_BUF64_CX    0x89#define CMD_ELS_REQUEST64_CR    0x8A#define CMD_ELS_REQUEST64_CX    0x8B#define CMD_ABORT_MXRI64_CN     0x8C#define CMD_RCV_ELS_REQ64_CX    0x8D#define CMD_XMIT_ELS_RSP64_CX   0x95#define CMD_FCP_IWRITE64_CR     0x98#define CMD_FCP_IWRITE64_CX     0x99#define CMD_FCP_IREAD64_CR      0x9A#define CMD_FCP_IREAD64_CX      0x9B#define CMD_FCP_ICMND64_CR      0x9C#define CMD_FCP_ICMND64_CX      0x9D#define CMD_GEN_REQUEST64_CR    0xC2#define CMD_GEN_REQUEST64_CX    0xC3#define CMD_MAX_IOCB_CMD        0xE6#define CMD_IOCB_MASK           0xff#define MAX_MSG_DATA            28	/* max msg data in CMD_ADAPTER_MSG					   iocb */#define LPFC_MAX_ADPTMSG         32	/* max msg data *//* *  Define Status */#define MBX_SUCCESS                 0#define MBXERR_NUM_RINGS            1#define MBXERR_NUM_IOCBS            2#define MBXERR_IOCBS_EXCEEDED       3#define MBXERR_BAD_RING_NUMBER      4#define MBXERR_MASK_ENTRIES_RANGE   5#define MBXERR_MASKS_EXCEEDED       6#define MBXERR_BAD_PROFILE          7#define MBXERR_BAD_DEF_CLASS        8#define MBXERR_BAD_MAX_RESPONDER    9#define MBXERR_BAD_MAX_ORIGINATOR   10#define MBXERR_RPI_REGISTERED       11#define MBXERR_RPI_FULL             12#define MBXERR_NO_RESOURCES         13#define MBXERR_BAD_RCV_LENGTH       14#define MBXERR_DMA_ERROR            15#define MBXERR_ERROR                16#define MBX_NOT_FINISHED           255#define MBX_BUSY                   0xffffff /* Attempted cmd to busy Mailbox */#define MBX_TIMEOUT                0xfffffe /* time-out expired waiting for *//* *    Begin Structure Definitions for Mailbox Commands */typedef struct {#ifdef __BIG_ENDIAN_BITFIELD	uint8_t tval;	uint8_t tmask;	uint8_t rval;	uint8_t rmask;#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint8_t rmask;	uint8_t rval;	uint8_t tmask;	uint8_t tval;#endif} RR_REG;struct ulp_bde {	uint32_t bdeAddress;#ifdef __BIG_ENDIAN_BITFIELD	uint32_t bdeReserved:4;	uint32_t bdeAddrHigh:4;	uint32_t bdeSize:24;#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint32_t bdeSize:24;	uint32_t bdeAddrHigh:4;	uint32_t bdeReserved:4;#endif};struct ulp_bde64 {	/* SLI-2 */	union ULP_BDE_TUS {		uint32_t w;		struct {#ifdef __BIG_ENDIAN_BITFIELD			uint32_t bdeFlags:8;	/* BDE Flags 0 IS A SUPPORTED						   VALUE !! */			uint32_t bdeSize:24;	/* Size of buffer (in bytes) */#else	/*  __LITTLE_ENDIAN_BITFIELD */			uint32_t bdeSize:24;	/* Size of buffer (in bytes) */			uint32_t bdeFlags:8;	/* BDE Flags 0 IS A SUPPORTED						   VALUE !! */#endif#define BUFF_USE_RSVD       0x01	/* bdeFlags */#define BUFF_USE_INTRPT     0x02	/* Not Implemented with LP6000 */#define BUFF_USE_CMND       0x04	/* Optional, 1=cmd/rsp 0=data buffer */#define BUFF_USE_RCV        0x08	/*  "" "", 1=rcv buffer, 0=xmit					    buffer */#define BUFF_TYPE_32BIT     0x10	/*  "" "", 1=32 bit addr 0=64 bit					    addr */#define BUFF_TYPE_SPECIAL   0x20	/* Not Implemented with LP6000  */#define BUFF_TYPE_BDL       0x40	/* Optional,  may be set in BDL */#define BUFF_TYPE_INVALID   0x80	/*  ""  "" */		} f;	} tus;	uint32_t addrLow;	uint32_t addrHigh;};#define BDE64_SIZE_WORD 0#define BPL64_SIZE_WORD 0x40typedef struct ULP_BDL {	/* SLI-2 */#ifdef __BIG_ENDIAN_BITFIELD	uint32_t bdeFlags:8;	/* BDL Flags */	uint32_t bdeSize:24;	/* Size of BDL array in host memory (bytes) */#else	/*  __LITTLE_ENDIAN_BITFIELD */	uint32_t bdeSize:24;	/* Size of BDL array in host memory (bytes) */	uint32_t bdeFlags:8;	/* BDL Flags */#endif	uint32_t addrLow;	/* Address 0:31 */	uint32_t addrHigh;	/* Address 32:63 */	uint32_t ulpIoTag32;	/* Can be used for 32 bit I/O Tag */} ULP_BDL;/* Structure for MB Command LOAD_SM and DOWN_LOAD */typedef struct {#ifdef __BIG_ENDIAN_BITFIELD	uint32_t rsvd2:25;	uint32_t acknowledgment:1;	uint32_t version:1;	uint32_t erase_or_prog:1;

⌨️ 快捷键说明

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