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