Path: blob/master/drivers/message/fusion/lsi/mpi_fc.h
15111 views
/*1* Copyright (c) 2000-2008 LSI Corporation.2*3*4* Name: mpi_fc.h5* Title: MPI Fibre Channel messages and structures6* Creation Date: June 12, 20007*8* mpi_fc.h Version: 01.05.019*10* Version History11* ---------------12*13* Date Version Description14* -------- -------- ------------------------------------------------------15* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.16* 06-06-00 01.00.01 Update version number for 1.0 release.17* 06-12-00 01.00.02 Added _MSG_FC_ABORT_REPLY structure.18* 11-02-00 01.01.01 Original release for post 1.0 work19* 12-04-00 01.01.02 Added messages for Common Transport Send and20* Primitive Send.21* 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix22* and modified the FcPrimitiveSend flags.23* 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger24* field.25* Added FC_ABORT_TYPE_CT_SEND_REQUEST and26* FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.27* Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.28* 02-20-01 01.01.05 Started using MPI_POINTER.29* 03-27-01 01.01.06 Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY30* and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.31* Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.32* Added structure offset comments.33* 04-09-01 01.01.07 Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.34* 08-08-01 01.02.01 Original release for v1.2 work.35* 09-28-01 01.02.02 Change name of reserved field in36* MSG_LINK_SERVICE_RSP_REPLY.37* 05-31-02 01.02.03 Adding AliasIndex to FC Direct Access requests.38* 01-16-04 01.02.04 Added define for MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK.39* 05-11-04 01.03.01 Original release for MPI v1.3.40* 08-19-04 01.05.01 Original release for MPI v1.5.41* --------------------------------------------------------------------------42*/4344#ifndef MPI_FC_H45#define MPI_FC_H464748/*****************************************************************************49*50* F C D i r e c t A c c e s s M e s s a g e s51*52*****************************************************************************/5354/****************************************************************************/55/* Link Service Buffer Post messages */56/****************************************************************************/5758typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST59{60U8 BufferPostFlags; /* 00h */61U8 BufferCount; /* 01h */62U8 ChainOffset; /* 02h */63U8 Function; /* 03h */64U16 Reserved; /* 04h */65U8 Reserved1; /* 06h */66U8 MsgFlags; /* 07h */67U32 MsgContext; /* 08h */68SGE_TRANS_SIMPLE_UNION SGL;69} MSG_LINK_SERVICE_BUFFER_POST_REQUEST,70MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST,71LinkServiceBufferPostRequest_t, MPI_POINTER pLinkServiceBufferPostRequest_t;7273#define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)7475typedef struct _WWNFORMAT76{77U32 PortNameHigh; /* 00h */78U32 PortNameLow; /* 04h */79U32 NodeNameHigh; /* 08h */80U32 NodeNameLow; /* 0Ch */81} WWNFORMAT,82WwnFormat_t;8384/* Link Service Buffer Post Reply */85typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY86{87U8 Flags; /* 00h */88U8 Reserved; /* 01h */89U8 MsgLength; /* 02h */90U8 Function; /* 03h */91U16 Reserved1; /* 04h */92U8 PortNumber; /* 06h */93U8 MsgFlags; /* 07h */94U32 MsgContext; /* 08h */95U16 Reserved2; /* 0Ch */96U16 IOCStatus; /* 0Eh */97U32 IOCLogInfo; /* 10h */98U32 TransferLength; /* 14h */99U32 TransactionContext; /* 18h */100U32 Rctl_Did; /* 1Ch */101U32 Csctl_Sid; /* 20h */102U32 Type_Fctl; /* 24h */103U16 SeqCnt; /* 28h */104U8 Dfctl; /* 2Ah */105U8 SeqId; /* 2Bh */106U16 Rxid; /* 2Ch */107U16 Oxid; /* 2Eh */108U32 Parameter; /* 30h */109WWNFORMAT Wwn; /* 34h */110} MSG_LINK_SERVICE_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY,111LinkServiceBufferPostReply_t, MPI_POINTER pLinkServiceBufferPostReply_t;112113#define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED (0x80)114115#define MPI_FC_DID_MASK (0x00FFFFFF)116#define MPI_FC_DID_SHIFT (0)117#define MPI_FC_RCTL_MASK (0xFF000000)118#define MPI_FC_RCTL_SHIFT (24)119#define MPI_FC_SID_MASK (0x00FFFFFF)120#define MPI_FC_SID_SHIFT (0)121#define MPI_FC_CSCTL_MASK (0xFF000000)122#define MPI_FC_CSCTL_SHIFT (24)123#define MPI_FC_FCTL_MASK (0x00FFFFFF)124#define MPI_FC_FCTL_SHIFT (0)125#define MPI_FC_TYPE_MASK (0xFF000000)126#define MPI_FC_TYPE_SHIFT (24)127128/* obsolete name for the above */129#define FCP_TARGET_DID_MASK (0x00FFFFFF)130#define FCP_TARGET_DID_SHIFT (0)131#define FCP_TARGET_RCTL_MASK (0xFF000000)132#define FCP_TARGET_RCTL_SHIFT (24)133#define FCP_TARGET_SID_MASK (0x00FFFFFF)134#define FCP_TARGET_SID_SHIFT (0)135#define FCP_TARGET_CSCTL_MASK (0xFF000000)136#define FCP_TARGET_CSCTL_SHIFT (24)137#define FCP_TARGET_FCTL_MASK (0x00FFFFFF)138#define FCP_TARGET_FCTL_SHIFT (0)139#define FCP_TARGET_TYPE_MASK (0xFF000000)140#define FCP_TARGET_TYPE_SHIFT (24)141142143/****************************************************************************/144/* Link Service Response messages */145/****************************************************************************/146147typedef struct _MSG_LINK_SERVICE_RSP_REQUEST148{149U8 RspFlags; /* 00h */150U8 RspLength; /* 01h */151U8 ChainOffset; /* 02h */152U8 Function; /* 03h */153U16 Reserved1; /* 04h */154U8 Reserved2; /* 06h */155U8 MsgFlags; /* 07h */156U32 MsgContext; /* 08h */157U32 Rctl_Did; /* 0Ch */158U32 Csctl_Sid; /* 10h */159U32 Type_Fctl; /* 14h */160U16 SeqCnt; /* 18h */161U8 Dfctl; /* 1Ah */162U8 SeqId; /* 1Bh */163U16 Rxid; /* 1Ch */164U16 Oxid; /* 1Eh */165U32 Parameter; /* 20h */166SGE_SIMPLE_UNION SGL; /* 24h */167} MSG_LINK_SERVICE_RSP_REQUEST, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST,168LinkServiceRspRequest_t, MPI_POINTER pLinkServiceRspRequest_t;169170#define LINK_SERVICE_RSP_FLAGS_IMMEDIATE (0x80)171#define LINK_SERVICE_RSP_FLAGS_PORT_MASK (0x01)172173174/* Link Service Response Reply */175typedef struct _MSG_LINK_SERVICE_RSP_REPLY176{177U16 Reserved; /* 00h */178U8 MsgLength; /* 02h */179U8 Function; /* 03h */180U16 Reserved1; /* 04h */181U8 Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */182U8 MsgFlags; /* 07h */183U32 MsgContext; /* 08h */184U16 Reserved3; /* 0Ch */185U16 IOCStatus; /* 0Eh */186U32 IOCLogInfo; /* 10h */187U32 InitiatorIndex; /* 14h */188} MSG_LINK_SERVICE_RSP_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY,189LinkServiceRspReply_t, MPI_POINTER pLinkServiceRspReply_t;190191192/****************************************************************************/193/* Extended Link Service Send messages */194/****************************************************************************/195196typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST197{198U8 SendFlags; /* 00h */199U8 AliasIndex; /* 01h */200U8 ChainOffset; /* 02h */201U8 Function; /* 03h */202U32 MsgFlags_Did; /* 04h */203U32 MsgContext; /* 08h */204U32 ElsCommandCode; /* 0Ch */205SGE_SIMPLE_UNION SGL; /* 10h */206} MSG_EXLINK_SERVICE_SEND_REQUEST, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST,207ExLinkServiceSendRequest_t, MPI_POINTER pExLinkServiceSendRequest_t;208209#define EX_LINK_SERVICE_SEND_DID_MASK (0x00FFFFFF)210#define EX_LINK_SERVICE_SEND_DID_SHIFT (0)211#define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK (0xFF000000)212#define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT (24)213214215/* Extended Link Service Send Reply */216typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY217{218U8 Reserved; /* 00h */219U8 AliasIndex; /* 01h */220U8 MsgLength; /* 02h */221U8 Function; /* 03h */222U16 Reserved1; /* 04h */223U8 Reserved2; /* 06h */224U8 MsgFlags; /* 07h */225U32 MsgContext; /* 08h */226U16 Reserved3; /* 0Ch */227U16 IOCStatus; /* 0Eh */228U32 IOCLogInfo; /* 10h */229U32 ResponseLength; /* 14h */230} MSG_EXLINK_SERVICE_SEND_REPLY, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY,231ExLinkServiceSendReply_t, MPI_POINTER pExLinkServiceSendReply_t;232233/****************************************************************************/234/* FC Abort messages */235/****************************************************************************/236237typedef struct _MSG_FC_ABORT_REQUEST238{239U8 AbortFlags; /* 00h */240U8 AbortType; /* 01h */241U8 ChainOffset; /* 02h */242U8 Function; /* 03h */243U16 Reserved1; /* 04h */244U8 Reserved2; /* 06h */245U8 MsgFlags; /* 07h */246U32 MsgContext; /* 08h */247U32 TransactionContextToAbort; /* 0Ch */248} MSG_FC_ABORT_REQUEST, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST,249FcAbortRequest_t, MPI_POINTER pFcAbortRequest_t;250251#define FC_ABORT_FLAG_PORT_MASK (0x01)252253#define FC_ABORT_TYPE_ALL_FC_BUFFERS (0x00)254#define FC_ABORT_TYPE_EXACT_FC_BUFFER (0x01)255#define FC_ABORT_TYPE_CT_SEND_REQUEST (0x02)256#define FC_ABORT_TYPE_EXLINKSEND_REQUEST (0x03)257258/* FC Abort Reply */259typedef struct _MSG_FC_ABORT_REPLY260{261U16 Reserved; /* 00h */262U8 MsgLength; /* 02h */263U8 Function; /* 03h */264U16 Reserved1; /* 04h */265U8 Reserved2; /* 06h */266U8 MsgFlags; /* 07h */267U32 MsgContext; /* 08h */268U16 Reserved3; /* 0Ch */269U16 IOCStatus; /* 0Eh */270U32 IOCLogInfo; /* 10h */271} MSG_FC_ABORT_REPLY, MPI_POINTER PTR_MSG_FC_ABORT_REPLY,272FcAbortReply_t, MPI_POINTER pFcAbortReply_t;273274275/****************************************************************************/276/* FC Common Transport Send messages */277/****************************************************************************/278279typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST280{281U8 SendFlags; /* 00h */282U8 AliasIndex; /* 01h */283U8 ChainOffset; /* 02h */284U8 Function; /* 03h */285U32 MsgFlags_Did; /* 04h */286U32 MsgContext; /* 08h */287U16 CTCommandCode; /* 0Ch */288U8 FsType; /* 0Eh */289U8 Reserved1; /* 0Fh */290SGE_SIMPLE_UNION SGL; /* 10h */291} MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,292MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,293FcCommonTransportSendRequest_t, MPI_POINTER pFcCommonTransportSendRequest_t;294295#define MPI_FC_CT_SEND_DID_MASK (0x00FFFFFF)296#define MPI_FC_CT_SEND_DID_SHIFT (0)297#define MPI_FC_CT_SEND_MSGFLAGS_MASK (0xFF000000)298#define MPI_FC_CT_SEND_MSGFLAGS_SHIFT (24)299300301/* FC Common Transport Send Reply */302typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY303{304U8 Reserved; /* 00h */305U8 AliasIndex; /* 01h */306U8 MsgLength; /* 02h */307U8 Function; /* 03h */308U16 Reserved1; /* 04h */309U8 Reserved2; /* 06h */310U8 MsgFlags; /* 07h */311U32 MsgContext; /* 08h */312U16 Reserved3; /* 0Ch */313U16 IOCStatus; /* 0Eh */314U32 IOCLogInfo; /* 10h */315U32 ResponseLength; /* 14h */316} MSG_FC_COMMON_TRANSPORT_SEND_REPLY, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY,317FcCommonTransportSendReply_t, MPI_POINTER pFcCommonTransportSendReply_t;318319320/****************************************************************************/321/* FC Primitive Send messages */322/****************************************************************************/323324typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST325{326U8 SendFlags; /* 00h */327U8 Reserved; /* 01h */328U8 ChainOffset; /* 02h */329U8 Function; /* 03h */330U16 Reserved1; /* 04h */331U8 Reserved2; /* 06h */332U8 MsgFlags; /* 07h */333U32 MsgContext; /* 08h */334U8 FcPrimitive[4]; /* 0Ch */335} MSG_FC_PRIMITIVE_SEND_REQUEST, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST,336FcPrimitiveSendRequest_t, MPI_POINTER pFcPrimitiveSendRequest_t;337338#define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK (0x01)339#define MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK (0x02)340#define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK (0x04)341#define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND (0x08)342#define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE (0x10)343#define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND (0x20)344#define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL (0x40)345#define MPI_FC_PRIM_SEND_FLAGS_FOREVER (0x80)346347/* FC Primitive Send Reply */348typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY349{350U8 SendFlags; /* 00h */351U8 Reserved; /* 01h */352U8 MsgLength; /* 02h */353U8 Function; /* 03h */354U16 Reserved1; /* 04h */355U8 Reserved2; /* 06h */356U8 MsgFlags; /* 07h */357U32 MsgContext; /* 08h */358U16 Reserved3; /* 0Ch */359U16 IOCStatus; /* 0Eh */360U32 IOCLogInfo; /* 10h */361} MSG_FC_PRIMITIVE_SEND_REPLY, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY,362FcPrimitiveSendReply_t, MPI_POINTER pFcPrimitiveSendReply_t;363364#endif365366367368