xref: /freebsd/sys/dev/mpi3mr/mpi/mpi30_tool.h (revision baabb919345f05e9892c4048a1521e5da1403060)
1 /*
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2016-2024, 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 #ifndef MPI30_TOOL_H
42 #define MPI30_TOOL_H     1
43 
44 /*****************************************************************************
45  *                     Toolbox Messages                                      *
46  *****************************************************************************/
47 
48 /*****************************************************************************
49  *                     Clean Tool Request Message                            *
50  *****************************************************************************/
51 typedef struct _MPI3_TOOL_CLEAN_REQUEST
52 {
53     U16                     HostTag;                        /* 0x00 */
54     U8                      IOCUseOnly02;                   /* 0x02 */
55     U8                      Function;                       /* 0x03 */
56     U16                     IOCUseOnly04;                   /* 0x04 */
57     U8                      IOCUseOnly06;                   /* 0x06 */
58     U8                      MsgFlags;                       /* 0x07 */
59     U16                     ChangeCount;                    /* 0x08 */
60     U8                      Tool;                           /* 0x0A */
61     U8                      Reserved0B;                     /* 0x0B */
62     U32                     Area;                           /* 0x0C */
63 } MPI3_TOOL_CLEAN_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_CLEAN_REQUEST,
64   Mpi3ToolCleanRequest_t, MPI3_POINTER pMpi3ToolCleanRequest_t;
65 
66 /**** Defines for the Tool field ****/
67 #define MPI3_TOOLBOX_TOOL_CLEAN                             (0x01)
68 #define MPI3_TOOLBOX_TOOL_ISTWI_READ_WRITE                  (0x02)
69 #define MPI3_TOOLBOX_TOOL_DIAGNOSTIC_CLI                    (0x03)
70 #define MPI3_TOOLBOX_TOOL_LANE_MARGINING                    (0x04)
71 #define MPI3_TOOLBOX_TOOL_RECOVER_DEVICE                    (0x05)
72 #define MPI3_TOOLBOX_TOOL_LOOPBACK                          (0x06)
73 
74 /**** Bitfield definitions for Area field ****/
75 #define MPI3_TOOLBOX_CLEAN_AREA_BIOS_BOOT_SERVICES          (0x00000008)
76 #define MPI3_TOOLBOX_CLEAN_AREA_ALL_BUT_MFG                 (0x00000002)
77 #define MPI3_TOOLBOX_CLEAN_AREA_NVSTORE                     (0x00000001)
78 
79 
80 /*****************************************************************************
81  *                ISTWI Read Write Tool Request Message                      *
82  *****************************************************************************/
83 typedef struct _MPI3_TOOL_ISTWI_READ_WRITE_REQUEST
84 {
85     U16                               HostTag;               /* 0x00 */
86     U8                                IOCUseOnly02;          /* 0x02 */
87     U8                                Function;              /* 0x03 */
88     U16                               IOCUseOnly04;          /* 0x04 */
89     U8                                IOCUseOnly06;          /* 0x06 */
90     U8                                MsgFlags;              /* 0x07 */
91     U16                               ChangeCount;           /* 0x08 */
92     U8                                Tool;                  /* 0x0A */
93     U8                                Flags;                 /* 0x0B */
94     U8                                DevIndex;              /* 0x0C */
95     U8                                Action;                /* 0x0D */
96     U16                               Reserved0E;            /* 0x0E */
97     U16                               TxDataLength;          /* 0x10 */
98     U16                               RxDataLength;          /* 0x12 */
99     U32                               Reserved14[3];         /* 0x14 */
100     MPI3_MAN11_ISTWI_DEVICE_FORMAT    IstwiDevice;           /* 0x20 */
101     MPI3_SGE_UNION                    SGL;                   /* 0x30 */
102 } MPI3_TOOL_ISTWI_READ_WRITE_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_ISTWI_READ_WRITE_REQUEST,
103   Mpi3ToolIstwiReadWriteRequest_t, MPI3_POINTER pMpi3ToolIstwiReadWRiteRequest_t;
104 
105 /**** Bitfield definitions for Flags field ****/
106 #define MPI3_TOOLBOX_ISTWI_FLAGS_AUTO_RESERVE_RELEASE       (0x80)
107 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_MASK          (0x04)
108 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_DEVINDEX      (0x00)
109 #define MPI3_TOOLBOX_ISTWI_FLAGS_ADDRESS_MODE_DEVICE_FIELD  (0x04)
110 #define MPI3_TOOLBOX_ISTWI_FLAGS_PAGE_ADDRESS_MASK          (0x03)
111 
112 /**** Definitions for the Action field ****/
113 #define MPI3_TOOLBOX_ISTWI_ACTION_RESERVE_BUS               (0x00)
114 #define MPI3_TOOLBOX_ISTWI_ACTION_RELEASE_BUS               (0x01)
115 #define MPI3_TOOLBOX_ISTWI_ACTION_RESET                     (0x02)
116 #define MPI3_TOOLBOX_ISTWI_ACTION_READ_DATA                 (0x03)
117 #define MPI3_TOOLBOX_ISTWI_ACTION_WRITE_DATA                (0x04)
118 #define MPI3_TOOLBOX_ISTWI_ACTION_SEQUENCE                  (0x05)
119 
120 
121 /**** Defines for the IstwiDevice field - refer to struct definition in mpi30_cnfg.h ****/
122 
123 
124 /*****************************************************************************
125  *                ISTWI Read Write Tool Reply Message                        *
126  *****************************************************************************/
127 typedef struct _MPI3_TOOL_ISTWI_READ_WRITE_REPLY
128 {
129     U16                     HostTag;                        /* 0x00 */
130     U8                      IOCUseOnly02;                   /* 0x02 */
131     U8                      Function;                       /* 0x03 */
132     U16                     IOCUseOnly04;                   /* 0x04 */
133     U8                      IOCUseOnly06;                   /* 0x06 */
134     U8                      MsgFlags;                       /* 0x07 */
135     U16                     IOCUseOnly08;                   /* 0x08 */
136     U16                     IOCStatus;                      /* 0x0A */
137     U32                     IOCLogInfo;                     /* 0x0C */
138     U16                     IstwiStatus;                    /* 0x10 */
139     U16                     Reserved12;                     /* 0x12 */
140     U16                     TxDataCount;                    /* 0x14 */
141     U16                     RxDataCount;                    /* 0x16 */
142 } MPI3_TOOL_ISTWI_READ_WRITE_REPLY, MPI3_POINTER PTR_MPI3_TOOL_ISTWI_READ_WRITE_REPLY,
143   Mpi3ToolIstwiReadWriteReply_t, MPI3_POINTER pMpi3ToolIstwiReadWRiteReply_t;
144 
145 
146 
147 /*****************************************************************************
148  *               Diagnostic CLI Tool Request Message                         *
149  *****************************************************************************/
150 typedef struct _MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST
151 {
152     U16                     HostTag;                        /* 0x00 */
153     U8                      IOCUseOnly02;                   /* 0x02 */
154     U8                      Function;                       /* 0x03 */
155     U16                     IOCUseOnly04;                   /* 0x04 */
156     U8                      IOCUseOnly06;                   /* 0x06 */
157     U8                      MsgFlags;                       /* 0x07 */
158     U16                     ChangeCount;                    /* 0x08 */
159     U8                      Tool;                           /* 0x0A */
160     U8                      Reserved0B;                     /* 0x0B */
161     U32                     CommandDataLength;              /* 0x0C */
162     U32                     ResponseDataLength;             /* 0x10 */
163     U32                     Reserved14[3];                  /* 0x14 */
164     MPI3_SGE_UNION          SGL;                            /* 0x20 */
165 } MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_DIAGNOSTIC_CLI_REQUEST,
166   Mpi3ToolDiagnosticCliRequest_t, MPI3_POINTER pMpi3ToolDiagnosticCliRequest_t;
167 
168 
169 /*****************************************************************************
170  *               Diagnostic CLI Tool Reply Message                           *
171  *****************************************************************************/
172 typedef struct _MPI3_TOOL_DIAGNOSTIC_CLI_REPLY
173 {
174     U16                     HostTag;                        /* 0x00 */
175     U8                      IOCUseOnly02;                   /* 0x02 */
176     U8                      Function;                       /* 0x03 */
177     U16                     IOCUseOnly04;                   /* 0x04 */
178     U8                      IOCUseOnly06;                   /* 0x06 */
179     U8                      MsgFlags;                       /* 0x07 */
180     U16                     IOCUseOnly08;                   /* 0x08 */
181     U16                     IOCStatus;                      /* 0x0A */
182     U32                     IOCLogInfo;                     /* 0x0C */
183     U32                     ReturnedDataLength;             /* 0x10 */
184 } MPI3_TOOL_DIAGNOSTIC_CLI_REPLY, MPI3_POINTER PTR_MPI3_TOOL_DIAGNOSTIC_CLI_REPLY,
185   Mpi3ToolDiagnosticCliReply_t, MPI3_POINTER pMpi3ToolDiagnosticCliReply_t;
186 
187 
188 /*****************************************************************************
189  *                Lane Margining Tool Request Message                        *
190  *****************************************************************************/
191 typedef struct _MPI3_TOOL_LANE_MARGIN_REQUEST
192 {
193     U16                               HostTag;               /* 0x00 */
194     U8                                IOCUseOnly02;          /* 0x02 */
195     U8                                Function;              /* 0x03 */
196     U16                               IOCUseOnly04;          /* 0x04 */
197     U8                                IOCUseOnly06;          /* 0x06 */
198     U8                                MsgFlags;              /* 0x07 */
199     U16                               ChangeCount;           /* 0x08 */
200     U8                                Tool;                  /* 0x0A */
201     U8                                Reserved0B;            /* 0x0B */
202     U8                                Action;                /* 0x0C */
203     U8                                SwitchPort;            /* 0x0D */
204     U16                               DevHandle;             /* 0x0E */
205     U8                                StartLane;             /* 0x10 */
206     U8                                NumLanes;              /* 0x11 */
207     U16                               Reserved12;            /* 0x12 */
208     U32                               Reserved14[3];         /* 0x14 */
209     MPI3_SGE_UNION                    SGL;                   /* 0x20 */
210 } MPI3_TOOL_LANE_MARGIN_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_LANE_MARGIN_REQUEST,
211   Mpi3ToolIstwiLaneMarginRequest_t, MPI3_POINTER pMpi3ToolLaneMarginRequest_t;
212 
213 /**** Definitions for the Action field ****/
214 #define MPI3_TOOLBOX_LM_ACTION_ENTER                         (0x00)
215 #define MPI3_TOOLBOX_LM_ACTION_EXIT                          (0x01)
216 #define MPI3_TOOLBOX_LM_ACTION_READ                          (0x02)
217 #define MPI3_TOOLBOX_LM_ACTION_WRITE                         (0x03)
218 
219 typedef struct _MPI3_LANE_MARGIN_ELEMENT
220 {
221     U16                               Control;                /* 0x00 */
222     U16                               Status;                 /* 0x02 */
223 } MPI3_LANE_MARGIN_ELEMENT, MPI3_POINTER PTR_MPI3_LANE_MARGIN_ELEMENT,
224   Mpi3LaneMarginElement_t, MPI3_POINTER pMpi3LaneMarginElement_t;
225 
226 /*****************************************************************************
227  *                Lane Margining Tool Reply Message                          *
228  *****************************************************************************/
229 typedef struct _MPI3_TOOL_LANE_MARGIN_REPLY
230 {
231     U16                               HostTag;               /* 0x00 */
232     U8                                IOCUseOnly02;          /* 0x02 */
233     U8                                Function;              /* 0x03 */
234     U16                               IOCUseOnly04;          /* 0x04 */
235     U8                                IOCUseOnly06;          /* 0x06 */
236     U8                                MsgFlags;              /* 0x07 */
237     U16                               IOCUseOnly08;          /* 0x08 */
238     U16                               IOCStatus;             /* 0x0A */
239     U32                               IOCLogInfo;            /* 0x0C */
240     U32                               ReturnedDataLength;    /* 0x10 */
241 } MPI3_TOOL_LANE_MARGIN_REPLY, MPI3_POINTER PTR_MPI3_TOOL_LANE_MARGIN_REPLY,
242   Mpi3ToolLaneMarginReply_t, MPI3_POINTER pMpi3ToolLaneMarginReply_t;
243 
244 /*****************************************************************************
245  *               Recover Device Request Message                              *
246  *****************************************************************************/
247 typedef struct _MPI3_TOOL_RECOVER_DEVICE_REQUEST
248 {
249     U16                               HostTag;               /* 0x00 */
250     U8                                IOCUseOnly02;          /* 0x02 */
251     U8                                Function;              /* 0x03 */
252     U16                               IOCUseOnly04;          /* 0x04 */
253     U8                                IOCUseOnly06;          /* 0x06 */
254     U8                                MsgFlags;              /* 0x07 */
255     U16                               ChangeCount;           /* 0x08 */
256     U8                                Tool;                  /* 0x0A */
257     U8                                Reserved0B;            /* 0x0B */
258     U8                                Action;                /* 0x0C */
259     U8                                Reserved0D;            /* 0x0D */
260     U16                               DevHandle;             /* 0x0E */
261 } MPI3_TOOL_RECOVER_DEVICE_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_RECOVER_DEVICE_REQUEST,
262   Mpi3ToolRecoverDeviceRequest_t, MPI3_POINTER pMpi3ToolRecoverDeviceRequest_t;
263 
264 /**** Bitfield definitions for the Action field ****/
265 #define MPI3_TOOLBOX_RD_ACTION_START                        (0x01)
266 #define MPI3_TOOLBOX_RD_ACTION_GET_STATUS                   (0x02)
267 #define MPI3_TOOLBOX_RD_ACTION_ABORT                        (0x03)
268 
269 /*****************************************************************************
270  *               Recover Device Reply Message                                *
271  *****************************************************************************/
272 typedef struct _MPI3_TOOL_RECOVER_DEVICE_REPLY
273 {
274     U16                     HostTag;                        /* 0x00 */
275     U8                      IOCUseOnly02;                   /* 0x02 */
276     U8                      Function;                       /* 0x03 */
277     U16                     IOCUseOnly04;                   /* 0x04 */
278     U8                      IOCUseOnly06;                   /* 0x06 */
279     U8                      MsgFlags;                       /* 0x07 */
280     U16                     IOCUseOnly08;                   /* 0x08 */
281     U16                     IOCStatus;                      /* 0x0A */
282     U32                     IOCLogInfo;                     /* 0x0C */
283     U8                      Status;                         /* 0x10 */
284     U8                      Reserved11;                     /* 0x11 */
285     U16                     Reserved1C;                     /* 0x12 */
286 } MPI3_TOOL_RECOVER_DEVICE_REPLY, MPI3_POINTER PTR_MPI3_TOOL_RECOVER_DEVICE_REPLY,
287   Mpi3ToolRecoverDeviceReply_t, MPI3_POINTER pMpi3ToolRecoverDeviceReply_t;
288 
289 /**** Bitfield definitions for the Status field ****/
290 #define MPI3_TOOLBOX_RD_STATUS_NOT_NEEDED                   (0x01)
291 #define MPI3_TOOLBOX_RD_STATUS_NEEDED                       (0x02)
292 #define MPI3_TOOLBOX_RD_STATUS_IN_PROGRESS                  (0x03)
293 #define MPI3_TOOLBOX_RD_STATUS_ABORTING                     (0x04)
294 
295 /*****************************************************************************
296  *               Loopback Tool Request Message                               *
297  *****************************************************************************/
298 typedef struct _MPI3_TOOL_LOOPBACK_REQUEST
299 {
300     U16                               HostTag;               /* 0x00 */
301     U8                                IOCUseOnly02;          /* 0x02 */
302     U8                                Function;              /* 0x03 */
303     U16                               IOCUseOnly04;          /* 0x04 */
304     U8                                IOCUseOnly06;          /* 0x06 */
305     U8                                MsgFlags;              /* 0x07 */
306     U16                               ChangeCount;           /* 0x08 */
307     U8                                Tool;                  /* 0x0A */
308     U8                                Reserved0B;            /* 0x0B */
309     U32                               Reserved0C;            /* 0x0C */
310     U64                               Phys;                  /* 0x10 */
311 } MPI3_TOOL_LOOPBACK_REQUEST, MPI3_POINTER PTR_MPI3_TOOL_LOOPBACK_REQUEST,
312   Mpi3ToolLoopbackRequest_t, MPI3_POINTER pMpi3ToolLoopbackRequest_t;
313 
314 /*****************************************************************************
315  *               Loopback Tool Reply Message                                 *
316  *****************************************************************************/
317 typedef struct _MPI3_TOOL_LOOPBACK_REPLY
318 {
319     U16                               HostTag;               /* 0x00 */
320     U8                                IOCUseOnly02;          /* 0x02 */
321     U8                                Function;              /* 0x03 */
322     U16                               IOCUseOnly04;          /* 0x04 */
323     U8                                IOCUseOnly06;          /* 0x06 */
324     U8                                MsgFlags;              /* 0x07 */
325     U16                               IOCUseOnly08;          /* 0x08 */
326     U16                               IOCStatus;             /* 0x0A */
327     U32                               IOCLogInfo;            /* 0x0C */
328     U64                               TestedPhys;            /* 0x10 */
329     U64                               FailedPhys;            /* 0x18 */
330 } MPI3_TOOL_LOOPBACK_REPLY, MPI3_POINTER PTR_MPI3_TOOL_LOOPBACK_REPLY,
331   Mpi3ToolLoopbackReply_t, MPI3_POINTER pMpi3ToolLoopbackReply_t;
332 
333 
334 /*****************************************************************************
335  *                     Diagnostic Buffer Messages                            *
336  *****************************************************************************/
337 
338 /*****************************************************************************
339  *               Diagnostic Buffer Post Request Message                      *
340  *****************************************************************************/
341 typedef struct _MPI3_DIAG_BUFFER_POST_REQUEST
342 {
343     U16                     HostTag;                        /* 0x00 */
344     U8                      IOCUseOnly02;                   /* 0x02 */
345     U8                      Function;                       /* 0x03 */
346     U16                     IOCUseOnly04;                   /* 0x04 */
347     U8                      IOCUseOnly06;                   /* 0x06 */
348     U8                      MsgFlags;                       /* 0x07 */
349     U16                     ChangeCount;                    /* 0x08 */
350     U16                     Reserved0A;                     /* 0x0A */
351     U8                      Type;                           /* 0x0C */
352     U8                      Reserved0D;                     /* 0x0D */
353     U16                     Reserved0E;                     /* 0x0E */
354     U64                     Address;                        /* 0x10 */
355     U32                     Length;                         /* 0x18 */
356     U32                     Reserved1C;                     /* 0x1C */
357 } MPI3_DIAG_BUFFER_POST_REQUEST, MPI3_POINTER PTR_MPI3_DIAG_BUFFER_POST_REQUEST,
358   Mpi3DiagBufferPostRequest_t, MPI3_POINTER pMpi3DiagBufferPostRequest_t;
359 
360 /**** Defines for the MsgFlags field ****/
361 #define MPI3_DIAG_BUFFER_POST_MSGFLAGS_SEGMENTED            (0x01)
362 
363 /**** Defines for the Type field ****/
364 #define MPI3_DIAG_BUFFER_TYPE_TRACE                         (0x01)
365 #define MPI3_DIAG_BUFFER_TYPE_FW                            (0x02)
366 #define MPI3_DIAG_BUFFER_TYPE_DRIVER                        (0x10)
367 #define MPI3_DIAG_BUFFER_TYPE_FDL                           (0x20)
368 #define MPI3_DIAG_BUFFER_TYPE_TTY                           (0x30)
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 Signature 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