mpi_fc.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:17k
源码类别:

嵌入式Linux

开发平台:

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