Merge branch 'master' of ssh://master.kernel.org/home/ftp/pub/scm/linux/kernel/git...
[linux-2.6] / drivers / scsi / mpt2sas / mpi / mpi2_tool.h
1 /*
2  *  Copyright (c) 2000-2008 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.02
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  *  --------------------------------------------------------------------------
21  */
22
23 #ifndef MPI2_TOOL_H
24 #define MPI2_TOOL_H
25
26 /*****************************************************************************
27 *
28 *               Toolbox Messages
29 *
30 *****************************************************************************/
31
32 /* defines for the Tools */
33 #define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
34 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
35 #define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
36
37 /****************************************************************************
38 *  Toolbox reply
39 ****************************************************************************/
40
41 typedef struct _MPI2_TOOLBOX_REPLY
42 {
43     U8                      Tool;                       /* 0x00 */
44     U8                      Reserved1;                  /* 0x01 */
45     U8                      MsgLength;                  /* 0x02 */
46     U8                      Function;                   /* 0x03 */
47     U16                     Reserved2;                  /* 0x04 */
48     U8                      Reserved3;                  /* 0x06 */
49     U8                      MsgFlags;                   /* 0x07 */
50     U8                      VP_ID;                      /* 0x08 */
51     U8                      VF_ID;                      /* 0x09 */
52     U16                     Reserved4;                  /* 0x0A */
53     U16                     Reserved5;                  /* 0x0C */
54     U16                     IOCStatus;                  /* 0x0E */
55     U32                     IOCLogInfo;                 /* 0x10 */
56 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
57   Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
58
59
60 /****************************************************************************
61 *  Toolbox Clean Tool request
62 ****************************************************************************/
63
64 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
65 {
66     U8                      Tool;                       /* 0x00 */
67     U8                      Reserved1;                  /* 0x01 */
68     U8                      ChainOffset;                /* 0x02 */
69     U8                      Function;                   /* 0x03 */
70     U16                     Reserved2;                  /* 0x04 */
71     U8                      Reserved3;                  /* 0x06 */
72     U8                      MsgFlags;                   /* 0x07 */
73     U8                      VP_ID;                      /* 0x08 */
74     U8                      VF_ID;                      /* 0x09 */
75     U16                     Reserved4;                  /* 0x0A */
76     U32                     Flags;                      /* 0x0C */
77    } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
78   Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
79
80 /* values for the Flags field */
81 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
82 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
83 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
84 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
85 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
86 #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
87 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
88 #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
89 #define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
90 #define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
91
92
93 /****************************************************************************
94 *  Toolbox Memory Move request
95 ****************************************************************************/
96
97 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
98 {
99     U8                      Tool;                       /* 0x00 */
100     U8                      Reserved1;                  /* 0x01 */
101     U8                      ChainOffset;                /* 0x02 */
102     U8                      Function;                   /* 0x03 */
103     U16                     Reserved2;                  /* 0x04 */
104     U8                      Reserved3;                  /* 0x06 */
105     U8                      MsgFlags;                   /* 0x07 */
106     U8                      VP_ID;                      /* 0x08 */
107     U8                      VF_ID;                      /* 0x09 */
108     U16                     Reserved4;                  /* 0x0A */
109     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
110 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
111   Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
112
113
114 /****************************************************************************
115 *  Toolbox Beacon Tool request
116 ****************************************************************************/
117
118 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
119 {
120     U8                      Tool;                       /* 0x00 */
121     U8                      Reserved1;                  /* 0x01 */
122     U8                      ChainOffset;                /* 0x02 */
123     U8                      Function;                   /* 0x03 */
124     U16                     Reserved2;                  /* 0x04 */
125     U8                      Reserved3;                  /* 0x06 */
126     U8                      MsgFlags;                   /* 0x07 */
127     U8                      VP_ID;                      /* 0x08 */
128     U8                      VF_ID;                      /* 0x09 */
129     U16                     Reserved4;                  /* 0x0A */
130     U8                      Reserved5;                  /* 0x0C */
131     U8                      PhysicalPort;               /* 0x0D */
132     U8                      Reserved6;                  /* 0x0E */
133     U8                      Flags;                      /* 0x0F */
134 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
135   Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
136
137 /* values for the Flags field */
138 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
139 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
140
141
142 /*****************************************************************************
143 *
144 *       Diagnostic Buffer Messages
145 *
146 *****************************************************************************/
147
148
149 /****************************************************************************
150 *  Diagnostic Buffer Post request
151 ****************************************************************************/
152
153 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
154 {
155     U8                      Reserved1;                  /* 0x00 */
156     U8                      BufferType;                 /* 0x01 */
157     U8                      ChainOffset;                /* 0x02 */
158     U8                      Function;                   /* 0x03 */
159     U16                     Reserved2;                  /* 0x04 */
160     U8                      Reserved3;                  /* 0x06 */
161     U8                      MsgFlags;                   /* 0x07 */
162     U8                      VP_ID;                      /* 0x08 */
163     U8                      VF_ID;                      /* 0x09 */
164     U16                     Reserved4;                  /* 0x0A */
165     U64                     BufferAddress;              /* 0x0C */
166     U32                     BufferLength;               /* 0x14 */
167     U32                     Reserved5;                  /* 0x18 */
168     U32                     Reserved6;                  /* 0x1C */
169     U32                     Flags;                      /* 0x20 */
170     U32                     ProductSpecific[23];        /* 0x24 */
171 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
172   Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
173
174 /* values for the BufferType field */
175 #define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
176 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
177 /* count of the number of buffer types */
178 #define MPI2_DIAG_BUF_TYPE_COUNT                    (0x02)
179
180
181 /****************************************************************************
182 *  Diagnostic Buffer Post reply
183 ****************************************************************************/
184
185 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
186 {
187     U8                      Reserved1;                  /* 0x00 */
188     U8                      BufferType;                 /* 0x01 */
189     U8                      MsgLength;                  /* 0x02 */
190     U8                      Function;                   /* 0x03 */
191     U16                     Reserved2;                  /* 0x04 */
192     U8                      Reserved3;                  /* 0x06 */
193     U8                      MsgFlags;                   /* 0x07 */
194     U8                      VP_ID;                      /* 0x08 */
195     U8                      VF_ID;                      /* 0x09 */
196     U16                     Reserved4;                  /* 0x0A */
197     U16                     Reserved5;                  /* 0x0C */
198     U16                     IOCStatus;                  /* 0x0E */
199     U32                     IOCLogInfo;                 /* 0x10 */
200     U32                     TransferLength;             /* 0x14 */
201 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
202   Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
203
204
205 /****************************************************************************
206 *  Diagnostic Release request
207 ****************************************************************************/
208
209 typedef struct _MPI2_DIAG_RELEASE_REQUEST
210 {
211     U8                      Reserved1;                  /* 0x00 */
212     U8                      BufferType;                 /* 0x01 */
213     U8                      ChainOffset;                /* 0x02 */
214     U8                      Function;                   /* 0x03 */
215     U16                     Reserved2;                  /* 0x04 */
216     U8                      Reserved3;                  /* 0x06 */
217     U8                      MsgFlags;                   /* 0x07 */
218     U8                      VP_ID;                      /* 0x08 */
219     U8                      VF_ID;                      /* 0x09 */
220     U16                     Reserved4;                  /* 0x0A */
221 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
222   Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
223
224
225 /****************************************************************************
226 *  Diagnostic Buffer Post reply
227 ****************************************************************************/
228
229 typedef struct _MPI2_DIAG_RELEASE_REPLY
230 {
231     U8                      Reserved1;                  /* 0x00 */
232     U8                      BufferType;                 /* 0x01 */
233     U8                      MsgLength;                  /* 0x02 */
234     U8                      Function;                   /* 0x03 */
235     U16                     Reserved2;                  /* 0x04 */
236     U8                      Reserved3;                  /* 0x06 */
237     U8                      MsgFlags;                   /* 0x07 */
238     U8                      VP_ID;                      /* 0x08 */
239     U8                      VF_ID;                      /* 0x09 */
240     U16                     Reserved4;                  /* 0x0A */
241     U16                     Reserved5;                  /* 0x0C */
242     U16                     IOCStatus;                  /* 0x0E */
243     U32                     IOCLogInfo;                 /* 0x10 */
244 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
245   Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
246
247
248 #endif
249