]> Git Repo - linux.git/blob - drivers/scsi/mpt2sas/mpi/mpi2_tool.h
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[linux.git] / drivers / scsi / mpt2sas / mpi / mpi2_tool.h
1 /*
2  *  Copyright (c) 2000-2010 LSI Corporation.
3  *
4  *
5  *           Name:  mpi2_tool.h
6  *          Title:  MPI diagnostic tool structures and definitions
7  *  Creation Date:  March 26, 2007
8  *
9  *    mpi2_tool.h Version:  02.00.05
10  *
11  *  Version History
12  *  ---------------
13  *
14  *  Date      Version   Description
15  *  --------  --------  ------------------------------------------------------
16  *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
17  *  12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
18  *                      structures and defines.
19  *  02-29-08  02.00.02  Modified various names to make them 32-character unique.
20  *  05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
21  *  07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
22  *                      and reply messages.
23  *                      Added MPI2_DIAG_BUF_TYPE_EXTENDED.
24  *                      Incremented MPI2_DIAG_BUF_TYPE_COUNT.
25  *  05-12-10  02.00.05  Added Diagnostic Data Upload tool.
26  *  --------------------------------------------------------------------------
27  */
28
29 #ifndef MPI2_TOOL_H
30 #define MPI2_TOOL_H
31
32 /*****************************************************************************
33 *
34 *               Toolbox Messages
35 *
36 *****************************************************************************/
37
38 /* defines for the Tools */
39 #define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
40 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
41 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
42 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
43 #define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
44 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
45
46
47 /****************************************************************************
48 *  Toolbox reply
49 ****************************************************************************/
50
51 typedef struct _MPI2_TOOLBOX_REPLY
52 {
53     U8                      Tool;                       /* 0x00 */
54     U8                      Reserved1;                  /* 0x01 */
55     U8                      MsgLength;                  /* 0x02 */
56     U8                      Function;                   /* 0x03 */
57     U16                     Reserved2;                  /* 0x04 */
58     U8                      Reserved3;                  /* 0x06 */
59     U8                      MsgFlags;                   /* 0x07 */
60     U8                      VP_ID;                      /* 0x08 */
61     U8                      VF_ID;                      /* 0x09 */
62     U16                     Reserved4;                  /* 0x0A */
63     U16                     Reserved5;                  /* 0x0C */
64     U16                     IOCStatus;                  /* 0x0E */
65     U32                     IOCLogInfo;                 /* 0x10 */
66 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
67   Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
68
69
70 /****************************************************************************
71 *  Toolbox Clean Tool request
72 ****************************************************************************/
73
74 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
75 {
76     U8                      Tool;                       /* 0x00 */
77     U8                      Reserved1;                  /* 0x01 */
78     U8                      ChainOffset;                /* 0x02 */
79     U8                      Function;                   /* 0x03 */
80     U16                     Reserved2;                  /* 0x04 */
81     U8                      Reserved3;                  /* 0x06 */
82     U8                      MsgFlags;                   /* 0x07 */
83     U8                      VP_ID;                      /* 0x08 */
84     U8                      VF_ID;                      /* 0x09 */
85     U16                     Reserved4;                  /* 0x0A */
86     U32                     Flags;                      /* 0x0C */
87    } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
88   Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
89
90 /* values for the Flags field */
91 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
92 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
93 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
94 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
95 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
96 #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
97 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
98 #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
99 #define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
100 #define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
101
102
103 /****************************************************************************
104 *  Toolbox Memory Move request
105 ****************************************************************************/
106
107 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
108     U8                      Tool;                       /* 0x00 */
109     U8                      Reserved1;                  /* 0x01 */
110     U8                      ChainOffset;                /* 0x02 */
111     U8                      Function;                   /* 0x03 */
112     U16                     Reserved2;                  /* 0x04 */
113     U8                      Reserved3;                  /* 0x06 */
114     U8                      MsgFlags;                   /* 0x07 */
115     U8                      VP_ID;                      /* 0x08 */
116     U8                      VF_ID;                      /* 0x09 */
117     U16                     Reserved4;                  /* 0x0A */
118     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
119 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
120   Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
121
122
123 /****************************************************************************
124 *  Toolbox Diagnostic Data Upload request
125 ****************************************************************************/
126
127 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
128         U8                      Tool;                       /* 0x00 */
129         U8                      Reserved1;                  /* 0x01 */
130         U8                      ChainOffset;                /* 0x02 */
131         U8                      Function;                   /* 0x03 */
132         U16                     Reserved2;                  /* 0x04 */
133         U8                      Reserved3;                  /* 0x06 */
134         U8                      MsgFlags;                   /* 0x07 */
135         U8                      VP_ID;                      /* 0x08 */
136         U8                      VF_ID;                      /* 0x09 */
137         U16                     Reserved4;                  /* 0x0A */
138         U8                      SGLFlags;                   /* 0x0C */
139         U8                      Reserved5;                  /* 0x0D */
140         U16                     Reserved6;                  /* 0x0E */
141         U32                     Flags;                      /* 0x10 */
142         U32                     DataLength;                 /* 0x14 */
143         MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x18 */
144 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
145 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
146 Mpi2ToolboxDiagDataUploadRequest_t,
147 MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
148
149 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
150
151
152 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
153         U32                     DiagDataLength;             /* 00h */
154         U8                      FormatCode;                 /* 04h */
155         U8                      Reserved1;                  /* 05h */
156         U16                     Reserved2;                  /* 06h */
157 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
158 Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
159
160
161 /****************************************************************************
162 *  Toolbox ISTWI Read Write Tool
163 ****************************************************************************/
164
165 /* Toolbox ISTWI Read Write Tool request message */
166 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
167     U8                      Tool;                       /* 0x00 */
168     U8                      Reserved1;                  /* 0x01 */
169     U8                      ChainOffset;                /* 0x02 */
170     U8                      Function;                   /* 0x03 */
171     U16                     Reserved2;                  /* 0x04 */
172     U8                      Reserved3;                  /* 0x06 */
173     U8                      MsgFlags;                   /* 0x07 */
174     U8                      VP_ID;                      /* 0x08 */
175     U8                      VF_ID;                      /* 0x09 */
176     U16                     Reserved4;                  /* 0x0A */
177     U32                     Reserved5;                  /* 0x0C */
178     U32                     Reserved6;                  /* 0x10 */
179     U8                      DevIndex;                   /* 0x14 */
180     U8                      Action;                     /* 0x15 */
181     U8                      SGLFlags;                   /* 0x16 */
182     U8                      Reserved7;                  /* 0x17 */
183     U16                     TxDataLength;               /* 0x18 */
184     U16                     RxDataLength;               /* 0x1A */
185     U32                     Reserved8;                  /* 0x1C */
186     U32                     Reserved9;                  /* 0x20 */
187     U32                     Reserved10;                 /* 0x24 */
188     U32                     Reserved11;                 /* 0x28 */
189     U32                     Reserved12;                 /* 0x2C */
190     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x30 */
191 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
192   MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
193   Mpi2ToolboxIstwiReadWriteRequest_t,
194   MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
195
196 /* values for the Action field */
197 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
198 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
199 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
200 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
201 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
202 #define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
203
204 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
205
206
207 /* Toolbox ISTWI Read Write Tool reply message */
208 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
209     U8                      Tool;                       /* 0x00 */
210     U8                      Reserved1;                  /* 0x01 */
211     U8                      MsgLength;                  /* 0x02 */
212     U8                      Function;                   /* 0x03 */
213     U16                     Reserved2;                  /* 0x04 */
214     U8                      Reserved3;                  /* 0x06 */
215     U8                      MsgFlags;                   /* 0x07 */
216     U8                      VP_ID;                      /* 0x08 */
217     U8                      VF_ID;                      /* 0x09 */
218     U16                     Reserved4;                  /* 0x0A */
219     U16                     Reserved5;                  /* 0x0C */
220     U16                     IOCStatus;                  /* 0x0E */
221     U32                     IOCLogInfo;                 /* 0x10 */
222     U8                      DevIndex;                   /* 0x14 */
223     U8                      Action;                     /* 0x15 */
224     U8                      IstwiStatus;                /* 0x16 */
225     U8                      Reserved6;                  /* 0x17 */
226     U16                     TxDataCount;                /* 0x18 */
227     U16                     RxDataCount;                /* 0x1A */
228 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
229   Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
230
231
232 /****************************************************************************
233 *  Toolbox Beacon Tool request
234 ****************************************************************************/
235
236 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
237 {
238     U8                      Tool;                       /* 0x00 */
239     U8                      Reserved1;                  /* 0x01 */
240     U8                      ChainOffset;                /* 0x02 */
241     U8                      Function;                   /* 0x03 */
242     U16                     Reserved2;                  /* 0x04 */
243     U8                      Reserved3;                  /* 0x06 */
244     U8                      MsgFlags;                   /* 0x07 */
245     U8                      VP_ID;                      /* 0x08 */
246     U8                      VF_ID;                      /* 0x09 */
247     U16                     Reserved4;                  /* 0x0A */
248     U8                      Reserved5;                  /* 0x0C */
249     U8                      PhysicalPort;               /* 0x0D */
250     U8                      Reserved6;                  /* 0x0E */
251     U8                      Flags;                      /* 0x0F */
252 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
253   Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
254
255 /* values for the Flags field */
256 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
257 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
258
259
260 /****************************************************************************
261 *  Toolbox Diagnostic CLI Tool
262 ****************************************************************************/
263
264 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
265
266 /* Toolbox Diagnostic CLI Tool request message */
267 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
268     U8                      Tool;                       /* 0x00 */
269     U8                      Reserved1;                  /* 0x01 */
270     U8                      ChainOffset;                /* 0x02 */
271     U8                      Function;                   /* 0x03 */
272     U16                     Reserved2;                  /* 0x04 */
273     U8                      Reserved3;                  /* 0x06 */
274     U8                      MsgFlags;                   /* 0x07 */
275     U8                      VP_ID;                      /* 0x08 */
276     U8                      VF_ID;                      /* 0x09 */
277     U16                     Reserved4;                  /* 0x0A */
278     U8                      SGLFlags;                   /* 0x0C */
279     U8                      Reserved5;                  /* 0x0D */
280     U16                     Reserved6;                  /* 0x0E */
281     U32                     DataLength;                 /* 0x10 */
282     U8                      DiagnosticCliCommand
283                 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];     /* 0x14 */
284     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x70 */
285 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
286   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
287   Mpi2ToolboxDiagnosticCliRequest_t,
288   MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
289
290 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
291
292
293 /* Toolbox Diagnostic CLI Tool reply message */
294 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
295     U8                      Tool;                       /* 0x00 */
296     U8                      Reserved1;                  /* 0x01 */
297     U8                      MsgLength;                  /* 0x02 */
298     U8                      Function;                   /* 0x03 */
299     U16                     Reserved2;                  /* 0x04 */
300     U8                      Reserved3;                  /* 0x06 */
301     U8                      MsgFlags;                   /* 0x07 */
302     U8                      VP_ID;                      /* 0x08 */
303     U8                      VF_ID;                      /* 0x09 */
304     U16                     Reserved4;                  /* 0x0A */
305     U16                     Reserved5;                  /* 0x0C */
306     U16                     IOCStatus;                  /* 0x0E */
307     U32                     IOCLogInfo;                 /* 0x10 */
308     U32                     ReturnedDataLength;         /* 0x14 */
309 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
310   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
311   Mpi2ToolboxDiagnosticCliReply_t,
312   MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
313
314
315 /*****************************************************************************
316 *
317 *       Diagnostic Buffer Messages
318 *
319 *****************************************************************************/
320
321
322 /****************************************************************************
323 *  Diagnostic Buffer Post request
324 ****************************************************************************/
325
326 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
327 {
328     U8                      ExtendedType;               /* 0x00 */
329     U8                      BufferType;                 /* 0x01 */
330     U8                      ChainOffset;                /* 0x02 */
331     U8                      Function;                   /* 0x03 */
332     U16                     Reserved2;                  /* 0x04 */
333     U8                      Reserved3;                  /* 0x06 */
334     U8                      MsgFlags;                   /* 0x07 */
335     U8                      VP_ID;                      /* 0x08 */
336     U8                      VF_ID;                      /* 0x09 */
337     U16                     Reserved4;                  /* 0x0A */
338     U64                     BufferAddress;              /* 0x0C */
339     U32                     BufferLength;               /* 0x14 */
340     U32                     Reserved5;                  /* 0x18 */
341     U32                     Reserved6;                  /* 0x1C */
342     U32                     Flags;                      /* 0x20 */
343     U32                     ProductSpecific[23];        /* 0x24 */
344 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
345   Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
346
347 /* values for the ExtendedType field */
348 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION         (0x02)
349
350 /* values for the BufferType field */
351 #define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
352 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
353 #define MPI2_DIAG_BUF_TYPE_EXTENDED                 (0x02)
354 /* count of the number of buffer types */
355 #define MPI2_DIAG_BUF_TYPE_COUNT                    (0x03)
356
357
358 /****************************************************************************
359 *  Diagnostic Buffer Post reply
360 ****************************************************************************/
361
362 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
363 {
364     U8                      ExtendedType;               /* 0x00 */
365     U8                      BufferType;                 /* 0x01 */
366     U8                      MsgLength;                  /* 0x02 */
367     U8                      Function;                   /* 0x03 */
368     U16                     Reserved2;                  /* 0x04 */
369     U8                      Reserved3;                  /* 0x06 */
370     U8                      MsgFlags;                   /* 0x07 */
371     U8                      VP_ID;                      /* 0x08 */
372     U8                      VF_ID;                      /* 0x09 */
373     U16                     Reserved4;                  /* 0x0A */
374     U16                     Reserved5;                  /* 0x0C */
375     U16                     IOCStatus;                  /* 0x0E */
376     U32                     IOCLogInfo;                 /* 0x10 */
377     U32                     TransferLength;             /* 0x14 */
378 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
379   Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
380
381
382 /****************************************************************************
383 *  Diagnostic Release request
384 ****************************************************************************/
385
386 typedef struct _MPI2_DIAG_RELEASE_REQUEST
387 {
388     U8                      Reserved1;                  /* 0x00 */
389     U8                      BufferType;                 /* 0x01 */
390     U8                      ChainOffset;                /* 0x02 */
391     U8                      Function;                   /* 0x03 */
392     U16                     Reserved2;                  /* 0x04 */
393     U8                      Reserved3;                  /* 0x06 */
394     U8                      MsgFlags;                   /* 0x07 */
395     U8                      VP_ID;                      /* 0x08 */
396     U8                      VF_ID;                      /* 0x09 */
397     U16                     Reserved4;                  /* 0x0A */
398 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
399   Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
400
401
402 /****************************************************************************
403 *  Diagnostic Buffer Post reply
404 ****************************************************************************/
405
406 typedef struct _MPI2_DIAG_RELEASE_REPLY
407 {
408     U8                      Reserved1;                  /* 0x00 */
409     U8                      BufferType;                 /* 0x01 */
410     U8                      MsgLength;                  /* 0x02 */
411     U8                      Function;                   /* 0x03 */
412     U16                     Reserved2;                  /* 0x04 */
413     U8                      Reserved3;                  /* 0x06 */
414     U8                      MsgFlags;                   /* 0x07 */
415     U8                      VP_ID;                      /* 0x08 */
416     U8                      VF_ID;                      /* 0x09 */
417     U16                     Reserved4;                  /* 0x0A */
418     U16                     Reserved5;                  /* 0x0C */
419     U16                     IOCStatus;                  /* 0x0E */
420     U32                     IOCLogInfo;                 /* 0x10 */
421 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
422   Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
423
424
425 #endif
426
This page took 0.062378 seconds and 4 git commands to generate.