xref: /freebsd/sys/dev/mpt/mpilib/mpi_fc.h (revision 098ca2bda93c701c5331d4e6aace072495b4caaa)
19b631363SMatt Jacob /* $FreeBSD$ */
2098ca2bdSWarner Losh /*-
3d3ecac66SMatt Jacob  * Copyright (c) 2000, 2001 by LSI Logic Corporation
4d3ecac66SMatt Jacob  *
5d3ecac66SMatt Jacob  * Redistribution and use in source and binary forms, with or without
6d3ecac66SMatt Jacob  * modification, are permitted provided that the following conditions
7d3ecac66SMatt Jacob  * are met:
8d3ecac66SMatt Jacob  * 1. Redistributions of source code must retain the above copyright
9d3ecac66SMatt Jacob  *    notice immediately at the beginning of the file, without modification,
10d3ecac66SMatt Jacob  *    this list of conditions, and the following disclaimer.
11d3ecac66SMatt Jacob  * 2. The name of the author may not be used to endorse or promote products
12d3ecac66SMatt Jacob  *    derived from this software without specific prior written permission.
13d3ecac66SMatt Jacob  *
14d3ecac66SMatt Jacob  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15d3ecac66SMatt Jacob  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16d3ecac66SMatt Jacob  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17d3ecac66SMatt Jacob  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18d3ecac66SMatt Jacob  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19d3ecac66SMatt Jacob  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20d3ecac66SMatt Jacob  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21d3ecac66SMatt Jacob  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22d3ecac66SMatt Jacob  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23d3ecac66SMatt Jacob  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24d3ecac66SMatt Jacob  * SUCH DAMAGE.
259b631363SMatt Jacob  *
269b631363SMatt Jacob  *
279b631363SMatt Jacob  *           Name:  MPI_FC.H
289b631363SMatt Jacob  *          Title:  MPI Fibre Channel messages and structures
299b631363SMatt Jacob  *  Creation Date:  June 12, 2000
309b631363SMatt Jacob  *
319b631363SMatt Jacob  *    MPI Version:  01.02.02
329b631363SMatt Jacob  *
339b631363SMatt Jacob  *  Version History
349b631363SMatt Jacob  *  ---------------
359b631363SMatt Jacob  *
369b631363SMatt Jacob  *  Date      Version   Description
379b631363SMatt Jacob  *  --------  --------  ------------------------------------------------------
389b631363SMatt Jacob  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
399b631363SMatt Jacob  *  06-06-00  01.00.01  Update version number for 1.0 release.
409b631363SMatt Jacob  *  06-12-00  01.00.02  Added _MSG_FC_ABORT_REPLY structure.
419b631363SMatt Jacob  *  11-02-00  01.01.01  Original release for post 1.0 work
429b631363SMatt Jacob  *  12-04-00  01.01.02  Added messages for Common Transport Send and
439b631363SMatt Jacob  *                      Primitive Send.
449b631363SMatt Jacob  *  01-09-01  01.01.03  Modifed some of the new flags to have an MPI prefix
459b631363SMatt Jacob  *                      and modified the FcPrimitiveSend flags.
469b631363SMatt Jacob  *  01-25-01  01.01.04  Move InitiatorIndex in LinkServiceRsp reply to a larger
479b631363SMatt Jacob  *                      field.
489b631363SMatt Jacob  *                      Added FC_ABORT_TYPE_CT_SEND_REQUEST and
499b631363SMatt Jacob  *                      FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.
509b631363SMatt Jacob  *                      Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.
519b631363SMatt Jacob  *  02-20-01  01.01.05  Started using MPI_POINTER.
529b631363SMatt Jacob  *  03-27-01  01.01.06  Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY
539b631363SMatt Jacob  *                      and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.
549b631363SMatt Jacob  *                      Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
559b631363SMatt Jacob  *                      Added structure offset comments.
569b631363SMatt Jacob  *  04-09-01  01.01.07  Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
579b631363SMatt Jacob  *  08-08-01  01.02.01  Original release for v1.2 work.
589b631363SMatt Jacob  *  09-28-01  01.02.02  Change name of reserved field in
599b631363SMatt Jacob  *                      MSG_LINK_SERVICE_RSP_REPLY.
609b631363SMatt Jacob  *  --------------------------------------------------------------------------
619b631363SMatt Jacob  */
629b631363SMatt Jacob 
639b631363SMatt Jacob #ifndef MPI_FC_H
649b631363SMatt Jacob #define MPI_FC_H
659b631363SMatt Jacob 
669b631363SMatt Jacob 
679b631363SMatt Jacob /*****************************************************************************
689b631363SMatt Jacob *
699b631363SMatt Jacob *        F C    T a r g e t    M o d e    M e s s a g e s
709b631363SMatt Jacob *
719b631363SMatt Jacob *****************************************************************************/
729b631363SMatt Jacob 
739b631363SMatt Jacob /****************************************************************************/
749b631363SMatt Jacob /* Link Service Buffer Post messages                                        */
759b631363SMatt Jacob /****************************************************************************/
769b631363SMatt Jacob 
779b631363SMatt Jacob typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST
789b631363SMatt Jacob {
799b631363SMatt Jacob     U8                      BufferPostFlags;    /* 00h */
809b631363SMatt Jacob     U8                      BufferCount;        /* 01h */
819b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
829b631363SMatt Jacob     U8                      Function;           /* 03h */
839b631363SMatt Jacob     U16                     Reserved;           /* 04h */
849b631363SMatt Jacob     U8                      Reserved1;          /* 06h */
859b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
869b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
879b631363SMatt Jacob     SGE_TRANS_SIMPLE_UNION  SGL;
889b631363SMatt Jacob } MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
899b631363SMatt Jacob  MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
909b631363SMatt Jacob   LinkServiceBufferPostRequest_t, MPI_POINTER pLinkServiceBufferPostRequest_t;
919b631363SMatt Jacob 
929b631363SMatt Jacob #define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)
939b631363SMatt Jacob 
949b631363SMatt Jacob typedef struct _WWNFORMAT
959b631363SMatt Jacob {
969b631363SMatt Jacob     U32                     PortNameHigh;       /* 00h */
979b631363SMatt Jacob     U32                     PortNameLow;        /* 04h */
989b631363SMatt Jacob     U32                     NodeNameHigh;       /* 08h */
999b631363SMatt Jacob     U32                     NodeNameLow;        /* 0Ch */
1009b631363SMatt Jacob } WWNFORMAT,
1019b631363SMatt Jacob   WwnFormat_t;
1029b631363SMatt Jacob 
1039b631363SMatt Jacob /* Link Service Buffer Post Reply */
1049b631363SMatt Jacob typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY
1059b631363SMatt Jacob {
1069b631363SMatt Jacob     U8                      Flags;              /* 00h */
1079b631363SMatt Jacob     U8                      Reserved;           /* 01h */
1089b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
1099b631363SMatt Jacob     U8                      Function;           /* 03h */
1109b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
1119b631363SMatt Jacob     U8                      PortNumber;         /* 06h */
1129b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
1139b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
1149b631363SMatt Jacob     U16                     Reserved2;          /* 0Ch */
1159b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
1169b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
1179b631363SMatt Jacob     U32                     TransferLength;     /* 14h */
1189b631363SMatt Jacob     U32                     TransactionContext; /* 18h */
1199b631363SMatt Jacob     U32                     Rctl_Did;           /* 1Ch */
1209b631363SMatt Jacob     U32                     Csctl_Sid;          /* 20h */
1219b631363SMatt Jacob     U32                     Type_Fctl;          /* 24h */
1229b631363SMatt Jacob     U16                     SeqCnt;             /* 28h */
1239b631363SMatt Jacob     U8                      Dfctl;              /* 2Ah */
1249b631363SMatt Jacob     U8                      SeqId;              /* 2Bh */
1259b631363SMatt Jacob     U16                     Rxid;               /* 2Ch */
1269b631363SMatt Jacob     U16                     Oxid;               /* 2Eh */
1279b631363SMatt Jacob     U32                     Parameter;          /* 30h */
1289b631363SMatt Jacob     WWNFORMAT               Wwn;                /* 34h */
1299b631363SMatt Jacob } MSG_LINK_SERVICE_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY,
1309b631363SMatt Jacob   LinkServiceBufferPostReply_t, MPI_POINTER pLinkServiceBufferPostReply_t;
1319b631363SMatt Jacob 
1329b631363SMatt Jacob #define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED    (0x80)
1339b631363SMatt Jacob 
1349b631363SMatt Jacob #define MPI_FC_DID_MASK                             (0x00FFFFFF)
1359b631363SMatt Jacob #define MPI_FC_DID_SHIFT                            (0)
1369b631363SMatt Jacob #define MPI_FC_RCTL_MASK                            (0xFF000000)
1379b631363SMatt Jacob #define MPI_FC_RCTL_SHIFT                           (24)
1389b631363SMatt Jacob #define MPI_FC_SID_MASK                             (0x00FFFFFF)
1399b631363SMatt Jacob #define MPI_FC_SID_SHIFT                            (0)
1409b631363SMatt Jacob #define MPI_FC_CSCTL_MASK                           (0xFF000000)
1419b631363SMatt Jacob #define MPI_FC_CSCTL_SHIFT                          (24)
1429b631363SMatt Jacob #define MPI_FC_FCTL_MASK                            (0x00FFFFFF)
1439b631363SMatt Jacob #define MPI_FC_FCTL_SHIFT                           (0)
1449b631363SMatt Jacob #define MPI_FC_TYPE_MASK                            (0xFF000000)
1459b631363SMatt Jacob #define MPI_FC_TYPE_SHIFT                           (24)
1469b631363SMatt Jacob 
1479b631363SMatt Jacob /* obsolete name for the above */
1489b631363SMatt Jacob #define FCP_TARGET_DID_MASK                         (0x00FFFFFF)
1499b631363SMatt Jacob #define FCP_TARGET_DID_SHIFT                        (0)
1509b631363SMatt Jacob #define FCP_TARGET_RCTL_MASK                        (0xFF000000)
1519b631363SMatt Jacob #define FCP_TARGET_RCTL_SHIFT                       (24)
1529b631363SMatt Jacob #define FCP_TARGET_SID_MASK                         (0x00FFFFFF)
1539b631363SMatt Jacob #define FCP_TARGET_SID_SHIFT                        (0)
1549b631363SMatt Jacob #define FCP_TARGET_CSCTL_MASK                       (0xFF000000)
1559b631363SMatt Jacob #define FCP_TARGET_CSCTL_SHIFT                      (24)
1569b631363SMatt Jacob #define FCP_TARGET_FCTL_MASK                        (0x00FFFFFF)
1579b631363SMatt Jacob #define FCP_TARGET_FCTL_SHIFT                       (0)
1589b631363SMatt Jacob #define FCP_TARGET_TYPE_MASK                        (0xFF000000)
1599b631363SMatt Jacob #define FCP_TARGET_TYPE_SHIFT                       (24)
1609b631363SMatt Jacob 
1619b631363SMatt Jacob 
1629b631363SMatt Jacob /****************************************************************************/
1639b631363SMatt Jacob /* Link Service Response messages                                           */
1649b631363SMatt Jacob /****************************************************************************/
1659b631363SMatt Jacob 
1669b631363SMatt Jacob typedef struct _MSG_LINK_SERVICE_RSP_REQUEST
1679b631363SMatt Jacob {
1689b631363SMatt Jacob     U8                      RspFlags;           /* 00h */
1699b631363SMatt Jacob     U8                      RspLength;          /* 01h */
1709b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
1719b631363SMatt Jacob     U8                      Function;           /* 03h */
1729b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
1739b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
1749b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
1759b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
1769b631363SMatt Jacob     U32                     Rctl_Did;           /* 0Ch */
1779b631363SMatt Jacob     U32                     Csctl_Sid;          /* 10h */
1789b631363SMatt Jacob     U32                     Type_Fctl;          /* 14h */
1799b631363SMatt Jacob     U16                     SeqCnt;             /* 18h */
1809b631363SMatt Jacob     U8                      Dfctl;              /* 1Ah */
1819b631363SMatt Jacob     U8                      SeqId;              /* 1Bh */
1829b631363SMatt Jacob     U16                     Rxid;               /* 1Ch */
1839b631363SMatt Jacob     U16                     Oxid;               /* 1Eh */
1849b631363SMatt Jacob     U32                     Parameter;          /* 20h */
1859b631363SMatt Jacob     SGE_SIMPLE_UNION        SGL;                /* 24h */
1869b631363SMatt Jacob } MSG_LINK_SERVICE_RSP_REQUEST, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST,
1879b631363SMatt Jacob   LinkServiceRspRequest_t, MPI_POINTER pLinkServiceRspRequest_t;
1889b631363SMatt Jacob 
1899b631363SMatt Jacob #define LINK_SERVICE_RSP_FLAGS_IMMEDIATE        (0x80)
1909b631363SMatt Jacob #define LINK_SERVICE_RSP_FLAGS_PORT_MASK        (0x01)
1919b631363SMatt Jacob 
1929b631363SMatt Jacob 
1939b631363SMatt Jacob /* Link Service Response Reply  */
1949b631363SMatt Jacob typedef struct _MSG_LINK_SERVICE_RSP_REPLY
1959b631363SMatt Jacob {
1969b631363SMatt Jacob     U16                     Reserved;           /* 00h */
1979b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
1989b631363SMatt Jacob     U8                      Function;           /* 03h */
1999b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
2009b631363SMatt Jacob     U8                      Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */
2019b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2029b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2039b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
2049b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
2059b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
2069b631363SMatt Jacob     U32                     InitiatorIndex;     /* 14h */
2079b631363SMatt Jacob } MSG_LINK_SERVICE_RSP_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY,
2089b631363SMatt Jacob   LinkServiceRspReply_t, MPI_POINTER pLinkServiceRspReply_t;
2099b631363SMatt Jacob 
2109b631363SMatt Jacob 
2119b631363SMatt Jacob /****************************************************************************/
2129b631363SMatt Jacob /* Extended Link Service Send messages                                      */
2139b631363SMatt Jacob /****************************************************************************/
2149b631363SMatt Jacob 
2159b631363SMatt Jacob typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
2169b631363SMatt Jacob {
2179b631363SMatt Jacob     U8                      SendFlags;          /* 00h */
2189b631363SMatt Jacob     U8                      Reserved;           /* 01h */
2199b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
2209b631363SMatt Jacob     U8                      Function;           /* 03h */
2219b631363SMatt Jacob     U32                     MsgFlags_Did;       /* 04h */
2229b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2239b631363SMatt Jacob     U32                     ElsCommandCode;     /* 0Ch */
2249b631363SMatt Jacob     SGE_SIMPLE_UNION        SGL;                /* 10h */
2259b631363SMatt Jacob } MSG_EXLINK_SERVICE_SEND_REQUEST, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST,
2269b631363SMatt Jacob   ExLinkServiceSendRequest_t, MPI_POINTER pExLinkServiceSendRequest_t;
2279b631363SMatt Jacob 
2289b631363SMatt Jacob #define EX_LINK_SERVICE_SEND_DID_MASK           (0x00FFFFFF)
2299b631363SMatt Jacob #define EX_LINK_SERVICE_SEND_DID_SHIFT          (0)
2309b631363SMatt Jacob #define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK      (0xFF000000)
2319b631363SMatt Jacob #define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT     (24)
2329b631363SMatt Jacob 
2339b631363SMatt Jacob 
2349b631363SMatt Jacob /* Extended Link Service Send Reply */
2359b631363SMatt Jacob typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
2369b631363SMatt Jacob {
2379b631363SMatt Jacob     U16                     Reserved;           /* 00h */
2389b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
2399b631363SMatt Jacob     U8                      Function;           /* 03h */
2409b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
2419b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
2429b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2439b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2449b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
2459b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
2469b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
2479b631363SMatt Jacob     U32                     ResponseLength;     /* 14h */
2489b631363SMatt Jacob } MSG_EXLINK_SERVICE_SEND_REPLY, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY,
2499b631363SMatt Jacob   ExLinkServiceSendReply_t, MPI_POINTER pExLinkServiceSendReply_t;
2509b631363SMatt Jacob 
2519b631363SMatt Jacob /****************************************************************************/
2529b631363SMatt Jacob /* FC Abort messages                                                        */
2539b631363SMatt Jacob /****************************************************************************/
2549b631363SMatt Jacob 
2559b631363SMatt Jacob typedef struct _MSG_FC_ABORT_REQUEST
2569b631363SMatt Jacob {
2579b631363SMatt Jacob     U8                      AbortFlags;                 /* 00h */
2589b631363SMatt Jacob     U8                      AbortType;                  /* 01h */
2599b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
2609b631363SMatt Jacob     U8                      Function;                   /* 03h */
2619b631363SMatt Jacob     U16                     Reserved1;                  /* 04h */
2629b631363SMatt Jacob     U8                      Reserved2;                  /* 06h */
2639b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
2649b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2659b631363SMatt Jacob     U32                     TransactionContextToAbort;  /* 0Ch */
2669b631363SMatt Jacob } MSG_FC_ABORT_REQUEST, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST,
2679b631363SMatt Jacob   FcAbortRequest_t, MPI_POINTER pFcAbortRequest_t;
2689b631363SMatt Jacob 
2699b631363SMatt Jacob #define FC_ABORT_FLAG_PORT_MASK                 (0x01)
2709b631363SMatt Jacob 
2719b631363SMatt Jacob #define FC_ABORT_TYPE_ALL_FC_BUFFERS            (0x00)
2729b631363SMatt Jacob #define FC_ABORT_TYPE_EXACT_FC_BUFFER           (0x01)
2739b631363SMatt Jacob #define FC_ABORT_TYPE_CT_SEND_REQUEST           (0x02)
2749b631363SMatt Jacob #define FC_ABORT_TYPE_EXLINKSEND_REQUEST        (0x03)
2759b631363SMatt Jacob 
2769b631363SMatt Jacob /* FC Abort Reply */
2779b631363SMatt Jacob typedef struct _MSG_FC_ABORT_REPLY
2789b631363SMatt Jacob {
2799b631363SMatt Jacob     U16                     Reserved;           /* 00h */
2809b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
2819b631363SMatt Jacob     U8                      Function;           /* 03h */
2829b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
2839b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
2849b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2859b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2869b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
2879b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
2889b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
2899b631363SMatt Jacob } MSG_FC_ABORT_REPLY, MPI_POINTER PTR_MSG_FC_ABORT_REPLY,
2909b631363SMatt Jacob   FcAbortReply_t, MPI_POINTER pFcAbortReply_t;
2919b631363SMatt Jacob 
2929b631363SMatt Jacob 
2939b631363SMatt Jacob /****************************************************************************/
2949b631363SMatt Jacob /* FC Common Transport Send messages                                        */
2959b631363SMatt Jacob /****************************************************************************/
2969b631363SMatt Jacob 
2979b631363SMatt Jacob typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
2989b631363SMatt Jacob {
2999b631363SMatt Jacob     U8                      SendFlags;          /* 00h */
3009b631363SMatt Jacob     U8                      Reserved;           /* 01h */
3019b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
3029b631363SMatt Jacob     U8                      Function;           /* 03h */
3039b631363SMatt Jacob     U32                     MsgFlags_Did;       /* 04h */
3049b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
3059b631363SMatt Jacob     U16                     CTCommandCode;      /* 0Ch */
3069b631363SMatt Jacob     U8                      FsType;             /* 0Eh */
3079b631363SMatt Jacob     U8                      Reserved1;          /* 0Fh */
3089b631363SMatt Jacob     SGE_SIMPLE_UNION        SGL;                /* 10h */
3099b631363SMatt Jacob } MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
3109b631363SMatt Jacob  MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
3119b631363SMatt Jacob   FcCommonTransportSendRequest_t, MPI_POINTER pFcCommonTransportSendRequest_t;
3129b631363SMatt Jacob 
3139b631363SMatt Jacob #define MPI_FC_CT_SEND_DID_MASK                 (0x00FFFFFF)
3149b631363SMatt Jacob #define MPI_FC_CT_SEND_DID_SHIFT                (0)
3159b631363SMatt Jacob #define MPI_FC_CT_SEND_MSGFLAGS_MASK            (0xFF000000)
3169b631363SMatt Jacob #define MPI_FC_CT_SEND_MSGFLAGS_SHIFT           (24)
3179b631363SMatt Jacob 
3189b631363SMatt Jacob 
3199b631363SMatt Jacob /* FC Common Transport Send Reply */
3209b631363SMatt Jacob typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
3219b631363SMatt Jacob {
3229b631363SMatt Jacob     U16                     Reserved;           /* 00h */
3239b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
3249b631363SMatt Jacob     U8                      Function;           /* 03h */
3259b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
3269b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
3279b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
3289b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
3299b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
3309b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
3319b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
3329b631363SMatt Jacob     U32                     ResponseLength;     /* 14h */
3339b631363SMatt Jacob } MSG_FC_COMMON_TRANSPORT_SEND_REPLY, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY,
3349b631363SMatt Jacob   FcCommonTransportSendReply_t, MPI_POINTER pFcCommonTransportSendReply_t;
3359b631363SMatt Jacob 
3369b631363SMatt Jacob 
3379b631363SMatt Jacob /****************************************************************************/
3389b631363SMatt Jacob /* FC Primitive Send messages                                               */
3399b631363SMatt Jacob /****************************************************************************/
3409b631363SMatt Jacob 
3419b631363SMatt Jacob typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST
3429b631363SMatt Jacob {
3439b631363SMatt Jacob     U8                      SendFlags;          /* 00h */
3449b631363SMatt Jacob     U8                      Reserved;           /* 01h */
3459b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
3469b631363SMatt Jacob     U8                      Function;           /* 03h */
3479b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
3489b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
3499b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
3509b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
3519b631363SMatt Jacob     U8                      FcPrimitive[4];     /* 0Ch */
3529b631363SMatt Jacob } MSG_FC_PRIMITIVE_SEND_REQUEST, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST,
3539b631363SMatt Jacob   FcPrimitiveSendRequest_t, MPI_POINTER pFcPrimitiveSendRequest_t;
3549b631363SMatt Jacob 
3559b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK       (0x01)
3569b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK      (0x04)
3579b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND       (0x08)
3589b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE       (0x10)
3599b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND     (0x20)
3609b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL      (0x40)
3619b631363SMatt Jacob #define MPI_FC_PRIM_SEND_FLAGS_FOREVER         (0x80)
3629b631363SMatt Jacob 
3639b631363SMatt Jacob /* FC Primitive Send Reply */
3649b631363SMatt Jacob typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY
3659b631363SMatt Jacob {
3669b631363SMatt Jacob     U8                      SendFlags;          /* 00h */
3679b631363SMatt Jacob     U8                      Reserved;           /* 01h */
3689b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
3699b631363SMatt Jacob     U8                      Function;           /* 03h */
3709b631363SMatt Jacob     U16                     Reserved1;          /* 04h */
3719b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
3729b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
3739b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
3749b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
3759b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
3769b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
3779b631363SMatt Jacob } MSG_FC_PRIMITIVE_SEND_REPLY, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY,
3789b631363SMatt Jacob   FcPrimitiveSendReply_t, MPI_POINTER pFcPrimitiveSendReply_t;
3799b631363SMatt Jacob 
3809b631363SMatt Jacob #endif
3819b631363SMatt Jacob 
382