Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  Copyright (c) 2000-2008 LSI Corporation.
0004  *
0005  *
0006  *           Name:  mpi_fc.h
0007  *          Title:  MPI Fibre Channel messages and structures
0008  *  Creation Date:  June 12, 2000
0009  *
0010  *    mpi_fc.h Version:  01.05.01
0011  *
0012  *  Version History
0013  *  ---------------
0014  *
0015  *  Date      Version   Description
0016  *  --------  --------  ------------------------------------------------------
0017  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
0018  *  06-06-00  01.00.01  Update version number for 1.0 release.
0019  *  06-12-00  01.00.02  Added _MSG_FC_ABORT_REPLY structure.
0020  *  11-02-00  01.01.01  Original release for post 1.0 work
0021  *  12-04-00  01.01.02  Added messages for Common Transport Send and
0022  *                      Primitive Send.
0023  *  01-09-01  01.01.03  Modifed some of the new flags to have an MPI prefix
0024  *                      and modified the FcPrimitiveSend flags.
0025  *  01-25-01  01.01.04  Move InitiatorIndex in LinkServiceRsp reply to a larger
0026  *                      field.
0027  *                      Added FC_ABORT_TYPE_CT_SEND_REQUEST and
0028  *                      FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.
0029  *                      Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.
0030  *  02-20-01  01.01.05  Started using MPI_POINTER.
0031  *  03-27-01  01.01.06  Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY
0032  *                      and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.
0033  *                      Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
0034  *                      Added structure offset comments.
0035  *  04-09-01  01.01.07  Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
0036  *  08-08-01  01.02.01  Original release for v1.2 work.
0037  *  09-28-01  01.02.02  Change name of reserved field in
0038  *                      MSG_LINK_SERVICE_RSP_REPLY.
0039  *  05-31-02  01.02.03  Adding AliasIndex to FC Direct Access requests.
0040  *  01-16-04  01.02.04  Added define for MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK.
0041  *  05-11-04  01.03.01  Original release for MPI v1.3.
0042  *  08-19-04  01.05.01  Original release for MPI v1.5.
0043  *  --------------------------------------------------------------------------
0044  */
0045 
0046 #ifndef MPI_FC_H
0047 #define MPI_FC_H
0048 
0049 
0050 /*****************************************************************************
0051 *
0052 *        F C    D i r e c t    A c c e s s     M e s s a g e s
0053 *
0054 *****************************************************************************/
0055 
0056 /****************************************************************************/
0057 /* Link Service Buffer Post messages                                        */
0058 /****************************************************************************/
0059 
0060 typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST
0061 {
0062     U8                      BufferPostFlags;    /* 00h */
0063     U8                      BufferCount;        /* 01h */
0064     U8                      ChainOffset;        /* 02h */
0065     U8                      Function;           /* 03h */
0066     U16                     Reserved;           /* 04h */
0067     U8                      Reserved1;          /* 06h */
0068     U8                      MsgFlags;           /* 07h */
0069     U32                     MsgContext;         /* 08h */
0070     SGE_TRANS_SIMPLE_UNION  SGL;
0071 } MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
0072  MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
0073   LinkServiceBufferPostRequest_t, MPI_POINTER pLinkServiceBufferPostRequest_t;
0074 
0075 #define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)
0076 
0077 typedef struct _WWNFORMAT
0078 {
0079     U32                     PortNameHigh;       /* 00h */
0080     U32                     PortNameLow;        /* 04h */
0081     U32                     NodeNameHigh;       /* 08h */
0082     U32                     NodeNameLow;        /* 0Ch */
0083 } WWNFORMAT,
0084   WwnFormat_t;
0085 
0086 /* Link Service Buffer Post Reply */
0087 typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY
0088 {
0089     U8                      Flags;              /* 00h */
0090     U8                      Reserved;           /* 01h */
0091     U8                      MsgLength;          /* 02h */
0092     U8                      Function;           /* 03h */
0093     U16                     Reserved1;          /* 04h */
0094     U8                      PortNumber;         /* 06h */
0095     U8                      MsgFlags;           /* 07h */
0096     U32                     MsgContext;         /* 08h */
0097     U16                     Reserved2;          /* 0Ch */
0098     U16                     IOCStatus;          /* 0Eh */
0099     U32                     IOCLogInfo;         /* 10h */
0100     U32                     TransferLength;     /* 14h */
0101     U32                     TransactionContext; /* 18h */
0102     U32                     Rctl_Did;           /* 1Ch */
0103     U32                     Csctl_Sid;          /* 20h */
0104     U32                     Type_Fctl;          /* 24h */
0105     U16                     SeqCnt;             /* 28h */
0106     U8                      Dfctl;              /* 2Ah */
0107     U8                      SeqId;              /* 2Bh */
0108     U16                     Rxid;               /* 2Ch */
0109     U16                     Oxid;               /* 2Eh */
0110     U32                     Parameter;          /* 30h */
0111     WWNFORMAT               Wwn;                /* 34h */
0112 } MSG_LINK_SERVICE_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY,
0113   LinkServiceBufferPostReply_t, MPI_POINTER pLinkServiceBufferPostReply_t;
0114 
0115 #define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED    (0x80)
0116 
0117 #define MPI_FC_DID_MASK                             (0x00FFFFFF)
0118 #define MPI_FC_DID_SHIFT                            (0)
0119 #define MPI_FC_RCTL_MASK                            (0xFF000000)
0120 #define MPI_FC_RCTL_SHIFT                           (24)
0121 #define MPI_FC_SID_MASK                             (0x00FFFFFF)
0122 #define MPI_FC_SID_SHIFT                            (0)
0123 #define MPI_FC_CSCTL_MASK                           (0xFF000000)
0124 #define MPI_FC_CSCTL_SHIFT                          (24)
0125 #define MPI_FC_FCTL_MASK                            (0x00FFFFFF)
0126 #define MPI_FC_FCTL_SHIFT                           (0)
0127 #define MPI_FC_TYPE_MASK                            (0xFF000000)
0128 #define MPI_FC_TYPE_SHIFT                           (24)
0129 
0130 /* obsolete name for the above */
0131 #define FCP_TARGET_DID_MASK                         (0x00FFFFFF)
0132 #define FCP_TARGET_DID_SHIFT                        (0)
0133 #define FCP_TARGET_RCTL_MASK                        (0xFF000000)
0134 #define FCP_TARGET_RCTL_SHIFT                       (24)
0135 #define FCP_TARGET_SID_MASK                         (0x00FFFFFF)
0136 #define FCP_TARGET_SID_SHIFT                        (0)
0137 #define FCP_TARGET_CSCTL_MASK                       (0xFF000000)
0138 #define FCP_TARGET_CSCTL_SHIFT                      (24)
0139 #define FCP_TARGET_FCTL_MASK                        (0x00FFFFFF)
0140 #define FCP_TARGET_FCTL_SHIFT                       (0)
0141 #define FCP_TARGET_TYPE_MASK                        (0xFF000000)
0142 #define FCP_TARGET_TYPE_SHIFT                       (24)
0143 
0144 
0145 /****************************************************************************/
0146 /* Link Service Response messages                                           */
0147 /****************************************************************************/
0148 
0149 typedef struct _MSG_LINK_SERVICE_RSP_REQUEST
0150 {
0151     U8                      RspFlags;           /* 00h */
0152     U8                      RspLength;          /* 01h */
0153     U8                      ChainOffset;        /* 02h */
0154     U8                      Function;           /* 03h */
0155     U16                     Reserved1;          /* 04h */
0156     U8                      Reserved2;          /* 06h */
0157     U8                      MsgFlags;           /* 07h */
0158     U32                     MsgContext;         /* 08h */
0159     U32                     Rctl_Did;           /* 0Ch */
0160     U32                     Csctl_Sid;          /* 10h */
0161     U32                     Type_Fctl;          /* 14h */
0162     U16                     SeqCnt;             /* 18h */
0163     U8                      Dfctl;              /* 1Ah */
0164     U8                      SeqId;              /* 1Bh */
0165     U16                     Rxid;               /* 1Ch */
0166     U16                     Oxid;               /* 1Eh */
0167     U32                     Parameter;          /* 20h */
0168     SGE_SIMPLE_UNION        SGL;                /* 24h */
0169 } MSG_LINK_SERVICE_RSP_REQUEST, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST,
0170   LinkServiceRspRequest_t, MPI_POINTER pLinkServiceRspRequest_t;
0171 
0172 #define LINK_SERVICE_RSP_FLAGS_IMMEDIATE        (0x80)
0173 #define LINK_SERVICE_RSP_FLAGS_PORT_MASK        (0x01)
0174 
0175 
0176 /* Link Service Response Reply  */
0177 typedef struct _MSG_LINK_SERVICE_RSP_REPLY
0178 {
0179     U16                     Reserved;           /* 00h */
0180     U8                      MsgLength;          /* 02h */
0181     U8                      Function;           /* 03h */
0182     U16                     Reserved1;          /* 04h */
0183     U8                      Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */
0184     U8                      MsgFlags;           /* 07h */
0185     U32                     MsgContext;         /* 08h */
0186     U16                     Reserved3;          /* 0Ch */
0187     U16                     IOCStatus;          /* 0Eh */
0188     U32                     IOCLogInfo;         /* 10h */
0189     U32                     InitiatorIndex;     /* 14h */
0190 } MSG_LINK_SERVICE_RSP_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY,
0191   LinkServiceRspReply_t, MPI_POINTER pLinkServiceRspReply_t;
0192 
0193 
0194 /****************************************************************************/
0195 /* Extended Link Service Send messages                                      */
0196 /****************************************************************************/
0197 
0198 typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
0199 {
0200     U8                      SendFlags;          /* 00h */
0201     U8                      AliasIndex;         /* 01h */
0202     U8                      ChainOffset;        /* 02h */
0203     U8                      Function;           /* 03h */
0204     U32                     MsgFlags_Did;       /* 04h */
0205     U32                     MsgContext;         /* 08h */
0206     U32                     ElsCommandCode;     /* 0Ch */
0207     SGE_SIMPLE_UNION        SGL;                /* 10h */
0208 } MSG_EXLINK_SERVICE_SEND_REQUEST, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST,
0209   ExLinkServiceSendRequest_t, MPI_POINTER pExLinkServiceSendRequest_t;
0210 
0211 #define EX_LINK_SERVICE_SEND_DID_MASK           (0x00FFFFFF)
0212 #define EX_LINK_SERVICE_SEND_DID_SHIFT          (0)
0213 #define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK      (0xFF000000)
0214 #define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT     (24)
0215 
0216 
0217 /* Extended Link Service Send Reply */
0218 typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
0219 {
0220     U8                      Reserved;           /* 00h */
0221     U8                      AliasIndex;         /* 01h */
0222     U8                      MsgLength;          /* 02h */
0223     U8                      Function;           /* 03h */
0224     U16                     Reserved1;          /* 04h */
0225     U8                      Reserved2;          /* 06h */
0226     U8                      MsgFlags;           /* 07h */
0227     U32                     MsgContext;         /* 08h */
0228     U16                     Reserved3;          /* 0Ch */
0229     U16                     IOCStatus;          /* 0Eh */
0230     U32                     IOCLogInfo;         /* 10h */
0231     U32                     ResponseLength;     /* 14h */
0232 } MSG_EXLINK_SERVICE_SEND_REPLY, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY,
0233   ExLinkServiceSendReply_t, MPI_POINTER pExLinkServiceSendReply_t;
0234 
0235 /****************************************************************************/
0236 /* FC Abort messages                                                        */
0237 /****************************************************************************/
0238 
0239 typedef struct _MSG_FC_ABORT_REQUEST
0240 {
0241     U8                      AbortFlags;                 /* 00h */
0242     U8                      AbortType;                  /* 01h */
0243     U8                      ChainOffset;                /* 02h */
0244     U8                      Function;                   /* 03h */
0245     U16                     Reserved1;                  /* 04h */
0246     U8                      Reserved2;                  /* 06h */
0247     U8                      MsgFlags;                   /* 07h */
0248     U32                     MsgContext;                 /* 08h */
0249     U32                     TransactionContextToAbort;  /* 0Ch */
0250 } MSG_FC_ABORT_REQUEST, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST,
0251   FcAbortRequest_t, MPI_POINTER pFcAbortRequest_t;
0252 
0253 #define FC_ABORT_FLAG_PORT_MASK                 (0x01)
0254 
0255 #define FC_ABORT_TYPE_ALL_FC_BUFFERS            (0x00)
0256 #define FC_ABORT_TYPE_EXACT_FC_BUFFER           (0x01)
0257 #define FC_ABORT_TYPE_CT_SEND_REQUEST           (0x02)
0258 #define FC_ABORT_TYPE_EXLINKSEND_REQUEST        (0x03)
0259 
0260 /* FC Abort Reply */
0261 typedef struct _MSG_FC_ABORT_REPLY
0262 {
0263     U16                     Reserved;           /* 00h */
0264     U8                      MsgLength;          /* 02h */
0265     U8                      Function;           /* 03h */
0266     U16                     Reserved1;          /* 04h */
0267     U8                      Reserved2;          /* 06h */
0268     U8                      MsgFlags;           /* 07h */
0269     U32                     MsgContext;         /* 08h */
0270     U16                     Reserved3;          /* 0Ch */
0271     U16                     IOCStatus;          /* 0Eh */
0272     U32                     IOCLogInfo;         /* 10h */
0273 } MSG_FC_ABORT_REPLY, MPI_POINTER PTR_MSG_FC_ABORT_REPLY,
0274   FcAbortReply_t, MPI_POINTER pFcAbortReply_t;
0275 
0276 
0277 /****************************************************************************/
0278 /* FC Common Transport Send messages                                        */
0279 /****************************************************************************/
0280 
0281 typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
0282 {
0283     U8                      SendFlags;          /* 00h */
0284     U8                      AliasIndex;         /* 01h */
0285     U8                      ChainOffset;        /* 02h */
0286     U8                      Function;           /* 03h */
0287     U32                     MsgFlags_Did;       /* 04h */
0288     U32                     MsgContext;         /* 08h */
0289     U16                     CTCommandCode;      /* 0Ch */
0290     U8                      FsType;             /* 0Eh */
0291     U8                      Reserved1;          /* 0Fh */
0292     SGE_SIMPLE_UNION        SGL;                /* 10h */
0293 } MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
0294  MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
0295   FcCommonTransportSendRequest_t, MPI_POINTER pFcCommonTransportSendRequest_t;
0296 
0297 #define MPI_FC_CT_SEND_DID_MASK                 (0x00FFFFFF)
0298 #define MPI_FC_CT_SEND_DID_SHIFT                (0)
0299 #define MPI_FC_CT_SEND_MSGFLAGS_MASK            (0xFF000000)
0300 #define MPI_FC_CT_SEND_MSGFLAGS_SHIFT           (24)
0301 
0302 
0303 /* FC Common Transport Send Reply */
0304 typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
0305 {
0306     U8                      Reserved;           /* 00h */
0307     U8                      AliasIndex;         /* 01h */
0308     U8                      MsgLength;          /* 02h */
0309     U8                      Function;           /* 03h */
0310     U16                     Reserved1;          /* 04h */
0311     U8                      Reserved2;          /* 06h */
0312     U8                      MsgFlags;           /* 07h */
0313     U32                     MsgContext;         /* 08h */
0314     U16                     Reserved3;          /* 0Ch */
0315     U16                     IOCStatus;          /* 0Eh */
0316     U32                     IOCLogInfo;         /* 10h */
0317     U32                     ResponseLength;     /* 14h */
0318 } MSG_FC_COMMON_TRANSPORT_SEND_REPLY, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY,
0319   FcCommonTransportSendReply_t, MPI_POINTER pFcCommonTransportSendReply_t;
0320 
0321 
0322 /****************************************************************************/
0323 /* FC Primitive Send messages                                               */
0324 /****************************************************************************/
0325 
0326 typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST
0327 {
0328     U8                      SendFlags;          /* 00h */
0329     U8                      Reserved;           /* 01h */
0330     U8                      ChainOffset;        /* 02h */
0331     U8                      Function;           /* 03h */
0332     U16                     Reserved1;          /* 04h */
0333     U8                      Reserved2;          /* 06h */
0334     U8                      MsgFlags;           /* 07h */
0335     U32                     MsgContext;         /* 08h */
0336     U8                      FcPrimitive[4];     /* 0Ch */
0337 } MSG_FC_PRIMITIVE_SEND_REQUEST, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST,
0338   FcPrimitiveSendRequest_t, MPI_POINTER pFcPrimitiveSendRequest_t;
0339 
0340 #define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK       (0x01)
0341 #define MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK   (0x02)
0342 #define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK      (0x04)
0343 #define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND       (0x08)
0344 #define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE       (0x10)
0345 #define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND     (0x20)
0346 #define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL      (0x40)
0347 #define MPI_FC_PRIM_SEND_FLAGS_FOREVER         (0x80)
0348 
0349 /* FC Primitive Send Reply */
0350 typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY
0351 {
0352     U8                      SendFlags;          /* 00h */
0353     U8                      Reserved;           /* 01h */
0354     U8                      MsgLength;          /* 02h */
0355     U8                      Function;           /* 03h */
0356     U16                     Reserved1;          /* 04h */
0357     U8                      Reserved2;          /* 06h */
0358     U8                      MsgFlags;           /* 07h */
0359     U32                     MsgContext;         /* 08h */
0360     U16                     Reserved3;          /* 0Ch */
0361     U16                     IOCStatus;          /* 0Eh */
0362     U32                     IOCLogInfo;         /* 10h */
0363 } MSG_FC_PRIMITIVE_SEND_REPLY, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY,
0364   FcPrimitiveSendReply_t, MPI_POINTER pFcPrimitiveSendReply_t;
0365 
0366 #endif
0367