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