Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mpi_tool.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001-2008 LSI Corporation.
3  *
4  *
5  * Name: mpi_tool.h
6  * Title: MPI Toolbox structures and definitions
7  * Creation Date: July 30, 2001
8  *
9  * mpi_tool.h Version: 01.05.03
10  *
11  * Version History
12  * ---------------
13  *
14  * Date Version Description
15  * -------- -------- ------------------------------------------------------
16  * 08-08-01 01.02.01 Original release.
17  * 08-29-01 01.02.02 Added DIAG_DATA_UPLOAD_HEADER and related defines.
18  * 01-16-04 01.02.03 Added defines and structures for new tools
19  *. MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL and
20  * MPI_TOOLBOX_FC_MANAGEMENT_TOOL.
21  * 04-29-04 01.02.04 Added message structures for Diagnostic Buffer Post and
22  * Diagnostic Release requests and replies.
23  * 05-11-04 01.03.01 Original release for MPI v1.3.
24  * 08-19-04 01.05.01 Original release for MPI v1.5.
25  * 10-06-04 01.05.02 Added define for MPI_DIAG_BUF_TYPE_COUNT.
26  * 02-09-05 01.05.03 Added frame size option to FC management tool.
27  * Added Beacon tool to the Toolbox.
28  * --------------------------------------------------------------------------
29  */
30 
31 #ifndef MPI_TOOL_H
32 #define MPI_TOOL_H
33 
34 #define MPI_TOOLBOX_CLEAN_TOOL (0x00)
35 #define MPI_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
36 #define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
37 #define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
38 #define MPI_TOOLBOX_FC_MANAGEMENT_TOOL (0x04)
39 #define MPI_TOOLBOX_BEACON_TOOL (0x05)
40 
41 
42 /****************************************************************************/
43 /* Toolbox reply */
44 /****************************************************************************/
45 
46 typedef struct _MSG_TOOLBOX_REPLY
47 {
48  U8 Tool; /* 00h */
49  U8 Reserved; /* 01h */
50  U8 MsgLength; /* 02h */
51  U8 Function; /* 03h */
52  U16 Reserved1; /* 04h */
53  U8 Reserved2; /* 06h */
54  U8 MsgFlags; /* 07h */
55  U32 MsgContext; /* 08h */
56  U16 Reserved3; /* 0Ch */
57  U16 IOCStatus; /* 0Eh */
58  U32 IOCLogInfo; /* 10h */
61 
62 
63 /****************************************************************************/
64 /* Toolbox Clean Tool request */
65 /****************************************************************************/
66 
68 {
69  U8 Tool; /* 00h */
70  U8 Reserved; /* 01h */
71  U8 ChainOffset; /* 02h */
72  U8 Function; /* 03h */
73  U16 Reserved1; /* 04h */
74  U8 Reserved2; /* 06h */
75  U8 MsgFlags; /* 07h */
76  U32 MsgContext; /* 08h */
77  U32 Flags; /* 0Ch */
80 
81 #define MPI_TOOLBOX_CLEAN_NVSRAM (0x00000001)
82 #define MPI_TOOLBOX_CLEAN_SEEPROM (0x00000002)
83 #define MPI_TOOLBOX_CLEAN_FLASH (0x00000004)
84 #define MPI_TOOLBOX_CLEAN_BOOTLOADER (0x04000000)
85 #define MPI_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
86 #define MPI_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
87 #define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
88 #define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
89 #define MPI_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
90 
91 
92 /****************************************************************************/
93 /* Toolbox Memory Move request */
94 /****************************************************************************/
95 
97 {
98  U8 Tool; /* 00h */
99  U8 Reserved; /* 01h */
100  U8 ChainOffset; /* 02h */
101  U8 Function; /* 03h */
102  U16 Reserved1; /* 04h */
103  U8 Reserved2; /* 06h */
104  U8 MsgFlags; /* 07h */
105  U32 MsgContext; /* 08h */
109 
110 
111 /****************************************************************************/
112 /* Toolbox Diagnostic Data Upload request */
113 /****************************************************************************/
114 
116 {
117  U8 Tool; /* 00h */
118  U8 Reserved; /* 01h */
119  U8 ChainOffset; /* 02h */
120  U8 Function; /* 03h */
121  U16 Reserved1; /* 04h */
122  U8 Reserved2; /* 06h */
123  U8 MsgFlags; /* 07h */
124  U32 MsgContext; /* 08h */
125  U32 Flags; /* 0Ch */
126  U32 Reserved3; /* 10h */
130 
132 {
133  U32 DiagDataLength; /* 00h */
134  U8 FormatCode; /* 04h */
135  U8 Reserved; /* 05h */
136  U16 Reserved1; /* 06h */
139 
140 #define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1 (0x01)
141 #define MPI_TB_DIAG_FORMAT_SCSI_2 (0x02)
142 #define MPI_TB_DIAG_FORMAT_SCSI_3 (0x03)
143 #define MPI_TB_DIAG_FORMAT_FC_TRACE_1 (0x04)
144 
145 
146 /****************************************************************************/
147 /* Toolbox ISTWI Read Write request */
148 /****************************************************************************/
149 
151 {
152  U8 Tool; /* 00h */
153  U8 Reserved; /* 01h */
154  U8 ChainOffset; /* 02h */
155  U8 Function; /* 03h */
156  U16 Reserved1; /* 04h */
157  U8 Reserved2; /* 06h */
158  U8 MsgFlags; /* 07h */
159  U32 MsgContext; /* 08h */
160  U8 Flags; /* 0Ch */
161  U8 BusNum; /* 0Dh */
162  U16 Reserved3; /* 0Eh */
163  U8 NumAddressBytes; /* 10h */
164  U8 Reserved4; /* 11h */
165  U16 DataLength; /* 12h */
166  U8 DeviceAddr; /* 14h */
167  U8 Addr1; /* 15h */
168  U8 Addr2; /* 16h */
169  U8 Addr3; /* 17h */
170  U32 Reserved5; /* 18h */
174 
175 #define MPI_TB_ISTWI_FLAGS_WRITE (0x00)
176 #define MPI_TB_ISTWI_FLAGS_READ (0x01)
177 
178 
179 /****************************************************************************/
180 /* Toolbox FC Management request */
181 /****************************************************************************/
182 
183 /* ActionInfo for Bus and TargetId */
185 {
186  U16 Reserved; /* 00h */
187  U8 Bus; /* 02h */
188  U8 TargetId; /* 03h */
191 
192 /* ActionInfo for port identifier */
194 {
195  U32 PortIdentifier; /* 00h */
198 
199 /* ActionInfo for set max frame size */
201 {
202  U16 FrameSize; /* 00h */
203  U8 PortNum; /* 02h */
204  U8 Reserved1; /* 03h */
207 
208 /* union of ActionInfo */
210 {
216 
218 {
219  U8 Tool; /* 00h */
220  U8 Reserved; /* 01h */
221  U8 ChainOffset; /* 02h */
222  U8 Function; /* 03h */
223  U16 Reserved1; /* 04h */
224  U8 Reserved2; /* 06h */
225  U8 MsgFlags; /* 07h */
226  U32 MsgContext; /* 08h */
227  U8 Action; /* 0Ch */
228  U8 Reserved3; /* 0Dh */
229  U16 Reserved4; /* 0Eh */
233 
234 /* defines for the Action field */
235 #define MPI_TB_FC_MANAGE_ACTION_DISC_ALL (0x00)
236 #define MPI_TB_FC_MANAGE_ACTION_DISC_PID (0x01)
237 #define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID (0x02)
238 #define MPI_TB_FC_MANAGE_ACTION_SET_MAX_FRAME_SIZE (0x03)
239 
240 
241 /****************************************************************************/
242 /* Toolbox Beacon Tool request */
243 /****************************************************************************/
244 
246 {
247  U8 Tool; /* 00h */
248  U8 Reserved; /* 01h */
249  U8 ChainOffset; /* 02h */
250  U8 Function; /* 03h */
251  U16 Reserved1; /* 04h */
252  U8 Reserved2; /* 06h */
253  U8 MsgFlags; /* 07h */
254  U32 MsgContext; /* 08h */
255  U8 ConnectNum; /* 0Ch */
256  U8 PortNum; /* 0Dh */
257  U8 Reserved3; /* 0Eh */
258  U8 Flags; /* 0Fh */
261 
262 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_OFF (0x00)
263 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_ON (0x01)
264 
265 
266 /****************************************************************************/
267 /* Diagnostic Buffer Post request */
268 /****************************************************************************/
269 
271 {
272  U8 TraceLevel; /* 00h */
273  U8 BufferType; /* 01h */
274  U8 ChainOffset; /* 02h */
275  U8 Function; /* 03h */
276  U16 Reserved1; /* 04h */
277  U8 Reserved2; /* 06h */
278  U8 MsgFlags; /* 07h */
279  U32 MsgContext; /* 08h */
280  U32 ExtendedType; /* 0Ch */
281  U32 BufferLength; /* 10h */
282  U32 ProductSpecific[4]; /* 14h */
283  U32 Reserved3; /* 24h */
284  U64 BufferAddress; /* 28h */
287 
288 #define MPI_DIAG_BUF_TYPE_TRACE (0x00)
289 #define MPI_DIAG_BUF_TYPE_SNAPSHOT (0x01)
290 #define MPI_DIAG_BUF_TYPE_EXTENDED (0x02)
291 /* count of the number of buffer types */
292 #define MPI_DIAG_BUF_TYPE_COUNT (0x03)
293 
294 #define MPI_DIAG_EXTENDED_QTAG (0x00000001)
295 
296 
297 /* Diagnostic Buffer Post reply */
299 {
300  U8 Reserved1; /* 00h */
301  U8 BufferType; /* 01h */
302  U8 MsgLength; /* 02h */
303  U8 Function; /* 03h */
304  U16 Reserved2; /* 04h */
305  U8 Reserved3; /* 06h */
306  U8 MsgFlags; /* 07h */
307  U32 MsgContext; /* 08h */
308  U16 Reserved4; /* 0Ch */
309  U16 IOCStatus; /* 0Eh */
310  U32 IOCLogInfo; /* 10h */
311  U32 TransferLength; /* 14h */
314 
315 
316 /****************************************************************************/
317 /* Diagnostic Release request */
318 /****************************************************************************/
319 
321 {
322  U8 Reserved1; /* 00h */
323  U8 BufferType; /* 01h */
324  U8 ChainOffset; /* 02h */
325  U8 Function; /* 03h */
326  U16 Reserved2; /* 04h */
327  U8 Reserved3; /* 06h */
328  U8 MsgFlags; /* 07h */
329  U32 MsgContext; /* 08h */
332 
333 
334 /* Diagnostic Release reply */
336 {
337  U8 Reserved1; /* 00h */
338  U8 BufferType; /* 01h */
339  U8 MsgLength; /* 02h */
340  U8 Function; /* 03h */
341  U16 Reserved2; /* 04h */
342  U8 Reserved3; /* 06h */
343  U8 MsgFlags; /* 07h */
344  U32 MsgContext; /* 08h */
345  U16 Reserved4; /* 0Ch */
346  U16 IOCStatus; /* 0Eh */
347  U32 IOCLogInfo; /* 10h */
350 
351 
352 #endif
353 
354