mpi_fc.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:17k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  Copyright (c) 2000-2001 LSI Logic Corporation.
  3.  *
  4.  *
  5.  *           Name:  MPI_FC.H
  6.  *          Title:  MPI Fibre Channel messages and structures
  7.  *  Creation Date:  June 12, 2000
  8.  *
  9.  *    MPI Version:  01.02.02
  10.  *
  11.  *  Version History
  12.  *  ---------------
  13.  *
  14.  *  Date      Version   Description
  15.  *  --------  --------  ------------------------------------------------------
  16.  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
  17.  *  06-06-00  01.00.01  Update version number for 1.0 release.
  18.  *  06-12-00  01.00.02  Added _MSG_FC_ABORT_REPLY structure.
  19.  *  11-02-00  01.01.01  Original release for post 1.0 work
  20.  *  12-04-00  01.01.02  Added messages for Common Transport Send and
  21.  *                      Primitive Send.
  22.  *  01-09-01  01.01.03  Modifed some of the new flags to have an MPI prefix
  23.  *                      and modified the FcPrimitiveSend flags.
  24.  *  01-25-01  01.01.04  Move InitiatorIndex in LinkServiceRsp reply to a larger
  25.  *                      field.
  26.  *                      Added FC_ABORT_TYPE_CT_SEND_REQUEST and
  27.  *                      FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.
  28.  *                      Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.
  29.  *  02-20-01  01.01.05  Started using MPI_POINTER.
  30.  *  03-27-01  01.01.06  Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY
  31.  *                      and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.
  32.  *                      Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
  33.  *                      Added structure offset comments.
  34.  *  04-09-01  01.01.07  Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
  35.  *  08-08-01  01.02.01  Original release for v1.2 work.
  36.  *  09-28-01  01.02.02  Change name of reserved field in
  37.  *                      MSG_LINK_SERVICE_RSP_REPLY.
  38.  *  --------------------------------------------------------------------------
  39.  */
  40. #ifndef MPI_FC_H
  41. #define MPI_FC_H
  42. /*****************************************************************************
  43. *
  44. *        F C    T a r g e t    M o d e    M e s s a g e s
  45. *
  46. *****************************************************************************/
  47. /****************************************************************************/
  48. /* Link Service Buffer Post messages                                        */
  49. /****************************************************************************/
  50. typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST
  51. {
  52.     U8                      BufferPostFlags;    /* 00h */
  53.     U8                      BufferCount;        /* 01h */
  54.     U8                      ChainOffset;        /* 02h */
  55.     U8                      Function;           /* 03h */
  56.     U16                     Reserved;           /* 04h */
  57.     U8                      Reserved1;          /* 06h */
  58.     U8                      MsgFlags;           /* 07h */
  59.     U32                     MsgContext;         /* 08h */
  60.     SGE_TRANS_SIMPLE_UNION  SGL;
  61. } MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
  62.  MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
  63.   LinkServiceBufferPostRequest_t, MPI_POINTER pLinkServiceBufferPostRequest_t;
  64. #define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)
  65. typedef struct _WWNFORMAT
  66. {
  67.     U32                     PortNameHigh;       /* 00h */
  68.     U32                     PortNameLow;        /* 04h */
  69.     U32                     NodeNameHigh;       /* 08h */
  70.     U32                     NodeNameLow;        /* 0Ch */
  71. } WWNFORMAT,
  72.   WwnFormat_t;
  73. /* Link Service Buffer Post Reply */
  74. typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY
  75. {
  76.     U8                      Flags;              /* 00h */
  77.     U8                      Reserved;           /* 01h */
  78.     U8                      MsgLength;          /* 02h */
  79.     U8                      Function;           /* 03h */
  80.     U16                     Reserved1;          /* 04h */
  81.     U8                      PortNumber;         /* 06h */
  82.     U8                      MsgFlags;           /* 07h */
  83.     U32                     MsgContext;         /* 08h */
  84.     U16                     Reserved2;          /* 0Ch */
  85.     U16                     IOCStatus;          /* 0Eh */
  86.     U32                     IOCLogInfo;         /* 10h */
  87.     U32                     TransferLength;     /* 14h */
  88.     U32                     TransactionContext; /* 18h */
  89.     U32                     Rctl_Did;           /* 1Ch */
  90.     U32                     Csctl_Sid;          /* 20h */
  91.     U32                     Type_Fctl;          /* 24h */
  92.     U16                     SeqCnt;             /* 28h */
  93.     U8                      Dfctl;              /* 2Ah */
  94.     U8                      SeqId;              /* 2Bh */
  95.     U16                     Rxid;               /* 2Ch */
  96.     U16                     Oxid;               /* 2Eh */
  97.     U32                     Parameter;          /* 30h */
  98.     WWNFORMAT               Wwn;                /* 34h */
  99. } MSG_LINK_SERVICE_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY,
  100.   LinkServiceBufferPostReply_t, MPI_POINTER pLinkServiceBufferPostReply_t;
  101. #define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED    (0x80)
  102. #define MPI_FC_DID_MASK                             (0x00FFFFFF)
  103. #define MPI_FC_DID_SHIFT                            (0)
  104. #define MPI_FC_RCTL_MASK                            (0xFF000000)
  105. #define MPI_FC_RCTL_SHIFT                           (24)
  106. #define MPI_FC_SID_MASK                             (0x00FFFFFF)
  107. #define MPI_FC_SID_SHIFT                            (0)
  108. #define MPI_FC_CSCTL_MASK                           (0xFF000000)
  109. #define MPI_FC_CSCTL_SHIFT                          (24)
  110. #define MPI_FC_FCTL_MASK                            (0x00FFFFFF)
  111. #define MPI_FC_FCTL_SHIFT                           (0)
  112. #define MPI_FC_TYPE_MASK                            (0xFF000000)
  113. #define MPI_FC_TYPE_SHIFT                           (24)
  114. /* obsolete name for the above */
  115. #define FCP_TARGET_DID_MASK                         (0x00FFFFFF)
  116. #define FCP_TARGET_DID_SHIFT                        (0)
  117. #define FCP_TARGET_RCTL_MASK                        (0xFF000000)
  118. #define FCP_TARGET_RCTL_SHIFT                       (24)
  119. #define FCP_TARGET_SID_MASK                         (0x00FFFFFF)
  120. #define FCP_TARGET_SID_SHIFT                        (0)
  121. #define FCP_TARGET_CSCTL_MASK                       (0xFF000000)
  122. #define FCP_TARGET_CSCTL_SHIFT                      (24)
  123. #define FCP_TARGET_FCTL_MASK                        (0x00FFFFFF)
  124. #define FCP_TARGET_FCTL_SHIFT                       (0)
  125. #define FCP_TARGET_TYPE_MASK                        (0xFF000000)
  126. #define FCP_TARGET_TYPE_SHIFT                       (24)
  127. /****************************************************************************/
  128. /* Link Service Response messages                                           */
  129. /****************************************************************************/
  130. typedef struct _MSG_LINK_SERVICE_RSP_REQUEST
  131. {
  132.     U8                      RspFlags;           /* 00h */
  133.     U8                      RspLength;          /* 01h */
  134.     U8                      ChainOffset;        /* 02h */
  135.     U8                      Function;           /* 03h */
  136.     U16                     Reserved1;          /* 04h */
  137.     U8                      Reserved2;          /* 06h */
  138.     U8                      MsgFlags;           /* 07h */
  139.     U32                     MsgContext;         /* 08h */
  140.     U32                     Rctl_Did;           /* 0Ch */
  141.     U32                     Csctl_Sid;          /* 10h */
  142.     U32                     Type_Fctl;          /* 14h */
  143.     U16                     SeqCnt;             /* 18h */
  144.     U8                      Dfctl;              /* 1Ah */
  145.     U8                      SeqId;              /* 1Bh */
  146.     U16                     Rxid;               /* 1Ch */
  147.     U16                     Oxid;               /* 1Eh */
  148.     U32                     Parameter;          /* 20h */
  149.     SGE_SIMPLE_UNION        SGL;                /* 24h */
  150. } MSG_LINK_SERVICE_RSP_REQUEST, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST,
  151.   LinkServiceRspRequest_t, MPI_POINTER pLinkServiceRspRequest_t;
  152. #define LINK_SERVICE_RSP_FLAGS_IMMEDIATE        (0x80)
  153. #define LINK_SERVICE_RSP_FLAGS_PORT_MASK        (0x01)
  154. /* Link Service Response Reply  */
  155. typedef struct _MSG_LINK_SERVICE_RSP_REPLY
  156. {
  157.     U16                     Reserved;           /* 00h */
  158.     U8                      MsgLength;          /* 02h */
  159.     U8                      Function;           /* 03h */
  160.     U16                     Reserved1;          /* 04h */
  161.     U8                      Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */
  162.     U8                      MsgFlags;           /* 07h */
  163.     U32                     MsgContext;         /* 08h */
  164.     U16                     Reserved3;          /* 0Ch */
  165.     U16                     IOCStatus;          /* 0Eh */
  166.     U32                     IOCLogInfo;         /* 10h */
  167.     U32                     InitiatorIndex;     /* 14h */
  168. } MSG_LINK_SERVICE_RSP_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY,
  169.   LinkServiceRspReply_t, MPI_POINTER pLinkServiceRspReply_t;
  170. /****************************************************************************/
  171. /* Extended Link Service Send messages                                      */
  172. /****************************************************************************/
  173. typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
  174. {
  175.     U8                      SendFlags;          /* 00h */
  176.     U8                      Reserved;           /* 01h */
  177.     U8                      ChainOffset;        /* 02h */
  178.     U8                      Function;           /* 03h */
  179.     U32                     MsgFlags_Did;       /* 04h */
  180.     U32                     MsgContext;         /* 08h */
  181.     U32                     ElsCommandCode;     /* 0Ch */
  182.     SGE_SIMPLE_UNION        SGL;                /* 10h */
  183. } MSG_EXLINK_SERVICE_SEND_REQUEST, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST,
  184.   ExLinkServiceSendRequest_t, MPI_POINTER pExLinkServiceSendRequest_t;
  185. #define EX_LINK_SERVICE_SEND_DID_MASK           (0x00FFFFFF)
  186. #define EX_LINK_SERVICE_SEND_DID_SHIFT          (0)
  187. #define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK      (0xFF000000)
  188. #define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT     (24)
  189. /* Extended Link Service Send Reply */
  190. typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
  191. {
  192.     U16                     Reserved;           /* 00h */
  193.     U8                      MsgLength;          /* 02h */
  194.     U8                      Function;           /* 03h */
  195.     U16                     Reserved1;          /* 04h */
  196.     U8                      Reserved2;          /* 06h */
  197.     U8                      MsgFlags;           /* 07h */
  198.     U32                     MsgContext;         /* 08h */
  199.     U16                     Reserved3;          /* 0Ch */
  200.     U16                     IOCStatus;          /* 0Eh */
  201.     U32                     IOCLogInfo;         /* 10h */
  202.     U32                     ResponseLength;     /* 14h */
  203. } MSG_EXLINK_SERVICE_SEND_REPLY, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY,
  204.   ExLinkServiceSendReply_t, MPI_POINTER pExLinkServiceSendReply_t;
  205. /****************************************************************************/
  206. /* FC Abort messages                                                        */
  207. /****************************************************************************/
  208. typedef struct _MSG_FC_ABORT_REQUEST
  209. {
  210.     U8                      AbortFlags;                 /* 00h */
  211.     U8                      AbortType;                  /* 01h */
  212.     U8                      ChainOffset;                /* 02h */
  213.     U8                      Function;                   /* 03h */
  214.     U16                     Reserved1;                  /* 04h */
  215.     U8                      Reserved2;                  /* 06h */
  216.     U8                      MsgFlags;                   /* 07h */
  217.     U32                     MsgContext;                 /* 08h */
  218.     U32                     TransactionContextToAbort;  /* 0Ch */
  219. } MSG_FC_ABORT_REQUEST, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST,
  220.   FcAbortRequest_t, MPI_POINTER pFcAbortRequest_t;
  221. #define FC_ABORT_FLAG_PORT_MASK                 (0x01)
  222. #define FC_ABORT_TYPE_ALL_FC_BUFFERS            (0x00)
  223. #define FC_ABORT_TYPE_EXACT_FC_BUFFER           (0x01)
  224. #define FC_ABORT_TYPE_CT_SEND_REQUEST           (0x02)
  225. #define FC_ABORT_TYPE_EXLINKSEND_REQUEST        (0x03)
  226. /* FC Abort Reply */
  227. typedef struct _MSG_FC_ABORT_REPLY
  228. {
  229.     U16                     Reserved;           /* 00h */
  230.     U8                      MsgLength;          /* 02h */
  231.     U8                      Function;           /* 03h */
  232.     U16                     Reserved1;          /* 04h */
  233.     U8                      Reserved2;          /* 06h */
  234.     U8                      MsgFlags;           /* 07h */
  235.     U32                     MsgContext;         /* 08h */
  236.     U16                     Reserved3;          /* 0Ch */
  237.     U16                     IOCStatus;          /* 0Eh */
  238.     U32                     IOCLogInfo;         /* 10h */
  239. } MSG_FC_ABORT_REPLY, MPI_POINTER PTR_MSG_FC_ABORT_REPLY,
  240.   FcAbortReply_t, MPI_POINTER pFcAbortReply_t;
  241. /****************************************************************************/
  242. /* FC Common Transport Send messages                                        */
  243. /****************************************************************************/
  244. typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
  245. {
  246.     U8                      SendFlags;          /* 00h */
  247.     U8                      Reserved;           /* 01h */
  248.     U8                      ChainOffset;        /* 02h */
  249.     U8                      Function;           /* 03h */
  250.     U32                     MsgFlags_Did;       /* 04h */
  251.     U32                     MsgContext;         /* 08h */
  252.     U16                     CTCommandCode;      /* 0Ch */
  253.     U8                      FsType;             /* 0Eh */
  254.     U8                      Reserved1;          /* 0Fh */
  255.     SGE_SIMPLE_UNION        SGL;                /* 10h */
  256. } MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
  257.  MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
  258.   FcCommonTransportSendRequest_t, MPI_POINTER pFcCommonTransportSendRequest_t;
  259. #define MPI_FC_CT_SEND_DID_MASK                 (0x00FFFFFF)
  260. #define MPI_FC_CT_SEND_DID_SHIFT                (0)
  261. #define MPI_FC_CT_SEND_MSGFLAGS_MASK            (0xFF000000)
  262. #define MPI_FC_CT_SEND_MSGFLAGS_SHIFT           (24)
  263. /* FC Common Transport Send Reply */
  264. typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
  265. {
  266.     U16                     Reserved;           /* 00h */
  267.     U8                      MsgLength;          /* 02h */
  268.     U8                      Function;           /* 03h */
  269.     U16                     Reserved1;          /* 04h */
  270.     U8                      Reserved2;          /* 06h */
  271.     U8                      MsgFlags;           /* 07h */
  272.     U32                     MsgContext;         /* 08h */
  273.     U16                     Reserved3;          /* 0Ch */
  274.     U16                     IOCStatus;          /* 0Eh */
  275.     U32                     IOCLogInfo;         /* 10h */
  276.     U32                     ResponseLength;     /* 14h */
  277. } MSG_FC_COMMON_TRANSPORT_SEND_REPLY, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY,
  278.   FcCommonTransportSendReply_t, MPI_POINTER pFcCommonTransportSendReply_t;
  279. /****************************************************************************/
  280. /* FC Primitive Send messages                                               */
  281. /****************************************************************************/
  282. typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST
  283. {
  284.     U8                      SendFlags;          /* 00h */
  285.     U8                      Reserved;           /* 01h */
  286.     U8                      ChainOffset;        /* 02h */
  287.     U8                      Function;           /* 03h */
  288.     U16                     Reserved1;          /* 04h */
  289.     U8                      Reserved2;          /* 06h */
  290.     U8                      MsgFlags;           /* 07h */
  291.     U32                     MsgContext;         /* 08h */
  292.     U8                      FcPrimitive[4];     /* 0Ch */
  293. } MSG_FC_PRIMITIVE_SEND_REQUEST, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST,
  294.   FcPrimitiveSendRequest_t, MPI_POINTER pFcPrimitiveSendRequest_t;
  295. #define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK       (0x01)
  296. #define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK      (0x04)
  297. #define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND       (0x08)
  298. #define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE       (0x10)
  299. #define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND     (0x20)
  300. #define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL      (0x40)
  301. #define MPI_FC_PRIM_SEND_FLAGS_FOREVER         (0x80)
  302. /* FC Primitive Send Reply */
  303. typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY
  304. {
  305.     U8                      SendFlags;          /* 00h */
  306.     U8                      Reserved;           /* 01h */
  307.     U8                      MsgLength;          /* 02h */
  308.     U8                      Function;           /* 03h */
  309.     U16                     Reserved1;          /* 04h */
  310.     U8                      Reserved2;          /* 06h */
  311.     U8                      MsgFlags;           /* 07h */
  312.     U32                     MsgContext;         /* 08h */
  313.     U16                     Reserved3;          /* 0Ch */
  314.     U16                     IOCStatus;          /* 0Eh */
  315.     U32                     IOCLogInfo;         /* 10h */
  316. } MSG_FC_PRIMITIVE_SEND_REPLY, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY,
  317.   FcPrimitiveSendReply_t, MPI_POINTER pFcPrimitiveSendReply_t;
  318. #endif