1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2000-2008 LSI Corporation.
7 * Title: MPI Fibre Channel messages and structures
8 * Creation Date: June 12, 2000
10 * mpi_fc.h Version: 01.05.01
15 * Date Version Description
16 * -------- -------- ------------------------------------------------------
17 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
18 * 06-06-00 01.00.01 Update version number for 1.0 release.
19 * 06-12-00 01.00.02 Added _MSG_FC_ABORT_REPLY structure.
20 * 11-02-00 01.01.01 Original release for post 1.0 work
21 * 12-04-00 01.01.02 Added messages for Common Transport Send and
23 * 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix
24 * and modified the FcPrimitiveSend flags.
25 * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger
27 * Added FC_ABORT_TYPE_CT_SEND_REQUEST and
28 * FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.
29 * Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.
30 * 02-20-01 01.01.05 Started using MPI_POINTER.
31 * 03-27-01 01.01.06 Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY
32 * and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.
33 * Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
34 * Added structure offset comments.
35 * 04-09-01 01.01.07 Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
36 * 08-08-01 01.02.01 Original release for v1.2 work.
37 * 09-28-01 01.02.02 Change name of reserved field in
38 * MSG_LINK_SERVICE_RSP_REPLY.
39 * 05-31-02 01.02.03 Adding AliasIndex to FC Direct Access requests.
40 * 01-16-04 01.02.04 Added define for MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK.
41 * 05-11-04 01.03.01 Original release for MPI v1.3.
42 * 08-19-04 01.05.01 Original release for MPI v1.5.
43 * --------------------------------------------------------------------------
50 /*****************************************************************************
52 * F C D i r e c t A c c e s s M e s s a g e s
54 *****************************************************************************/
56 /****************************************************************************/
57 /* Link Service Buffer Post messages */
58 /****************************************************************************/
60 typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST
62 U8 BufferPostFlags
; /* 00h */
63 U8 BufferCount
; /* 01h */
64 U8 ChainOffset
; /* 02h */
65 U8 Function
; /* 03h */
66 U16 Reserved
; /* 04h */
67 U8 Reserved1
; /* 06h */
68 U8 MsgFlags
; /* 07h */
69 U32 MsgContext
; /* 08h */
70 SGE_TRANS_SIMPLE_UNION SGL
;
71 } MSG_LINK_SERVICE_BUFFER_POST_REQUEST
,
72 MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST
,
73 LinkServiceBufferPostRequest_t
, MPI_POINTER pLinkServiceBufferPostRequest_t
;
75 #define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)
77 typedef struct _WWNFORMAT
79 U32 PortNameHigh
; /* 00h */
80 U32 PortNameLow
; /* 04h */
81 U32 NodeNameHigh
; /* 08h */
82 U32 NodeNameLow
; /* 0Ch */
86 /* Link Service Buffer Post Reply */
87 typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY
90 U8 Reserved
; /* 01h */
91 U8 MsgLength
; /* 02h */
92 U8 Function
; /* 03h */
93 U16 Reserved1
; /* 04h */
94 U8 PortNumber
; /* 06h */
95 U8 MsgFlags
; /* 07h */
96 U32 MsgContext
; /* 08h */
97 U16 Reserved2
; /* 0Ch */
98 U16 IOCStatus
; /* 0Eh */
99 U32 IOCLogInfo
; /* 10h */
100 U32 TransferLength
; /* 14h */
101 U32 TransactionContext
; /* 18h */
102 U32 Rctl_Did
; /* 1Ch */
103 U32 Csctl_Sid
; /* 20h */
104 U32 Type_Fctl
; /* 24h */
105 U16 SeqCnt
; /* 28h */
110 U32 Parameter
; /* 30h */
111 WWNFORMAT Wwn
; /* 34h */
112 } MSG_LINK_SERVICE_BUFFER_POST_REPLY
, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY
,
113 LinkServiceBufferPostReply_t
, MPI_POINTER pLinkServiceBufferPostReply_t
;
115 #define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED (0x80)
117 #define MPI_FC_DID_MASK (0x00FFFFFF)
118 #define MPI_FC_DID_SHIFT (0)
119 #define MPI_FC_RCTL_MASK (0xFF000000)
120 #define MPI_FC_RCTL_SHIFT (24)
121 #define MPI_FC_SID_MASK (0x00FFFFFF)
122 #define MPI_FC_SID_SHIFT (0)
123 #define MPI_FC_CSCTL_MASK (0xFF000000)
124 #define MPI_FC_CSCTL_SHIFT (24)
125 #define MPI_FC_FCTL_MASK (0x00FFFFFF)
126 #define MPI_FC_FCTL_SHIFT (0)
127 #define MPI_FC_TYPE_MASK (0xFF000000)
128 #define MPI_FC_TYPE_SHIFT (24)
130 /* obsolete name for the above */
131 #define FCP_TARGET_DID_MASK (0x00FFFFFF)
132 #define FCP_TARGET_DID_SHIFT (0)
133 #define FCP_TARGET_RCTL_MASK (0xFF000000)
134 #define FCP_TARGET_RCTL_SHIFT (24)
135 #define FCP_TARGET_SID_MASK (0x00FFFFFF)
136 #define FCP_TARGET_SID_SHIFT (0)
137 #define FCP_TARGET_CSCTL_MASK (0xFF000000)
138 #define FCP_TARGET_CSCTL_SHIFT (24)
139 #define FCP_TARGET_FCTL_MASK (0x00FFFFFF)
140 #define FCP_TARGET_FCTL_SHIFT (0)
141 #define FCP_TARGET_TYPE_MASK (0xFF000000)
142 #define FCP_TARGET_TYPE_SHIFT (24)
145 /****************************************************************************/
146 /* Link Service Response messages */
147 /****************************************************************************/
149 typedef struct _MSG_LINK_SERVICE_RSP_REQUEST
151 U8 RspFlags
; /* 00h */
152 U8 RspLength
; /* 01h */
153 U8 ChainOffset
; /* 02h */
154 U8 Function
; /* 03h */
155 U16 Reserved1
; /* 04h */
156 U8 Reserved2
; /* 06h */
157 U8 MsgFlags
; /* 07h */
158 U32 MsgContext
; /* 08h */
159 U32 Rctl_Did
; /* 0Ch */
160 U32 Csctl_Sid
; /* 10h */
161 U32 Type_Fctl
; /* 14h */
162 U16 SeqCnt
; /* 18h */
167 U32 Parameter
; /* 20h */
168 SGE_SIMPLE_UNION SGL
; /* 24h */
169 } MSG_LINK_SERVICE_RSP_REQUEST
, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST
,
170 LinkServiceRspRequest_t
, MPI_POINTER pLinkServiceRspRequest_t
;
172 #define LINK_SERVICE_RSP_FLAGS_IMMEDIATE (0x80)
173 #define LINK_SERVICE_RSP_FLAGS_PORT_MASK (0x01)
176 /* Link Service Response Reply */
177 typedef struct _MSG_LINK_SERVICE_RSP_REPLY
179 U16 Reserved
; /* 00h */
180 U8 MsgLength
; /* 02h */
181 U8 Function
; /* 03h */
182 U16 Reserved1
; /* 04h */
183 U8 Reserved_0100_InitiatorIndex
; /* 06h */ /* obsolete InitiatorIndex */
184 U8 MsgFlags
; /* 07h */
185 U32 MsgContext
; /* 08h */
186 U16 Reserved3
; /* 0Ch */
187 U16 IOCStatus
; /* 0Eh */
188 U32 IOCLogInfo
; /* 10h */
189 U32 InitiatorIndex
; /* 14h */
190 } MSG_LINK_SERVICE_RSP_REPLY
, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY
,
191 LinkServiceRspReply_t
, MPI_POINTER pLinkServiceRspReply_t
;
194 /****************************************************************************/
195 /* Extended Link Service Send messages */
196 /****************************************************************************/
198 typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
200 U8 SendFlags
; /* 00h */
201 U8 AliasIndex
; /* 01h */
202 U8 ChainOffset
; /* 02h */
203 U8 Function
; /* 03h */
204 U32 MsgFlags_Did
; /* 04h */
205 U32 MsgContext
; /* 08h */
206 U32 ElsCommandCode
; /* 0Ch */
207 SGE_SIMPLE_UNION SGL
; /* 10h */
208 } MSG_EXLINK_SERVICE_SEND_REQUEST
, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST
,
209 ExLinkServiceSendRequest_t
, MPI_POINTER pExLinkServiceSendRequest_t
;
211 #define EX_LINK_SERVICE_SEND_DID_MASK (0x00FFFFFF)
212 #define EX_LINK_SERVICE_SEND_DID_SHIFT (0)
213 #define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK (0xFF000000)
214 #define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT (24)
217 /* Extended Link Service Send Reply */
218 typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
220 U8 Reserved
; /* 00h */
221 U8 AliasIndex
; /* 01h */
222 U8 MsgLength
; /* 02h */
223 U8 Function
; /* 03h */
224 U16 Reserved1
; /* 04h */
225 U8 Reserved2
; /* 06h */
226 U8 MsgFlags
; /* 07h */
227 U32 MsgContext
; /* 08h */
228 U16 Reserved3
; /* 0Ch */
229 U16 IOCStatus
; /* 0Eh */
230 U32 IOCLogInfo
; /* 10h */
231 U32 ResponseLength
; /* 14h */
232 } MSG_EXLINK_SERVICE_SEND_REPLY
, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY
,
233 ExLinkServiceSendReply_t
, MPI_POINTER pExLinkServiceSendReply_t
;
235 /****************************************************************************/
236 /* FC Abort messages */
237 /****************************************************************************/
239 typedef struct _MSG_FC_ABORT_REQUEST
241 U8 AbortFlags
; /* 00h */
242 U8 AbortType
; /* 01h */
243 U8 ChainOffset
; /* 02h */
244 U8 Function
; /* 03h */
245 U16 Reserved1
; /* 04h */
246 U8 Reserved2
; /* 06h */
247 U8 MsgFlags
; /* 07h */
248 U32 MsgContext
; /* 08h */
249 U32 TransactionContextToAbort
; /* 0Ch */
250 } MSG_FC_ABORT_REQUEST
, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST
,
251 FcAbortRequest_t
, MPI_POINTER pFcAbortRequest_t
;
253 #define FC_ABORT_FLAG_PORT_MASK (0x01)
255 #define FC_ABORT_TYPE_ALL_FC_BUFFERS (0x00)
256 #define FC_ABORT_TYPE_EXACT_FC_BUFFER (0x01)
257 #define FC_ABORT_TYPE_CT_SEND_REQUEST (0x02)
258 #define FC_ABORT_TYPE_EXLINKSEND_REQUEST (0x03)
261 typedef struct _MSG_FC_ABORT_REPLY
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 } MSG_FC_ABORT_REPLY
, MPI_POINTER PTR_MSG_FC_ABORT_REPLY
,
274 FcAbortReply_t
, MPI_POINTER pFcAbortReply_t
;
277 /****************************************************************************/
278 /* FC Common Transport Send messages */
279 /****************************************************************************/
281 typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
283 U8 SendFlags
; /* 00h */
284 U8 AliasIndex
; /* 01h */
285 U8 ChainOffset
; /* 02h */
286 U8 Function
; /* 03h */
287 U32 MsgFlags_Did
; /* 04h */
288 U32 MsgContext
; /* 08h */
289 U16 CTCommandCode
; /* 0Ch */
291 U8 Reserved1
; /* 0Fh */
292 SGE_SIMPLE_UNION SGL
; /* 10h */
293 } MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
,
294 MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
,
295 FcCommonTransportSendRequest_t
, MPI_POINTER pFcCommonTransportSendRequest_t
;
297 #define MPI_FC_CT_SEND_DID_MASK (0x00FFFFFF)
298 #define MPI_FC_CT_SEND_DID_SHIFT (0)
299 #define MPI_FC_CT_SEND_MSGFLAGS_MASK (0xFF000000)
300 #define MPI_FC_CT_SEND_MSGFLAGS_SHIFT (24)
303 /* FC Common Transport Send Reply */
304 typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
306 U8 Reserved
; /* 00h */
307 U8 AliasIndex
; /* 01h */
308 U8 MsgLength
; /* 02h */
309 U8 Function
; /* 03h */
310 U16 Reserved1
; /* 04h */
311 U8 Reserved2
; /* 06h */
312 U8 MsgFlags
; /* 07h */
313 U32 MsgContext
; /* 08h */
314 U16 Reserved3
; /* 0Ch */
315 U16 IOCStatus
; /* 0Eh */
316 U32 IOCLogInfo
; /* 10h */
317 U32 ResponseLength
; /* 14h */
318 } MSG_FC_COMMON_TRANSPORT_SEND_REPLY
, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY
,
319 FcCommonTransportSendReply_t
, MPI_POINTER pFcCommonTransportSendReply_t
;
322 /****************************************************************************/
323 /* FC Primitive Send messages */
324 /****************************************************************************/
326 typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST
328 U8 SendFlags
; /* 00h */
329 U8 Reserved
; /* 01h */
330 U8 ChainOffset
; /* 02h */
331 U8 Function
; /* 03h */
332 U16 Reserved1
; /* 04h */
333 U8 Reserved2
; /* 06h */
334 U8 MsgFlags
; /* 07h */
335 U32 MsgContext
; /* 08h */
336 U8 FcPrimitive
[4]; /* 0Ch */
337 } MSG_FC_PRIMITIVE_SEND_REQUEST
, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST
,
338 FcPrimitiveSendRequest_t
, MPI_POINTER pFcPrimitiveSendRequest_t
;
340 #define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK (0x01)
341 #define MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK (0x02)
342 #define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK (0x04)
343 #define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND (0x08)
344 #define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE (0x10)
345 #define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND (0x20)
346 #define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL (0x40)
347 #define MPI_FC_PRIM_SEND_FLAGS_FOREVER (0x80)
349 /* FC Primitive Send Reply */
350 typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY
352 U8 SendFlags
; /* 00h */
353 U8 Reserved
; /* 01h */
354 U8 MsgLength
; /* 02h */
355 U8 Function
; /* 03h */
356 U16 Reserved1
; /* 04h */
357 U8 Reserved2
; /* 06h */
358 U8 MsgFlags
; /* 07h */
359 U32 MsgContext
; /* 08h */
360 U16 Reserved3
; /* 0Ch */
361 U16 IOCStatus
; /* 0Eh */
362 U32 IOCLogInfo
; /* 10h */
363 } MSG_FC_PRIMITIVE_SEND_REPLY
, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY
,
364 FcPrimitiveSendReply_t
, MPI_POINTER pFcPrimitiveSendReply_t
;