xref: /freebsd/sys/dev/mpi3mr/mpi/mpi30_tool.h (revision 61e21613)
1 /*
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2016-2023, Broadcom Inc. All rights reserved.
5  * Support: <fbsd-storage-driver.pdl@broadcom.com>
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice,
12  *    this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  *    this list of conditions and the following disclaimer in the documentation and/or other
15  *    materials provided with the distribution.
16  * 3. Neither the name of the Broadcom Inc. nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software without
18  *    specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  * The views and conclusions contained in the software and documentation are
33  * those of the authors and should not be interpreted as representing
34  * official policies,either expressed or implied, of the FreeBSD Project.
35  *
36  * Mail to: Broadcom Inc 1320 Ridder Park Dr, San Jose, CA 95131
37  *
38  * Broadcom Inc. (Broadcom) MPI3MR Adapter FreeBSD
39  *
40  */
41 
42 #ifndef MPI30_TOOL_H
43 #define MPI30_TOOL_H     1
44 
45 /*****************************************************************************
46  *                     Toolbox Messages                                      *
47  *****************************************************************************/
48 
49 /*****************************************************************************
50  *                     Clean Tool Request Message                            *
51  *****************************************************************************/
52 typedef struct _MPI3_TOOL_CLEAN_REQUEST
53 {
54     U16                     HostTag;                        /* 0x00 */
55     U8                      IOCUseOnly02;                   /* 0x02 */
56     U8                      Function;                       /* 0x03 */
57     U16                     IOCUseOnly04;                   /* 0x04 */
58     U8                      IOCUseOnly06;                   /* 0x06 */
59     U8                      MsgFlags;                       /* 0x07 */
60     U16                     ChangeCount;                    /* 0x08 */
61     U8                      Tool;                           /* 0x0A */
62     U8                      Reserved0B;                     /* 0x0B */
63     U32                     Area;                           /* 0x0C */
64 } MPI3_TOOL_CLEAN_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_CLEAN_REQUEST,
65   Mpi3ToolCleanRequest_t, MPI3_POINTER pMpi3ToolCleanRequest_t;
66 
67 /**** Defines for the Tool field ****/
68 #define MPI3_TOOLBOX_TOOL_CLEAN                             (0x01)
69 #define MPI3_TOOLBOX_TOOL_ISTWI_READ_WRITE                  (0x02)
70 #define MPI3_TOOLBOX_TOOL_DIAGNOSTIC_CLI                    (0x03)
71 #define MPI3_TOOLBOX_TOOL_LANE_MARGINING                    (0x04)
72 #define MPI3_TOOLBOX_TOOL_RECOVER_DEVICE                    (0x05)
73 #define MPI3_TOOLBOX_TOOL_LOOPBACK                          (0x06)
74 
75 /**** Bitfield definitions for Area field ****/
76 #define MPI3_TOOLBOX_CLEAN_AREA_BIOS_BOOT_SERVICES          (0x00000008)
77 #define MPI3_TOOLBOX_CLEAN_AREA_ALL_BUT_MFG                 (0x00000002)
78 #define MPI3_TOOLBOX_CLEAN_AREA_NVSTORE                     (0x00000001)
79 
80 
81 /*****************************************************************************
82  *                ISTWI Read Write Tool Request Message                      *
83  *****************************************************************************/
84 typedef struct _MPI3_TOOL_ISTWI_READ_WRITE_REQUEST
85 {
86     U16                               HostTag;               /* 0x00 */
87     U8                                IOCUseOnly02;          /* 0x02 */
88     U8                                Function;              /* 0x03 */
89     U16                               IOCUseOnly04;          /* 0x04 */
90     U8                                IOCUseOnly06;          /* 0x06 */
91     U8                                MsgFlags;              /* 0x07 */
92     U16                               ChangeCount;           /* 0x08 */
93     U8                                Tool;                  /* 0x0A */
94     U8                                Flags;                 /* 0x0B */
95     U8                                DevIndex;              /* 0x0C */
96     U8                                Action;                /* 0x0D */
97     U16                               Reserved0E;            /* 0x0E */
98     U16                               TxDataLength;          /* 0x10 */
99     U16                               RxDataLength;          /* 0x12 */
100     U32                               Reserved14[3];         /* 0x14 */
101     MPI3_MAN11_ISTWI_DEVICE_FORMAT    IstwiDevice;           /* 0x20 */
102     MPI3_SGE_UNION                    SGL;                   /* 0x30 */
103 } MPI3_TOOL_ISTWI_READ_WRITE_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_ISTWI_READ_WRITE_REQUEST,
104   Mpi3ToolIstwiReadWriteRequest_t, MPI3_POINTER pMpi3ToolIstwiReadWRiteRequest_t;
105 
106 /**** Bitfield definitions for Flags field ****/
107 #define MPI3_TOOLBOX_ISTWI_FLAGS_AUTO_RESERVE_RELEASE       (0x80)
108 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_MASK          (0x04)
109 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_DEVINDEX      (0x00)
110 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_DEVICE_FIELD  (0x04)
111 #define MPI3_TOOLBOX_ISTWI_FLAGS_PAGE_ADDRESS_MASK          (0x03)
112 
113 /**** Definitions for the Action field ****/
114 #define MPI3_TOOLBOX_ISTWI_ACTION_RESERVE_BUS               (0x00)
115 #define MPI3_TOOLBOX_ISTWI_ACTION_RELEASE_BUS               (0x01)
116 #define MPI3_TOOLBOX_ISTWI_ACTION_RESET                     (0x02)
117 #define MPI3_TOOLBOX_ISTWI_ACTION_READ_DATA                 (0x03)
118 #define MPI3_TOOLBOX_ISTWI_ACTION_WRITE_DATA                (0x04)
119 #define MPI3_TOOLBOX_ISTWI_ACTION_SEQUENCE                  (0x05)
120 
121 
122 /**** Defines for the IstwiDevice field - refer to struct definition in mpi30_cnfg.h ****/
123 
124 
125 /*****************************************************************************
126  *                ISTWI Read Write Tool Reply Message                        *
127  *****************************************************************************/
128 typedef struct _MPI3_TOOL_ISTWI_READ_WRITE_REPLY
129 {
130     U16                     HostTag;                        /* 0x00 */
131     U8                      IOCUseOnly02;                   /* 0x02 */
132     U8                      Function;                       /* 0x03 */
133     U16                     IOCUseOnly04;                   /* 0x04 */
134     U8                      IOCUseOnly06;                   /* 0x06 */
135     U8                      MsgFlags;                       /* 0x07 */
136     U16                     IOCUseOnly08;                   /* 0x08 */
137     U16                     IOCStatus;                      /* 0x0A */
138     U32                     IOCLogInfo;                     /* 0x0C */
139     U16                     IstwiStatus;                    /* 0x10 */
140     U16                     Reserved12;                     /* 0x12 */
141     U16                     TxDataCount;                    /* 0x14 */
142     U16                     RxDataCount;                    /* 0x16 */
143 } MPI3_TOOL_ISTWI_READ_WRITE_REPLY, MPI3_POINTER PTR_MPI3_TOOL_ISTWI_READ_WRITE_REPLY,
144   Mpi3ToolIstwiReadWriteReply_t, MPI3_POINTER pMpi3ToolIstwiReadWRiteReply_t;
145 
146 
147 
148 /*****************************************************************************
149  *               Diagnostic CLI Tool Request Message                         *
150  *****************************************************************************/
151 typedef struct _MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST
152 {
153     U16                     HostTag;                        /* 0x00 */
154     U8                      IOCUseOnly02;                   /* 0x02 */
155     U8                      Function;                       /* 0x03 */
156     U16                     IOCUseOnly04;                   /* 0x04 */
157     U8                      IOCUseOnly06;                   /* 0x06 */
158     U8                      MsgFlags;                       /* 0x07 */
159     U16                     ChangeCount;                    /* 0x08 */
160     U8                      Tool;                           /* 0x0A */
161     U8                      Reserved0B;                     /* 0x0B */
162     U32                     CommandDataLength;              /* 0x0C */
163     U32                     ResponseDataLength;             /* 0x10 */
164     U32                     Reserved14[3];                  /* 0x14 */
165     MPI3_SGE_UNION          SGL;                            /* 0x20 */
166 } MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST,
167   Mpi3ToolDiagnosticCliRequest_t, MPI3_POINTER pMpi3ToolDiagnosticCliRequest_t;
168 
169 
170 /*****************************************************************************
171  *               Diagnostic CLI Tool Reply Message                           *
172  *****************************************************************************/
173 typedef struct _MPI3_TOOL_DIAGNOSTIC_CLI_REPLY
174 {
175     U16                     HostTag;                        /* 0x00 */
176     U8                      IOCUseOnly02;                   /* 0x02 */
177     U8                      Function;                       /* 0x03 */
178     U16                     IOCUseOnly04;                   /* 0x04 */
179     U8                      IOCUseOnly06;                   /* 0x06 */
180     U8                      MsgFlags;                       /* 0x07 */
181     U16                     IOCUseOnly08;                   /* 0x08 */
182     U16                     IOCStatus;                      /* 0x0A */
183     U32                     IOCLogInfo;                     /* 0x0C */
184     U32                     ReturnedDataLength;             /* 0x10 */
185 } MPI3_TOOL_DIAGNOSTIC_CLI_REPLY, MPI3_POINTER PTR_MPI3_TOOL_DIAGNOSTIC_CLI_REPLY,
186   Mpi3ToolDiagnosticCliReply_t, MPI3_POINTER pMpi3ToolDiagnosticCliReply_t;
187 
188 
189 /*****************************************************************************
190  *                Lane Margining Tool Request Message                        *
191  *****************************************************************************/
192 typedef struct _MPI3_TOOL_LANE_MARGIN_REQUEST
193 {
194     U16                               HostTag;               /* 0x00 */
195     U8                                IOCUseOnly02;          /* 0x02 */
196     U8                                Function;              /* 0x03 */
197     U16                               IOCUseOnly04;          /* 0x04 */
198     U8                                IOCUseOnly06;          /* 0x06 */
199     U8                                MsgFlags;              /* 0x07 */
200     U16                               ChangeCount;           /* 0x08 */
201     U8                                Tool;                  /* 0x0A */
202     U8                                Reserved0B;            /* 0x0B */
203     U8                                Action;                /* 0x0C */
204     U8                                SwitchPort;            /* 0x0D */
205     U16                               DevHandle;             /* 0x0E */
206     U8                                StartLane;             /* 0x10 */
207     U8                                NumLanes;              /* 0x11 */
208     U16                               Reserved12;            /* 0x12 */
209     U32                               Reserved14[3];         /* 0x14 */
210     MPI3_SGE_UNION                    SGL;                   /* 0x20 */
211 } MPI3_TOOL_LANE_MARGIN_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_LANE_MARGIN_REQUEST,
212   Mpi3ToolIstwiLaneMarginRequest_t, MPI3_POINTER pMpi3ToolLaneMarginRequest_t;
213 
214 /**** Definitions for the Action field ****/
215 #define MPI3_TOOLBOX_LM_ACTION_ENTER                         (0x00)
216 #define MPI3_TOOLBOX_LM_ACTION_EXIT                          (0x01)
217 #define MPI3_TOOLBOX_LM_ACTION_READ                          (0x02)
218 #define MPI3_TOOLBOX_LM_ACTION_WRITE                         (0x03)
219 
220 typedef struct _MPI3_LANE_MARGIN_ELEMENT
221 {
222     U16                               Control;                /* 0x00 */
223     U16                               Status;                 /* 0x02 */
224 } MPI3_LANE_MARGIN_ELEMENT, MPI3_POINTER PTR_MPI3_LANE_MARGIN_ELEMENT,
225   Mpi3LaneMarginElement_t, MPI3_POINTER pMpi3LaneMarginElement_t;
226 
227 /*****************************************************************************
228  *                Lane Margining Tool Reply Message                          *
229  *****************************************************************************/
230 typedef struct _MPI3_TOOL_LANE_MARGIN_REPLY
231 {
232     U16                               HostTag;               /* 0x00 */
233     U8                                IOCUseOnly02;          /* 0x02 */
234     U8                                Function;              /* 0x03 */
235     U16                               IOCUseOnly04;          /* 0x04 */
236     U8                                IOCUseOnly06;          /* 0x06 */
237     U8                                MsgFlags;              /* 0x07 */
238     U16                               IOCUseOnly08;          /* 0x08 */
239     U16                               IOCStatus;             /* 0x0A */
240     U32                               IOCLogInfo;            /* 0x0C */
241     U32                               ReturnedDataLength;    /* 0x10 */
242 } MPI3_TOOL_LANE_MARGIN_REPLY, MPI3_POINTER PTR_MPI3_TOOL_LANE_MARGIN_REPLY,
243   Mpi3ToolLaneMarginReply_t, MPI3_POINTER pMpi3ToolLaneMarginReply_t;
244 
245 /*****************************************************************************
246  *               Recover Device Request Message                              *
247  *****************************************************************************/
248 typedef struct _MPI3_TOOL_RECOVER_DEVICE_REQUEST
249 {
250     U16                               HostTag;               /* 0x00 */
251     U8                                IOCUseOnly02;          /* 0x02 */
252     U8                                Function;              /* 0x03 */
253     U16                               IOCUseOnly04;          /* 0x04 */
254     U8                                IOCUseOnly06;          /* 0x06 */
255     U8                                MsgFlags;              /* 0x07 */
256     U16                               ChangeCount;           /* 0x08 */
257     U8                                Tool;                  /* 0x0A */
258     U8                                Reserved0B;            /* 0x0B */
259     U8                                Action;                /* 0x0C */
260     U8                                Reserved0D;            /* 0x0D */
261     U16                               DevHandle;             /* 0x0E */
262 } MPI3_TOOL_RECOVER_DEVICE_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_RECOVER_DEVICE_REQUEST,
263   Mpi3ToolRecoverDeviceRequest_t, MPI3_POINTER pMpi3ToolRecoverDeviceRequest_t;
264 
265 /**** Bitfield definitions for the Action field ****/
266 #define MPI3_TOOLBOX_RD_ACTION_START                        (0x01)
267 #define MPI3_TOOLBOX_RD_ACTION_GET_STATUS                   (0x02)
268 #define MPI3_TOOLBOX_RD_ACTION_ABORT                        (0x03)
269 
270 /*****************************************************************************
271  *               Recover Device Reply Message                                *
272  *****************************************************************************/
273 typedef struct _MPI3_TOOL_RECOVER_DEVICE_REPLY
274 {
275     U16                     HostTag;                        /* 0x00 */
276     U8                      IOCUseOnly02;                   /* 0x02 */
277     U8                      Function;                       /* 0x03 */
278     U16                     IOCUseOnly04;                   /* 0x04 */
279     U8                      IOCUseOnly06;                   /* 0x06 */
280     U8                      MsgFlags;                       /* 0x07 */
281     U16                     IOCUseOnly08;                   /* 0x08 */
282     U16                     IOCStatus;                      /* 0x0A */
283     U32                     IOCLogInfo;                     /* 0x0C */
284     U8                      Status;                         /* 0x10 */
285     U8                      Reserved11;                     /* 0x11 */
286     U16                     Reserved1C;                     /* 0x12 */
287 } MPI3_TOOL_RECOVER_DEVICE_REPLY, MPI3_POINTER PTR_MPI3_TOOL_RECOVER_DEVICE_REPLY,
288   Mpi3ToolRecoverDeviceReply_t, MPI3_POINTER pMpi3ToolRecoverDeviceReply_t;
289 
290 /**** Bitfield definitions for the Status field ****/
291 #define MPI3_TOOLBOX_RD_STATUS_NOT_NEEDED                   (0x01)
292 #define MPI3_TOOLBOX_RD_STATUS_NEEDED                       (0x02)
293 #define MPI3_TOOLBOX_RD_STATUS_IN_PROGRESS                  (0x03)
294 #define MPI3_TOOLBOX_RD_STATUS_ABORTING                     (0x04)
295 
296 /*****************************************************************************
297  *               Loopback Tool Request Message                               *
298  *****************************************************************************/
299 typedef struct _MPI3_TOOL_LOOPBACK_REQUEST
300 {
301     U16                               HostTag;               /* 0x00 */
302     U8                                IOCUseOnly02;          /* 0x02 */
303     U8                                Function;              /* 0x03 */
304     U16                               IOCUseOnly04;          /* 0x04 */
305     U8                                IOCUseOnly06;          /* 0x06 */
306     U8                                MsgFlags;              /* 0x07 */
307     U16                               ChangeCount;           /* 0x08 */
308     U8                                Tool;                  /* 0x0A */
309     U8                                Reserved0B;            /* 0x0B */
310     U32                               Reserved0C;            /* 0x0C */
311     U64                               Phys;                  /* 0x10 */
312 } MPI3_TOOL_LOOPBACK_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_LOOPBACK_REQUEST,
313   Mpi3ToolLoopbackRequest_t, MPI3_POINTER pMpi3ToolLoopbackRequest_t;
314 
315 /*****************************************************************************
316  *               Loopback Tool Reply Message                                 *
317  *****************************************************************************/
318 typedef struct _MPI3_TOOL_LOOPBACK_REPLY
319 {
320     U16                               HostTag;               /* 0x00 */
321     U8                                IOCUseOnly02;          /* 0x02 */
322     U8                                Function;              /* 0x03 */
323     U16                               IOCUseOnly04;          /* 0x04 */
324     U8                                IOCUseOnly06;          /* 0x06 */
325     U8                                MsgFlags;              /* 0x07 */
326     U16                               IOCUseOnly08;          /* 0x08 */
327     U16                               IOCStatus;             /* 0x0A */
328     U32                               IOCLogInfo;            /* 0x0C */
329     U64                               TestedPhys;            /* 0x10 */
330     U64                               FailedPhys;            /* 0x18 */
331 } MPI3_TOOL_LOOPBACK_REPLY, MPI3_POINTER PTR_MPI3_TOOL_LOOPBACK_REPLY,
332   Mpi3ToolLoopbackReply_t, MPI3_POINTER pMpi3ToolLoopbackReply_t;
333 
334 
335 /*****************************************************************************
336  *                     Diagnostic Buffer Messages                            *
337  *****************************************************************************/
338 
339 /*****************************************************************************
340  *               Diagnostic Buffer Post Request Message                      *
341  *****************************************************************************/
342 typedef struct _MPI3_DIAG_BUFFER_POST_REQUEST
343 {
344     U16                     HostTag;                        /* 0x00 */
345     U8                      IOCUseOnly02;                   /* 0x02 */
346     U8                      Function;                       /* 0x03 */
347     U16                     IOCUseOnly04;                   /* 0x04 */
348     U8                      IOCUseOnly06;                   /* 0x06 */
349     U8                      MsgFlags;                       /* 0x07 */
350     U16                     ChangeCount;                    /* 0x08 */
351     U16                     Reserved0A;                     /* 0x0A */
352     U8                      Type;                           /* 0x0C */
353     U8                      Reserved0D;                     /* 0x0D */
354     U16                     Reserved0E;                     /* 0x0E */
355     U64                     Address;                        /* 0x10 */
356     U32                     Length;                         /* 0x18 */
357     U32                     Reserved1C;                     /* 0x1C */
358 } MPI3_DIAG_BUFFER_POST_REQUEST, MPI3_POINTER PTR_MPI3_DIAG_BUFFER_POST_REQUEST,
359   Mpi3DiagBufferPostRequest_t, MPI3_POINTER pMpi3DiagBufferPostRequest_t;
360 
361 /**** Defines for the MsgFlags field ****/
362 #define MPI3_DIAG_BUFFER_POST_MSGFLAGS_SEGMENTED            (0x01)
363 
364 /**** Defines for the Type field ****/
365 #define MPI3_DIAG_BUFFER_TYPE_TRACE                         (0x01)
366 #define MPI3_DIAG_BUFFER_TYPE_FW                            (0x02)
367 #define MPI3_DIAG_BUFFER_TYPE_DRIVER                        (0x10)
368 #define MPI3_DIAG_BUFFER_TYPE_FDL                           (0x20)
369 #define MPI3_DIAG_BUFFER_MIN_PRODUCT_SPECIFIC               (0xF0)
370 #define MPI3_DIAG_BUFFER_MAX_PRODUCT_SPECIFIC               (0xFF)
371 
372 
373 /*****************************************************************************
374  *                 DRIVER DIAGNOSTIC Buffer                                  *
375  *****************************************************************************/
376 typedef struct _MPI3_DRIVER_BUFFER_HEADER
377 {
378     U32                     Signature;                      /* 0x00 */
379     U16                     HeaderSize;                     /* 0x04 */
380     U16                     RTTFileHeaderOffset;            /* 0x06 */
381     U32                     Flags;                          /* 0x08 */
382     U32                     CircularBufferSize;             /* 0x0C */
383     U32                     LogicalBufferEnd;               /* 0x10 */
384     U32                     LogicalBufferStart;             /* 0x14 */
385     U32                     IOCUseOnly18[2];                /* 0x18 */
386     U32                     Reserved20[760];                /* 0x20  - 0xBFC */
387     U32                     ReservedRTTRACE[256];           /* 0xC00 - 0xFFC */
388 } MPI3_DRIVER_BUFFER_HEADER, MPI3_POINTER PTR_MPI3_DRIVER_BUFFER_HEADER,
389   Mpi3DriverBufferHeader_t, MPI3_POINTER pMpi3DriverBufferHeader_t;
390 
391 /**** Defines for the Type field ****/
392 #define MPI3_DRIVER_DIAG_BUFFER_HEADER_SIGNATURE_CIRCULAR                (0x43495243)
393 
394 /**** Defines for the Flags field ****/
395 #define MPI3_DRIVER_DIAG_BUFFER_HEADER_FLAGS_CIRCULAR_BUF_FORMAT_MASK    (0x00000003)
396 #define MPI3_DRIVER_DIAG_BUFFER_HEADER_FLAGS_CIRCULAR_BUF_FORMAT_ASCII   (0x00000000)
397 #define MPI3_DRIVER_DIAG_BUFFER_HEADER_FLAGS_CIRCULAR_BUF_FORMAT_RTTRACE (0x00000001)
398 
399 /*****************************************************************************
400  *               Diagnostic Buffer Manage Request Message                      *
401  *****************************************************************************/
402 typedef struct _MPI3_DIAG_BUFFER_MANAGE_REQUEST
403 {
404     U16                     HostTag;                        /* 0x00 */
405     U8                      IOCUseOnly02;                   /* 0x02 */
406     U8                      Function;                       /* 0x03 */
407     U16                     IOCUseOnly04;                   /* 0x04 */
408     U8                      IOCUseOnly06;                   /* 0x06 */
409     U8                      MsgFlags;                       /* 0x07 */
410     U16                     ChangeCount;                    /* 0x08 */
411     U16                     Reserved0A;                     /* 0x0A */
412     U8                      Type;                           /* 0x0C */
413     U8                      Action;                         /* 0x0D */
414     U16                     Reserved0E;                     /* 0x0E */
415 } MPI3_DIAG_BUFFER_MANAGE_REQUEST, MPI3_POINTER PTR_MPI3_DIAG_BUFFER_MANAGE_REQUEST,
416   Mpi3DiagBufferManageRequest_t, MPI3_POINTER pMpi3DiagBufferManageRequest_t;
417 
418 /**** Defines for the Type field - use MPI3_DIAG_BUFFER_TYPE_ values ****/
419 
420 /**** Defined for the Action field ****/
421 #define MPI3_DIAG_BUFFER_ACTION_RELEASE                     (0x01)
422 #define MPI3_DIAG_BUFFER_ACTION_PAUSE                       (0x02)
423 #define MPI3_DIAG_BUFFER_ACTION_RESUME                      (0x03)
424 
425 /*****************************************************************************
426  *               Diagnostic Buffer Upload Request Message                    *
427  *****************************************************************************/
428 typedef struct _MPI3_DIAG_BUFFER_UPLOAD_REQUEST
429 {
430     U16                     HostTag;                        /* 0x00 */
431     U8                      IOCUseOnly02;                   /* 0x02 */
432     U8                      Function;                       /* 0x03 */
433     U16                     IOCUseOnly04;                   /* 0x04 */
434     U8                      IOCUseOnly06;                   /* 0x06 */
435     U8                      MsgFlags;                       /* 0x07 */
436     U16                     ChangeCount;                    /* 0x08 */
437     U16                     Reserved0A;                     /* 0x0A */
438     U8                      Type;                           /* 0x0C */
439     U8                      Flags;                          /* 0x0D */
440     U16                     Reserved0E;                     /* 0x0E */
441     U64                     Context;                        /* 0x10 */
442     U32                     Reserved18;                     /* 0x18 */
443     U32                     Reserved1C;                     /* 0x1C */
444     MPI3_SGE_UNION          SGL;                            /* 0x20 */
445 } MPI3_DIAG_BUFFER_UPLOAD_REQUEST, MPI3_POINTER PTR_MPI3_DIAG_BUFFER_UPLOAD_REQUEST,
446   Mpi3DiagBufferUploadRequest_t, MPI3_POINTER pMpi3DiagBufferUploadRequest_t;
447 
448 /**** Defines for the Type field - use MPI3_DIAG_BUFFER_TYPE_ values ****/
449 
450 /**** Defined for the Flags field ****/
451 #define MPI3_DIAG_BUFFER_UPLOAD_FLAGS_FORMAT_MASK           (0x01)
452 #define MPI3_DIAG_BUFFER_UPLOAD_FLAGS_FORMAT_DECODED        (0x00)
453 #define MPI3_DIAG_BUFFER_UPLOAD_FLAGS_FORMAT_ENCODED        (0x01)
454 
455 /*****************************************************************************
456  *               Diagnostic Buffer Upload Reply Message                      *
457  *****************************************************************************/
458 typedef struct _MPI3_DIAG_BUFFER_UPLOAD_REPLY
459 {
460     U16                     HostTag;                        /* 0x00 */
461     U8                      IOCUseOnly02;                   /* 0x02 */
462     U8                      Function;                       /* 0x03 */
463     U16                     IOCUseOnly04;                   /* 0x04 */
464     U8                      IOCUseOnly06;                   /* 0x06 */
465     U8                      MsgFlags;                       /* 0x07 */
466     U16                     IOCUseOnly08;                   /* 0x08 */
467     U16                     IOCStatus;                      /* 0x0A */
468     U32                     IOCLogInfo;                     /* 0x0C */
469     U64                     Context;                        /* 0x10 */
470     U32                     ReturnedDataLength;             /* 0x18 */
471     U32                     Reserved1C;                     /* 0x1C */
472 } MPI3_DIAG_BUFFER_UPLOAD_REPLY, MPI3_POINTER PTR_MPI3_DIAG_BUFFER_UPLOAD_REPLY,
473   Mpi3DiagBufferUploadReply_t, MPI3_POINTER pMpi3DiagBufferUploadReply_t;
474 
475 #endif /* MPI30_TOOL_H */
476 
477