1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2006-2015 LSI Corp.
5 * Copyright (c) 2013-2015 Avago Technologies
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD
30 */
31
32/*
33 *  Copyright (c) 2006-2015 LSI Corporation.
34 *  Copyright (c) 2013-2015 Avago Technologies
35 *
36 *
37 *           Name:  mpi2_targ.h
38 *          Title:  MPI Target mode messages and structures
39 *  Creation Date:  September 8, 2006
40 *
41 *    mpi2_targ.h Version: 02.00.04
42 *
43 *  Version History
44 *  ---------------
45 *
46 *  Date      Version   Description
47 *  --------  --------  ------------------------------------------------------
48 *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
49 *  08-31-07  02.00.01  Added Command Buffer Data Location Address Space bits to
50 *                      BufferPostFlags field of CommandBufferPostBase Request.
51 *  02-29-08  02.00.02  Modified various names to make them 32-character unique.
52 *  10-02-08  02.00.03  Removed NextCmdBufferOffset from
53 *                      MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST.
54 *                      Target Status Send Request only takes a single SGE for
55 *                      response data.
56 *  02-10-10  02.00.04  Added comment to MPI2_TARGET_SSP_RSP_IU structure.
57 *  --------------------------------------------------------------------------
58 */
59
60#ifndef MPI2_TARG_H
61#define MPI2_TARG_H
62
63/******************************************************************************
64*
65*        SCSI Target Messages
66*
67*******************************************************************************/
68
69/****************************************************************************
70*  Target Command Buffer Post Base Request
71****************************************************************************/
72
73typedef struct _MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST
74{
75    U8                      BufferPostFlags;        /* 0x00 */
76    U8                      Reserved1;              /* 0x01 */
77    U8                      ChainOffset;            /* 0x02 */
78    U8                      Function;               /* 0x03 */
79    U16                     TotalCmdBuffers;        /* 0x04 */
80    U8                      Reserved;               /* 0x06 */
81    U8                      MsgFlags;               /* 0x07 */
82    U8                      VP_ID;                  /* 0x08 */
83    U8                      VF_ID;                  /* 0x09 */
84    U16                     Reserved2;              /* 0x0A */
85    U32                     Reserved3;              /* 0x0C */
86    U16                     CmdBufferLength;        /* 0x10 */
87    U16                     Reserved4;              /* 0x12 */
88    U32                     BaseAddressLow;         /* 0x14 */
89    U32                     BaseAddressHigh;        /* 0x18 */
90} MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST,
91  MPI2_POINTER PTR_MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST,
92  Mpi2TargetCmdBufferPostBaseRequest_t,
93  MPI2_POINTER pMpi2TargetCmdBufferPostBaseRequest_t;
94
95/* values for the BufferPostflags field */
96#define MPI2_CMD_BUF_POST_BASE_ADDRESS_SPACE_MASK            (0x0C)
97#define MPI2_CMD_BUF_POST_BASE_SYSTEM_ADDRESS_SPACE          (0x00)
98#define MPI2_CMD_BUF_POST_BASE_IOCDDR_ADDRESS_SPACE          (0x04)
99#define MPI2_CMD_BUF_POST_BASE_IOCPLB_ADDRESS_SPACE          (0x08)
100#define MPI2_CMD_BUF_POST_BASE_IOCPLBNTA_ADDRESS_SPACE       (0x0C)
101
102#define MPI2_CMD_BUF_POST_BASE_FLAGS_AUTO_POST_ALL           (0x01)
103
104/****************************************************************************
105*  Target Command Buffer Post List Request
106****************************************************************************/
107
108typedef struct _MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST
109{
110    U16                     Reserved;               /* 0x00 */
111    U8                      ChainOffset;            /* 0x02 */
112    U8                      Function;               /* 0x03 */
113    U16                     CmdBufferCount;         /* 0x04 */
114    U8                      Reserved1;              /* 0x06 */
115    U8                      MsgFlags;               /* 0x07 */
116    U8                      VP_ID;                  /* 0x08 */
117    U8                      VF_ID;                  /* 0x09 */
118    U16                     Reserved2;              /* 0x0A */
119    U32                     Reserved3;              /* 0x0C */
120    U16                     IoIndex[2];             /* 0x10 */
121} MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST,
122  MPI2_POINTER PTR_MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST,
123  Mpi2TargetCmdBufferPostListRequest_t,
124  MPI2_POINTER pMpi2TargetCmdBufferPostListRequest_t;
125
126/****************************************************************************
127*  Target Command Buffer Post Base List Reply
128****************************************************************************/
129
130typedef struct _MPI2_TARGET_BUF_POST_BASE_LIST_REPLY
131{
132    U8                      Flags;                  /* 0x00 */
133    U8                      Reserved;               /* 0x01 */
134    U8                      MsgLength;              /* 0x02 */
135    U8                      Function;               /* 0x03 */
136    U16                     Reserved1;              /* 0x04 */
137    U8                      Reserved2;              /* 0x06 */
138    U8                      MsgFlags;               /* 0x07 */
139    U8                      VP_ID;                  /* 0x08 */
140    U8                      VF_ID;                  /* 0x09 */
141    U16                     Reserved3;              /* 0x0A */
142    U16                     Reserved4;              /* 0x0C */
143    U16                     IOCStatus;              /* 0x0E */
144    U32                     IOCLogInfo;             /* 0x10 */
145    U16                     IoIndex;                /* 0x14 */
146    U16                     Reserved5;              /* 0x16 */
147    U32                     Reserved6;              /* 0x18 */
148} MPI2_TARGET_BUF_POST_BASE_LIST_REPLY,
149  MPI2_POINTER PTR_MPI2_TARGET_BUF_POST_BASE_LIST_REPLY,
150  Mpi2TargetCmdBufferPostBaseListReply_t,
151  MPI2_POINTER pMpi2TargetCmdBufferPostBaseListReply_t;
152
153/* Flags defines */
154#define MPI2_CMD_BUF_POST_REPLY_IOINDEX_VALID       (0x01)
155
156/****************************************************************************
157*  Command Buffer Formats (with 16 byte CDB)
158****************************************************************************/
159
160typedef struct _MPI2_TARGET_SSP_CMD_BUFFER
161{
162    U8      FrameType;                                  /* 0x00 */
163    U8      Reserved1;                                  /* 0x01 */
164    U16     InitiatorConnectionTag;                     /* 0x02 */
165    U32     HashedSourceSASAddress;                     /* 0x04 */
166    U16     Reserved2;                                  /* 0x08 */
167    U16     Flags;                                      /* 0x0A */
168    U32     Reserved3;                                  /* 0x0C */
169    U16     Tag;                                        /* 0x10 */
170    U16     TargetPortTransferTag;                      /* 0x12 */
171    U32     DataOffset;                                 /* 0x14 */
172    /* COMMAND information unit starts here */
173    U8      LogicalUnitNumber[8];                       /* 0x18 */
174    U8      Reserved4;                                  /* 0x20 */
175    U8      TaskAttribute; /* lower 3 bits */           /* 0x21 */
176    U8      Reserved5;                                  /* 0x22 */
177    U8      AdditionalCDBLength; /* upper 5 bits */     /* 0x23 */
178    U8      CDB[16];                                    /* 0x24 */
179    /* Additional CDB bytes extend past the CDB field */
180} MPI2_TARGET_SSP_CMD_BUFFER, MPI2_POINTER PTR_MPI2_TARGET_SSP_CMD_BUFFER,
181  Mpi2TargetSspCmdBuffer, MPI2_POINTER pMp2iTargetSspCmdBuffer;
182
183typedef struct _MPI2_TARGET_SSP_TASK_BUFFER
184{
185    U8      FrameType;                                  /* 0x00 */
186    U8      Reserved1;                                  /* 0x01 */
187    U16     InitiatorConnectionTag;                     /* 0x02 */
188    U32     HashedSourceSASAddress;                     /* 0x04 */
189    U16     Reserved2;                                  /* 0x08 */
190    U16     Flags;                                      /* 0x0A */
191    U32     Reserved3;                                  /* 0x0C */
192    U16     Tag;                                        /* 0x10 */
193    U16     TargetPortTransferTag;                      /* 0x12 */
194    U32     DataOffset;                                 /* 0x14 */
195    /* TASK information unit starts here */
196    U8      LogicalUnitNumber[8];                       /* 0x18 */
197    U16     Reserved4;                                  /* 0x20 */
198    U8      TaskManagementFunction;                     /* 0x22 */
199    U8      Reserved5;                                  /* 0x23 */
200    U16     ManagedTaskTag;                             /* 0x24 */
201    U16     Reserved6;                                  /* 0x26 */
202    U32     Reserved7;                                  /* 0x28 */
203    U32     Reserved8;                                  /* 0x2C */
204    U32     Reserved9;                                  /* 0x30 */
205} MPI2_TARGET_SSP_TASK_BUFFER, MPI2_POINTER PTR_MPI2_TARGET_SSP_TASK_BUFFER,
206  Mpi2TargetSspTaskBuffer, MPI2_POINTER pMpi2TargetSspTaskBuffer;
207
208/* mask and shift for HashedSourceSASAddress field */
209#define MPI2_TARGET_HASHED_SAS_ADDRESS_MASK     (0xFFFFFF00)
210#define MPI2_TARGET_HASHED_SAS_ADDRESS_SHIFT    (8)
211
212/****************************************************************************
213*   Target Assist Request
214****************************************************************************/
215
216typedef struct _MPI2_TARGET_ASSIST_REQUEST
217{
218    U8                  Reserved1;                          /* 0x00 */
219    U8                  TargetAssistFlags;                  /* 0x01 */
220    U8                  ChainOffset;                        /* 0x02 */
221    U8                  Function;                           /* 0x03 */
222    U16                 QueueTag;                           /* 0x04 */
223    U8                  Reserved2;                          /* 0x06 */
224    U8                  MsgFlags;                           /* 0x07 */
225    U8                  VP_ID;                              /* 0x08 */
226    U8                  VF_ID;                              /* 0x09 */
227    U16                 Reserved3;                          /* 0x0A */
228    U16                 IoIndex;                            /* 0x0C */
229    U16                 InitiatorConnectionTag;             /* 0x0E */
230    U16                 SGLFlags;                           /* 0x10 */
231    U8                  SequenceNumber;                     /* 0x12 */
232    U8                  Reserved4;                          /* 0x13 */
233    U8                  SGLOffset0;                         /* 0x14 */
234    U8                  SGLOffset1;                         /* 0x15 */
235    U8                  SGLOffset2;                         /* 0x16 */
236    U8                  SGLOffset3;                         /* 0x17 */
237    U32                 SkipCount;                          /* 0x18 */
238    U32                 DataLength;                         /* 0x1C */
239    U32                 BidirectionalDataLength;            /* 0x20 */
240    U16                 IoFlags;                            /* 0x24 */
241    U16                 EEDPFlags;                          /* 0x26 */
242    U32                 EEDPBlockSize;                      /* 0x28 */
243    U32                 SecondaryReferenceTag;              /* 0x2C */
244    U16                 SecondaryApplicationTag;            /* 0x30 */
245    U16                 ApplicationTagTranslationMask;      /* 0x32 */
246    U32                 PrimaryReferenceTag;                /* 0x34 */
247    U16                 PrimaryApplicationTag;              /* 0x38 */
248    U16                 PrimaryApplicationTagMask;          /* 0x3A */
249    U32                 RelativeOffset;                     /* 0x3C */
250    U32                 Reserved5;                          /* 0x40 */
251    U32                 Reserved6;                          /* 0x44 */
252    U32                 Reserved7;                          /* 0x48 */
253    U32                 Reserved8;                          /* 0x4C */
254    MPI2_SGE_IO_UNION   SGL[1];                             /* 0x50 */
255} MPI2_TARGET_ASSIST_REQUEST, MPI2_POINTER PTR_MPI2_TARGET_ASSIST_REQUEST,
256  Mpi2TargetAssistRequest_t, MPI2_POINTER pMpi2TargetAssistRequest_t;
257
258/* Target Assist TargetAssistFlags bits */
259
260#define MPI2_TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER      (0x80)
261#define MPI2_TARGET_ASSIST_FLAGS_TLR                    (0x10)
262#define MPI2_TARGET_ASSIST_FLAGS_RETRANSMIT             (0x04)
263#define MPI2_TARGET_ASSIST_FLAGS_AUTO_STATUS            (0x02)
264#define MPI2_TARGET_ASSIST_FLAGS_DATA_DIRECTION         (0x01)
265
266/* Target Assist SGLFlags bits */
267
268/* base values for Data Location Address Space */
269#define MPI2_TARGET_ASSIST_SGLFLAGS_ADDR_MASK           (0x0C)
270#define MPI2_TARGET_ASSIST_SGLFLAGS_SYSTEM_ADDR         (0x00)
271#define MPI2_TARGET_ASSIST_SGLFLAGS_IOCDDR_ADDR         (0x04)
272#define MPI2_TARGET_ASSIST_SGLFLAGS_IOCPLB_ADDR         (0x08)
273#define MPI2_TARGET_ASSIST_SGLFLAGS_PLBNTA_ADDR         (0x0C)
274
275/* base values for Type */
276#define MPI2_TARGET_ASSIST_SGLFLAGS_TYPE_MASK           (0x03)
277#define MPI2_TARGET_ASSIST_SGLFLAGS_MPI_TYPE            (0x00)
278#define MPI2_TARGET_ASSIST_SGLFLAGS_32IEEE_TYPE         (0x01)
279#define MPI2_TARGET_ASSIST_SGLFLAGS_64IEEE_TYPE         (0x02)
280
281/* shift values for each sub-field */
282#define MPI2_TARGET_ASSIST_SGLFLAGS_SGL3_SHIFT          (12)
283#define MPI2_TARGET_ASSIST_SGLFLAGS_SGL2_SHIFT          (8)
284#define MPI2_TARGET_ASSIST_SGLFLAGS_SGL1_SHIFT          (4)
285#define MPI2_TARGET_ASSIST_SGLFLAGS_SGL0_SHIFT          (0)
286
287/* Target Assist IoFlags bits */
288
289#define MPI2_TARGET_ASSIST_IOFLAGS_BIDIRECTIONAL        (0x0800)
290#define MPI2_TARGET_ASSIST_IOFLAGS_MULTICAST            (0x0400)
291#define MPI2_TARGET_ASSIST_IOFLAGS_RECEIVE_FIRST        (0x0200)
292
293/* Target Assist EEDPFlags bits */
294
295#define MPI2_TA_EEDPFLAGS_INC_PRI_REFTAG            (0x8000)
296#define MPI2_TA_EEDPFLAGS_INC_SEC_REFTAG            (0x4000)
297#define MPI2_TA_EEDPFLAGS_INC_PRI_APPTAG            (0x2000)
298#define MPI2_TA_EEDPFLAGS_INC_SEC_APPTAG            (0x1000)
299
300#define MPI2_TA_EEDPFLAGS_CHECK_REFTAG              (0x0400)
301#define MPI2_TA_EEDPFLAGS_CHECK_APPTAG              (0x0200)
302#define MPI2_TA_EEDPFLAGS_CHECK_GUARD               (0x0100)
303
304#define MPI2_TA_EEDPFLAGS_PASSTHRU_REFTAG           (0x0008)
305
306#define MPI2_TA_EEDPFLAGS_MASK_OP                   (0x0007)
307#define MPI2_TA_EEDPFLAGS_NOOP_OP                   (0x0000)
308#define MPI2_TA_EEDPFLAGS_CHECK_OP                  (0x0001)
309#define MPI2_TA_EEDPFLAGS_STRIP_OP                  (0x0002)
310#define MPI2_TA_EEDPFLAGS_CHECK_REMOVE_OP           (0x0003)
311#define MPI2_TA_EEDPFLAGS_INSERT_OP                 (0x0004)
312#define MPI2_TA_EEDPFLAGS_REPLACE_OP                (0x0006)
313#define MPI2_TA_EEDPFLAGS_CHECK_REGEN_OP            (0x0007)
314
315/****************************************************************************
316*  Target Status Send Request
317****************************************************************************/
318
319typedef struct _MPI2_TARGET_STATUS_SEND_REQUEST
320{
321    U8                      Reserved1;                  /* 0x00 */
322    U8                      StatusFlags;                /* 0x01 */
323    U8                      ChainOffset;                /* 0x02 */
324    U8                      Function;                   /* 0x03 */
325    U16                     QueueTag;                   /* 0x04 */
326    U8                      Reserved2;                  /* 0x06 */
327    U8                      MsgFlags;                   /* 0x07 */
328    U8                      VP_ID;                      /* 0x08 */
329    U8                      VF_ID;                      /* 0x09 */
330    U16                     Reserved3;                  /* 0x0A */
331    U16                     IoIndex;                    /* 0x0C */
332    U16                     InitiatorConnectionTag;     /* 0x0E */
333    U16                     SGLFlags;                   /* 0x10 */
334    U16                     Reserved4;                  /* 0x12 */
335    U8                      SGLOffset0;                 /* 0x14 */
336    U8                      Reserved5;                  /* 0x15 */
337    U16                     Reserved6;                  /* 0x16 */
338    U32                     Reserved7;                  /* 0x18 */
339    U32                     Reserved8;                  /* 0x1C */
340    MPI2_SIMPLE_SGE_UNION   StatusDataSGE;              /* 0x20 */
341} MPI2_TARGET_STATUS_SEND_REQUEST,
342  MPI2_POINTER PTR_MPI2_TARGET_STATUS_SEND_REQUEST,
343  Mpi2TargetStatusSendRequest_t, MPI2_POINTER pMpi2TargetStatusSendRequest_t;
344
345/* Target Status Send StatusFlags bits */
346
347#define MPI2_TSS_FLAGS_REPOST_CMD_BUFFER            (0x80)
348#define MPI2_TSS_FLAGS_RETRANSMIT                   (0x04)
349#define MPI2_TSS_FLAGS_AUTO_GOOD_STATUS             (0x01)
350
351/* Target Status Send SGLFlags bits */
352/* Data Location Address Space */
353#define MPI2_TSS_SGLFLAGS_ADDR_MASK                 (0x0C)
354#define MPI2_TSS_SGLFLAGS_SYSTEM_ADDR               (0x00)
355#define MPI2_TSS_SGLFLAGS_IOCDDR_ADDR               (0x04)
356#define MPI2_TSS_SGLFLAGS_IOCPLB_ADDR               (0x08)
357#define MPI2_TSS_SGLFLAGS_IOCPLBNTA_ADDR            (0x0C)
358/* Type */
359#define MPI2_TSS_SGLFLAGS_TYPE_MASK                 (0x03)
360#define MPI2_TSS_SGLFLAGS_MPI_TYPE                  (0x00)
361#define MPI2_TSS_SGLFLAGS_IEEE32_TYPE               (0x01)
362#define MPI2_TSS_SGLFLAGS_IEEE64_TYPE               (0x02)
363
364/*
365 * NOTE: The SSP status IU is big-endian. When used on a little-endian system,
366 * this structure properly orders the bytes.
367 */
368typedef struct _MPI2_TARGET_SSP_RSP_IU
369{
370    U32     Reserved0[6]; /* reserved for SSP header */ /* 0x00 */
371
372    /* start of RESPONSE information unit */
373    U32     Reserved1;                                  /* 0x18 */
374    U32     Reserved2;                                  /* 0x1C */
375    U16     Reserved3;                                  /* 0x20 */
376    U8      DataPres; /* lower 2 bits */                /* 0x22 */
377    U8      Status;                                     /* 0x23 */
378    U32     Reserved4;                                  /* 0x24 */
379    U32     SenseDataLength;                            /* 0x28 */
380    U32     ResponseDataLength;                         /* 0x2C */
381
382    /* start of Response or Sense Data (size may vary dynamically) */
383    U8      ResponseSenseData[4];                       /* 0x30 */
384} MPI2_TARGET_SSP_RSP_IU, MPI2_POINTER PTR_MPI2_TARGET_SSP_RSP_IU,
385  Mpi2TargetSspRspIu_t, MPI2_POINTER pMpi2TargetSspRspIu_t;
386
387/****************************************************************************
388*  Target Standard Reply - used with Target Assist or Target Status Send
389****************************************************************************/
390
391typedef struct _MPI2_TARGET_STANDARD_REPLY
392{
393    U16                     Reserved;                   /* 0x00 */
394    U8                      MsgLength;                  /* 0x02 */
395    U8                      Function;                   /* 0x03 */
396    U16                     Reserved1;                  /* 0x04 */
397    U8                      Reserved2;                  /* 0x06 */
398    U8                      MsgFlags;                   /* 0x07 */
399    U8                      VP_ID;                      /* 0x08 */
400    U8                      VF_ID;                      /* 0x09 */
401    U16                     Reserved3;                  /* 0x0A */
402    U16                     Reserved4;                  /* 0x0C */
403    U16                     IOCStatus;                  /* 0x0E */
404    U32                     IOCLogInfo;                 /* 0x10 */
405    U16                     IoIndex;                    /* 0x14 */
406    U16                     Reserved5;                  /* 0x16 */
407    U32                     TransferCount;              /* 0x18 */
408    U32                     BidirectionalTransferCount; /* 0x1C */
409} MPI2_TARGET_STANDARD_REPLY, MPI2_POINTER PTR_MPI2_TARGET_STANDARD_REPLY,
410  Mpi2TargetErrorReply_t, MPI2_POINTER pMpi2TargetErrorReply_t;
411
412/****************************************************************************
413*  Target Mode Abort Request
414****************************************************************************/
415
416typedef struct _MPI2_TARGET_MODE_ABORT_REQUEST
417{
418    U8                      AbortType;                  /* 0x00 */
419    U8                      Reserved1;                  /* 0x01 */
420    U8                      ChainOffset;                /* 0x02 */
421    U8                      Function;                   /* 0x03 */
422    U16                     Reserved2;                  /* 0x04 */
423    U8                      Reserved3;                  /* 0x06 */
424    U8                      MsgFlags;                   /* 0x07 */
425    U8                      VP_ID;                      /* 0x08 */
426    U8                      VF_ID;                      /* 0x09 */
427    U16                     Reserved4;                  /* 0x0A */
428    U16                     IoIndexToAbort;             /* 0x0C */
429    U16                     Reserved6;                  /* 0x0E */
430    U32                     MidToAbort;                 /* 0x10 */
431} MPI2_TARGET_MODE_ABORT, MPI2_POINTER PTR_MPI2_TARGET_MODE_ABORT,
432  Mpi2TargetModeAbort_t, MPI2_POINTER pMpi2TargetModeAbort_t;
433
434/* Target Mode Abort AbortType values */
435
436#define MPI2_TARGET_MODE_ABORT_ALL_CMD_BUFFERS      (0x00)
437#define MPI2_TARGET_MODE_ABORT_ALL_IO               (0x01)
438#define MPI2_TARGET_MODE_ABORT_EXACT_IO             (0x02)
439#define MPI2_TARGET_MODE_ABORT_EXACT_IO_REQUEST     (0x03)
440#define MPI2_TARGET_MODE_ABORT_IO_REQUEST_AND_IO    (0x04)
441
442/****************************************************************************
443*  Target Mode Abort Reply
444****************************************************************************/
445
446typedef struct _MPI2_TARGET_MODE_ABORT_REPLY
447{
448    U16                     Reserved;                   /* 0x00 */
449    U8                      MsgLength;                  /* 0x02 */
450    U8                      Function;                   /* 0x03 */
451    U16                     Reserved1;                  /* 0x04 */
452    U8                      Reserved2;                  /* 0x06 */
453    U8                      MsgFlags;                   /* 0x07 */
454    U8                      VP_ID;                      /* 0x08 */
455    U8                      VF_ID;                      /* 0x09 */
456    U16                     Reserved3;                  /* 0x0A */
457    U16                     Reserved4;                  /* 0x0C */
458    U16                     IOCStatus;                  /* 0x0E */
459    U32                     IOCLogInfo;                 /* 0x10 */
460    U32                     AbortCount;                 /* 0x14 */
461} MPI2_TARGET_MODE_ABORT_REPLY, MPI2_POINTER PTR_MPI2_TARGET_MODE_ABORT_REPLY,
462  Mpi2TargetModeAbortReply_t, MPI2_POINTER pMpi2TargetModeAbortReply_t;
463
464#endif
465