[PATCH] usbcore: Improve endpoint sysfs file handling
[linux/fpc-iii.git] / drivers / message / fusion / lsi / mpi_tool.h
blobaa9053da1f58c580b767410b508db6a41a7dd679
1 /*
2 * Copyright (c) 2001-2005 LSI Logic Corporation.
5 * Name: mpi_tool.h
6 * Title: MPI Toolbox structures and definitions
7 * Creation Date: July 30, 2001
9 * mpi_tool.h Version: 01.05.03
11 * Version History
12 * ---------------
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 * --------------------------------------------------------------------------
31 #ifndef MPI_TOOL_H
32 #define MPI_TOOL_H
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)
42 /****************************************************************************/
43 /* Toolbox reply */
44 /****************************************************************************/
46 typedef struct _MSG_TOOLBOX_REPLY
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 */
59 } MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,
60 ToolboxReply_t, MPI_POINTER pToolboxReply_t;
63 /****************************************************************************/
64 /* Toolbox Clean Tool request */
65 /****************************************************************************/
67 typedef struct _MSG_TOOLBOX_CLEAN_REQUEST
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 */
78 } MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,
79 ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;
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)
92 /****************************************************************************/
93 /* Toolbox Memory Move request */
94 /****************************************************************************/
96 typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST
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 */
106 SGE_SIMPLE_UNION SGL; /* 0Ch */
107 } MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,
108 ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;
111 /****************************************************************************/
112 /* Toolbox Diagnostic Data Upload request */
113 /****************************************************************************/
115 typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
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 */
127 SGE_SIMPLE_UNION SGL; /* 14h */
128 } MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
129 ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;
131 typedef struct _DIAG_DATA_UPLOAD_HEADER
133 U32 DiagDataLength; /* 00h */
134 U8 FormatCode; /* 04h */
135 U8 Reserved; /* 05h */
136 U16 Reserved1; /* 06h */
137 } DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,
138 DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;
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)
146 /****************************************************************************/
147 /* Toolbox ISTWI Read Write request */
148 /****************************************************************************/
150 typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST
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 */
171 SGE_SIMPLE_UNION SGL; /* 1Ch */
172 } MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
173 ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;
175 #define MPI_TB_ISTWI_FLAGS_WRITE (0x00)
176 #define MPI_TB_ISTWI_FLAGS_READ (0x01)
179 /****************************************************************************/
180 /* Toolbox FC Management request */
181 /****************************************************************************/
183 /* ActionInfo for Bus and TargetId */
184 typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI
186 U16 Reserved; /* 00h */
187 U8 Bus; /* 02h */
188 U8 TargetId; /* 03h */
189 } MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,
190 MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;
192 /* ActionInfo for port identifier */
193 typedef struct _MPI_TB_FC_MANAGE_PID_AI
195 U32 PortIdentifier; /* 00h */
196 } MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,
197 MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;
199 /* ActionInfo for set max frame size */
200 typedef struct _MPI_TB_FC_MANAGE_FRAME_SIZE_AI
202 U16 FrameSize; /* 00h */
203 U8 PortNum; /* 02h */
204 U8 Reserved1; /* 03h */
205 } MPI_TB_FC_MANAGE_FRAME_SIZE_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_FRAME_SIZE_AI,
206 MpiTbFcManageFrameSizeAi_t, MPI_POINTER pMpiTbFcManageFrameSizeAi_t;
208 /* union of ActionInfo */
209 typedef union _MPI_TB_FC_MANAGE_AI_UNION
211 MPI_TB_FC_MANAGE_BUS_TID_AI BusTid;
212 MPI_TB_FC_MANAGE_PID_AI Port;
213 MPI_TB_FC_MANAGE_FRAME_SIZE_AI FrameSize;
214 } MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,
215 MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;
217 typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST
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 */
230 MPI_TB_FC_MANAGE_AI_UNION ActionInfo; /* 10h */
231 } MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,
232 ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;
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)
241 /****************************************************************************/
242 /* Toolbox Beacon Tool request */
243 /****************************************************************************/
245 typedef struct _MSG_TOOLBOX_BEACON_REQUEST
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 */
259 } MSG_TOOLBOX_BEACON_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_BEACON_REQUEST,
260 ToolboxBeaconRequest_t, MPI_POINTER pToolboxBeaconRequest_t;
262 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_OFF (0x00)
263 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_ON (0x01)
266 /****************************************************************************/
267 /* Diagnostic Buffer Post request */
268 /****************************************************************************/
270 typedef struct _MSG_DIAG_BUFFER_POST_REQUEST
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 */
285 } MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,
286 DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;
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)
294 #define MPI_DIAG_EXTENDED_QTAG (0x00000001)
297 /* Diagnostic Buffer Post reply */
298 typedef struct _MSG_DIAG_BUFFER_POST_REPLY
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 */
312 } MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,
313 DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;
316 /****************************************************************************/
317 /* Diagnostic Release request */
318 /****************************************************************************/
320 typedef struct _MSG_DIAG_RELEASE_REQUEST
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 */
330 } MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,
331 DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;
334 /* Diagnostic Release reply */
335 typedef struct _MSG_DIAG_RELEASE_REPLY
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 */
348 } MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,
349 DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;
352 #endif