xref: /titanic_41/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mpi/mpi2_tool.h (revision 6824ee06c346d29bf3a2627dcbb6d0d2f4c7b9d7)
1 /*-
2  * Copyright (c) 2013 LSI Corp.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the author nor the names of any co-contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
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 
30 /*
31  *  Copyright (c) 2000-2013 LSI Corporation.
32  *
33  *
34  *           Name:  mpi2_tool.h
35  *          Title:  MPI diagnostic tool structures and definitions
36  *  Creation Date:  March 26, 2007
37  *
38  *    mpi2_tool.h Version:  02.00.11
39  *
40  *  Version History
41  *  ---------------
42  *
43  *  Date      Version   Description
44  *  --------  --------  ------------------------------------------------------
45  *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
46  *  12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
47  *                      structures and defines.
48  *  02-29-08  02.00.02  Modified various names to make them 32-character unique.
49  *  05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
50  *  07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
51  *                      and reply messages.
52  *                      Added MPI2_DIAG_BUF_TYPE_EXTENDED.
53  *                      Incremented MPI2_DIAG_BUF_TYPE_COUNT.
54  *  05-12-10  02.00.05  Added Diagnostic Data Upload tool.
55  *  08-11-10  02.00.06  Added defines that were missing for Diagnostic Buffer
56  *                      Post Request.
57  *  05-25-11  02.00.07  Added Flags field and related defines to
58  *                      MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
59  *  11-18-11  02.00.08  Incorporating additions for MPI v2.5.
60  *  07-10-12  02.00.09  Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
61  *                      message.
62  *  07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
63  *                      it uses MPI Chain SGE as well as MPI Simple SGE.
64  *  08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
65  *  --------------------------------------------------------------------------
66  */
67 
68 #ifndef MPI2_TOOL_H
69 #define MPI2_TOOL_H
70 
71 /*****************************************************************************
72 *
73 *               Toolbox Messages
74 *
75 *****************************************************************************/
76 
77 /* defines for the Tools */
78 #define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
79 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
80 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
81 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
82 #define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
83 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
84 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL              (0x07)
85 
86 
87 /****************************************************************************
88 *  Toolbox reply
89 ****************************************************************************/
90 
91 typedef struct _MPI2_TOOLBOX_REPLY
92 {
93     U8                      Tool;                       /* 0x00 */
94     U8                      Reserved1;                  /* 0x01 */
95     U8                      MsgLength;                  /* 0x02 */
96     U8                      Function;                   /* 0x03 */
97     U16                     Reserved2;                  /* 0x04 */
98     U8                      Reserved3;                  /* 0x06 */
99     U8                      MsgFlags;                   /* 0x07 */
100     U8                      VP_ID;                      /* 0x08 */
101     U8                      VF_ID;                      /* 0x09 */
102     U16                     Reserved4;                  /* 0x0A */
103     U16                     Reserved5;                  /* 0x0C */
104     U16                     IOCStatus;                  /* 0x0E */
105     U32                     IOCLogInfo;                 /* 0x10 */
106 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
107   Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
108 
109 
110 /****************************************************************************
111 *  Toolbox Clean Tool request
112 ****************************************************************************/
113 
114 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
115 {
116     U8                      Tool;                       /* 0x00 */
117     U8                      Reserved1;                  /* 0x01 */
118     U8                      ChainOffset;                /* 0x02 */
119     U8                      Function;                   /* 0x03 */
120     U16                     Reserved2;                  /* 0x04 */
121     U8                      Reserved3;                  /* 0x06 */
122     U8                      MsgFlags;                   /* 0x07 */
123     U8                      VP_ID;                      /* 0x08 */
124     U8                      VF_ID;                      /* 0x09 */
125     U16                     Reserved4;                  /* 0x0A */
126     U32                     Flags;                      /* 0x0C */
127    } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
128   Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
129 
130 /* values for the Flags field */
131 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
132 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
133 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
134 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
135 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
136 #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
137 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
138 #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
139 #define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
140 #define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
141 
142 
143 /****************************************************************************
144 *  Toolbox Memory Move request
145 ****************************************************************************/
146 
147 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
148 {
149     U8                      Tool;                       /* 0x00 */
150     U8                      Reserved1;                  /* 0x01 */
151     U8                      ChainOffset;                /* 0x02 */
152     U8                      Function;                   /* 0x03 */
153     U16                     Reserved2;                  /* 0x04 */
154     U8                      Reserved3;                  /* 0x06 */
155     U8                      MsgFlags;                   /* 0x07 */
156     U8                      VP_ID;                      /* 0x08 */
157     U8                      VF_ID;                      /* 0x09 */
158     U16                     Reserved4;                  /* 0x0A */
159     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
160 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
161   Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
162 
163 
164 /****************************************************************************
165 *  Toolbox Diagnostic Data Upload request
166 ****************************************************************************/
167 
168 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
169 {
170     U8                      Tool;                       /* 0x00 */
171     U8                      Reserved1;                  /* 0x01 */
172     U8                      ChainOffset;                /* 0x02 */
173     U8                      Function;                   /* 0x03 */
174     U16                     Reserved2;                  /* 0x04 */
175     U8                      Reserved3;                  /* 0x06 */
176     U8                      MsgFlags;                   /* 0x07 */
177     U8                      VP_ID;                      /* 0x08 */
178     U8                      VF_ID;                      /* 0x09 */
179     U16                     Reserved4;                  /* 0x0A */
180     U8                      SGLFlags;                   /* 0x0C */
181     U8                      Reserved5;                  /* 0x0D */
182     U16                     Reserved6;                  /* 0x0E */
183     U32                     Flags;                      /* 0x10 */
184     U32                     DataLength;                 /* 0x14 */
185     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x18 */
186 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
187   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
188   Mpi2ToolboxDiagDataUploadRequest_t,
189   MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
190 
191 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
192 
193 
194 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER
195 {
196     U32                     DiagDataLength;             /* 00h */
197     U8                      FormatCode;                 /* 04h */
198     U8                      Reserved1;                  /* 05h */
199     U16                     Reserved2;                  /* 06h */
200 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
201   Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
202 
203 
204 /****************************************************************************
205 *  Toolbox ISTWI Read Write Tool
206 ****************************************************************************/
207 
208 /* Toolbox ISTWI Read Write Tool request message */
209 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
210 {
211     U8                      Tool;                       /* 0x00 */
212     U8                      Reserved1;                  /* 0x01 */
213     U8                      ChainOffset;                /* 0x02 */
214     U8                      Function;                   /* 0x03 */
215     U16                     Reserved2;                  /* 0x04 */
216     U8                      Reserved3;                  /* 0x06 */
217     U8                      MsgFlags;                   /* 0x07 */
218     U8                      VP_ID;                      /* 0x08 */
219     U8                      VF_ID;                      /* 0x09 */
220     U16                     Reserved4;                  /* 0x0A */
221     U32                     Reserved5;                  /* 0x0C */
222     U32                     Reserved6;                  /* 0x10 */
223     U8                      DevIndex;                   /* 0x14 */
224     U8                      Action;                     /* 0x15 */
225     U8                      SGLFlags;                   /* 0x16 */
226     U8                      Flags;                      /* 0x17 */
227     U16                     TxDataLength;               /* 0x18 */
228     U16                     RxDataLength;               /* 0x1A */
229     U32                     Reserved8;                  /* 0x1C */
230     U32                     Reserved9;                  /* 0x20 */
231     U32                     Reserved10;                 /* 0x24 */
232     U32                     Reserved11;                 /* 0x28 */
233     U32                     Reserved12;                 /* 0x2C */
234     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x30 */
235 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
236   MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
237   Mpi2ToolboxIstwiReadWriteRequest_t,
238   MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
239 
240 /* values for the Action field */
241 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
242 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
243 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
244 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
245 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
246 #define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
247 
248 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
249 
250 /* values for the Flags field */
251 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE   (0x80)
252 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK         (0x07)
253 
254 
255 /* Toolbox ISTWI Read Write Tool reply message */
256 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
257 {
258     U8                      Tool;                       /* 0x00 */
259     U8                      Reserved1;                  /* 0x01 */
260     U8                      MsgLength;                  /* 0x02 */
261     U8                      Function;                   /* 0x03 */
262     U16                     Reserved2;                  /* 0x04 */
263     U8                      Reserved3;                  /* 0x06 */
264     U8                      MsgFlags;                   /* 0x07 */
265     U8                      VP_ID;                      /* 0x08 */
266     U8                      VF_ID;                      /* 0x09 */
267     U16                     Reserved4;                  /* 0x0A */
268     U16                     Reserved5;                  /* 0x0C */
269     U16                     IOCStatus;                  /* 0x0E */
270     U32                     IOCLogInfo;                 /* 0x10 */
271     U8                      DevIndex;                   /* 0x14 */
272     U8                      Action;                     /* 0x15 */
273     U8                      IstwiStatus;                /* 0x16 */
274     U8                      Reserved6;                  /* 0x17 */
275     U16                     TxDataCount;                /* 0x18 */
276     U16                     RxDataCount;                /* 0x1A */
277 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
278   Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
279 
280 
281 /****************************************************************************
282 *  Toolbox Beacon Tool request
283 ****************************************************************************/
284 
285 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
286 {
287     U8                      Tool;                       /* 0x00 */
288     U8                      Reserved1;                  /* 0x01 */
289     U8                      ChainOffset;                /* 0x02 */
290     U8                      Function;                   /* 0x03 */
291     U16                     Reserved2;                  /* 0x04 */
292     U8                      Reserved3;                  /* 0x06 */
293     U8                      MsgFlags;                   /* 0x07 */
294     U8                      VP_ID;                      /* 0x08 */
295     U8                      VF_ID;                      /* 0x09 */
296     U16                     Reserved4;                  /* 0x0A */
297     U8                      Reserved5;                  /* 0x0C */
298     U8                      PhysicalPort;               /* 0x0D */
299     U8                      Reserved6;                  /* 0x0E */
300     U8                      Flags;                      /* 0x0F */
301 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
302   Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
303 
304 /* values for the Flags field */
305 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
306 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
307 
308 
309 /****************************************************************************
310 *  Toolbox Diagnostic CLI Tool
311 ****************************************************************************/
312 
313 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
314 
315 /* MPI v2.0 Toolbox Diagnostic CLI Tool request message */
316 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
317 {
318     U8                      Tool;                       /* 0x00 */
319     U8                      Reserved1;                  /* 0x01 */
320     U8                      ChainOffset;                /* 0x02 */
321     U8                      Function;                   /* 0x03 */
322     U16                     Reserved2;                  /* 0x04 */
323     U8                      Reserved3;                  /* 0x06 */
324     U8                      MsgFlags;                   /* 0x07 */
325     U8                      VP_ID;                      /* 0x08 */
326     U8                      VF_ID;                      /* 0x09 */
327     U16                     Reserved4;                  /* 0x0A */
328     U8                      SGLFlags;                   /* 0x0C */
329     U8                      Reserved5;                  /* 0x0D */
330     U16                     Reserved6;                  /* 0x0E */
331     U32                     DataLength;                 /* 0x10 */
332     U8                      DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
333     MPI2_MPI_SGE_IO_UNION   SGL;                        /* 0x70 */
334 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
335   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
336   Mpi2ToolboxDiagnosticCliRequest_t,
337   MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
338 
339 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
340 
341 
342 /* MPI v2.5 Toolbox Diagnostic CLI Tool request message */
343 typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
344 {
345     U8                      Tool;                       /* 0x00 */
346     U8                      Reserved1;                  /* 0x01 */
347     U8                      ChainOffset;                /* 0x02 */
348     U8                      Function;                   /* 0x03 */
349     U16                     Reserved2;                  /* 0x04 */
350     U8                      Reserved3;                  /* 0x06 */
351     U8                      MsgFlags;                   /* 0x07 */
352     U8                      VP_ID;                      /* 0x08 */
353     U8                      VF_ID;                      /* 0x09 */
354     U16                     Reserved4;                  /* 0x0A */
355     U32                     Reserved5;                  /* 0x0C */
356     U32                     DataLength;                 /* 0x10 */
357     U8                      DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
358     MPI25_SGE_IO_UNION      SGL;                        /* 0x70 */
359 } MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
360   MPI2_POINTER PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
361   Mpi25ToolboxDiagnosticCliRequest_t,
362   MPI2_POINTER pMpi25ToolboxDiagnosticCliRequest_t;
363 
364 
365 /* Toolbox Diagnostic CLI Tool reply message */
366 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
367 {
368     U8                      Tool;                       /* 0x00 */
369     U8                      Reserved1;                  /* 0x01 */
370     U8                      MsgLength;                  /* 0x02 */
371     U8                      Function;                   /* 0x03 */
372     U16                     Reserved2;                  /* 0x04 */
373     U8                      Reserved3;                  /* 0x06 */
374     U8                      MsgFlags;                   /* 0x07 */
375     U8                      VP_ID;                      /* 0x08 */
376     U8                      VF_ID;                      /* 0x09 */
377     U16                     Reserved4;                  /* 0x0A */
378     U16                     Reserved5;                  /* 0x0C */
379     U16                     IOCStatus;                  /* 0x0E */
380     U32                     IOCLogInfo;                 /* 0x10 */
381     U32                     ReturnedDataLength;         /* 0x14 */
382 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
383   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
384   Mpi2ToolboxDiagnosticCliReply_t,
385   MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
386 
387 
388 /****************************************************************************
389 *  Toolbox Console Text Display Tool
390 ****************************************************************************/
391 
392 /* Toolbox Console Text Display Tool request message */
393 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST
394 {
395     U8                      Tool;               /* 0x00 */
396     U8                      Reserved1;          /* 0x01 */
397     U8                      ChainOffset;        /* 0x02 */
398     U8                      Function;           /* 0x03 */
399     U16                     Reserved2;          /* 0x04 */
400     U8                      Reserved3;          /* 0x06 */
401     U8                      MsgFlags;           /* 0x07 */
402     U8                      VP_ID;              /* 0x08 */
403     U8                      VF_ID;              /* 0x09 */
404     U16                     Reserved4;          /* 0x0A */
405     U8                      Console;            /* 0x0C */
406     U8                      Flags;              /* 0x0D */
407     U16                     Reserved6;          /* 0x0E */
408     U8                      TextToDisplay[4];   /* 0x10 */ /* actual length determined at runtime based on frame size */
409 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
410   MPI2_POINTER PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
411   Mpi2ToolboxTextDisplayRequest_t,
412   MPI2_POINTER pMpi2ToolboxTextDisplayRequest_t;
413 
414 /* defines for the Console field */
415 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK          (0xF0)
416 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT       (0x00)
417 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART          (0x10)
418 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET      (0x20)
419 
420 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK        (0x0F)
421 
422 /* defines for the Flags field */
423 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP     (0x01)
424 
425 
426 
427 /*****************************************************************************
428 *
429 *       Diagnostic Buffer Messages
430 *
431 *****************************************************************************/
432 
433 
434 /****************************************************************************
435 *  Diagnostic Buffer Post request
436 ****************************************************************************/
437 
438 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
439 {
440     U8                      ExtendedType;               /* 0x00 */
441     U8                      BufferType;                 /* 0x01 */
442     U8                      ChainOffset;                /* 0x02 */
443     U8                      Function;                   /* 0x03 */
444     U16                     Reserved2;                  /* 0x04 */
445     U8                      Reserved3;                  /* 0x06 */
446     U8                      MsgFlags;                   /* 0x07 */
447     U8                      VP_ID;                      /* 0x08 */
448     U8                      VF_ID;                      /* 0x09 */
449     U16                     Reserved4;                  /* 0x0A */
450     U64                     BufferAddress;              /* 0x0C */
451     U32                     BufferLength;               /* 0x14 */
452     U32                     Reserved5;                  /* 0x18 */
453     U32                     Reserved6;                  /* 0x1C */
454     U32                     Flags;                      /* 0x20 */
455     U32                     ProductSpecific[23];        /* 0x24 */
456 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
457   Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
458 
459 /* values for the ExtendedType field */
460 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION         (0x02)
461 
462 /* values for the BufferType field */
463 #define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
464 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
465 #define MPI2_DIAG_BUF_TYPE_EXTENDED                 (0x02)
466 /* count of the number of buffer types */
467 #define MPI2_DIAG_BUF_TYPE_COUNT                    (0x03)
468 
469 /* values for the Flags field */
470 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL          (0x00000002) /* for MPI v2.0 products only */
471 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE        (0x00000001)
472 
473 
474 /****************************************************************************
475 *  Diagnostic Buffer Post reply
476 ****************************************************************************/
477 
478 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
479 {
480     U8                      ExtendedType;               /* 0x00 */
481     U8                      BufferType;                 /* 0x01 */
482     U8                      MsgLength;                  /* 0x02 */
483     U8                      Function;                   /* 0x03 */
484     U16                     Reserved2;                  /* 0x04 */
485     U8                      Reserved3;                  /* 0x06 */
486     U8                      MsgFlags;                   /* 0x07 */
487     U8                      VP_ID;                      /* 0x08 */
488     U8                      VF_ID;                      /* 0x09 */
489     U16                     Reserved4;                  /* 0x0A */
490     U16                     Reserved5;                  /* 0x0C */
491     U16                     IOCStatus;                  /* 0x0E */
492     U32                     IOCLogInfo;                 /* 0x10 */
493     U32                     TransferLength;             /* 0x14 */
494 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
495   Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
496 
497 
498 /****************************************************************************
499 *  Diagnostic Release request
500 ****************************************************************************/
501 
502 typedef struct _MPI2_DIAG_RELEASE_REQUEST
503 {
504     U8                      Reserved1;                  /* 0x00 */
505     U8                      BufferType;                 /* 0x01 */
506     U8                      ChainOffset;                /* 0x02 */
507     U8                      Function;                   /* 0x03 */
508     U16                     Reserved2;                  /* 0x04 */
509     U8                      Reserved3;                  /* 0x06 */
510     U8                      MsgFlags;                   /* 0x07 */
511     U8                      VP_ID;                      /* 0x08 */
512     U8                      VF_ID;                      /* 0x09 */
513     U16                     Reserved4;                  /* 0x0A */
514 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
515   Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
516 
517 
518 /****************************************************************************
519 *  Diagnostic Buffer Post reply
520 ****************************************************************************/
521 
522 typedef struct _MPI2_DIAG_RELEASE_REPLY
523 {
524     U8                      Reserved1;                  /* 0x00 */
525     U8                      BufferType;                 /* 0x01 */
526     U8                      MsgLength;                  /* 0x02 */
527     U8                      Function;                   /* 0x03 */
528     U16                     Reserved2;                  /* 0x04 */
529     U8                      Reserved3;                  /* 0x06 */
530     U8                      MsgFlags;                   /* 0x07 */
531     U8                      VP_ID;                      /* 0x08 */
532     U8                      VF_ID;                      /* 0x09 */
533     U16                     Reserved4;                  /* 0x0A */
534     U16                     Reserved5;                  /* 0x0C */
535     U16                     IOCStatus;                  /* 0x0E */
536     U32                     IOCLogInfo;                 /* 0x10 */
537 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
538   Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
539 
540 
541 #endif
542 
543