1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36#ifndef MPI2_RAID_H
37#define MPI2_RAID_H
38
39
40
41
42
43
44
45
46
47
48
49
50#define MPI2_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
51#define MPI2_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000001)
52
53
54
55
56
57
58#define MPI2_RAID_ACTION_ADATA_DISABL_FULL_REBUILD (0x00000001)
59
60
61typedef struct _MPI2_RAID_ACTION_RATE_DATA {
62 U8 RateToChange;
63 U8 RateOrMode;
64 U16 DataScrubDuration;
65} MPI2_RAID_ACTION_RATE_DATA, *PTR_MPI2_RAID_ACTION_RATE_DATA,
66 Mpi2RaidActionRateData_t, *pMpi2RaidActionRateData_t;
67
68#define MPI2_RAID_ACTION_SET_RATE_RESYNC (0x00)
69#define MPI2_RAID_ACTION_SET_RATE_DATA_SCRUB (0x01)
70#define MPI2_RAID_ACTION_SET_RATE_POWERSAVE_MODE (0x02)
71
72
73typedef struct _MPI2_RAID_ACTION_START_RAID_FUNCTION {
74 U8 RAIDFunction;
75 U8 Flags;
76 U16 Reserved1;
77} MPI2_RAID_ACTION_START_RAID_FUNCTION,
78 *PTR_MPI2_RAID_ACTION_START_RAID_FUNCTION,
79 Mpi2RaidActionStartRaidFunction_t,
80 *pMpi2RaidActionStartRaidFunction_t;
81
82
83#define MPI2_RAID_ACTION_START_BACKGROUND_INIT (0x00)
84#define MPI2_RAID_ACTION_START_ONLINE_CAP_EXPANSION (0x01)
85#define MPI2_RAID_ACTION_START_CONSISTENCY_CHECK (0x02)
86
87
88#define MPI2_RAID_ACTION_START_NEW (0x00)
89#define MPI2_RAID_ACTION_START_RESUME (0x01)
90
91
92typedef struct _MPI2_RAID_ACTION_STOP_RAID_FUNCTION {
93 U8 RAIDFunction;
94 U8 Flags;
95 U16 Reserved1;
96} MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
97 *PTR_MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
98 Mpi2RaidActionStopRaidFunction_t,
99 *pMpi2RaidActionStopRaidFunction_t;
100
101
102#define MPI2_RAID_ACTION_STOP_BACKGROUND_INIT (0x00)
103#define MPI2_RAID_ACTION_STOP_ONLINE_CAP_EXPANSION (0x01)
104#define MPI2_RAID_ACTION_STOP_CONSISTENCY_CHECK (0x02)
105
106
107#define MPI2_RAID_ACTION_STOP_ABORT (0x00)
108#define MPI2_RAID_ACTION_STOP_PAUSE (0x01)
109
110
111typedef struct _MPI2_RAID_ACTION_HOT_SPARE {
112 U8 HotSparePool;
113 U8 Reserved1;
114 U16 DevHandle;
115} MPI2_RAID_ACTION_HOT_SPARE, *PTR_MPI2_RAID_ACTION_HOT_SPARE,
116 Mpi2RaidActionHotSpare_t, *pMpi2RaidActionHotSpare_t;
117
118
119typedef struct _MPI2_RAID_ACTION_FW_UPDATE_MODE {
120 U8 Flags;
121 U8 DeviceFirmwareUpdateModeTimeout;
122 U16 Reserved1;
123} MPI2_RAID_ACTION_FW_UPDATE_MODE,
124 *PTR_MPI2_RAID_ACTION_FW_UPDATE_MODE,
125 Mpi2RaidActionFwUpdateMode_t,
126 *pMpi2RaidActionFwUpdateMode_t;
127
128
129
130#define MPI2_RAID_ACTION_ADATA_DISABLE_FW_UPDATE (0x00)
131#define MPI2_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x01)
132
133typedef union _MPI2_RAID_ACTION_DATA {
134 U32 Word;
135 MPI2_RAID_ACTION_RATE_DATA Rates;
136 MPI2_RAID_ACTION_START_RAID_FUNCTION StartRaidFunction;
137 MPI2_RAID_ACTION_STOP_RAID_FUNCTION StopRaidFunction;
138 MPI2_RAID_ACTION_HOT_SPARE HotSpare;
139 MPI2_RAID_ACTION_FW_UPDATE_MODE FwUpdateMode;
140} MPI2_RAID_ACTION_DATA, *PTR_MPI2_RAID_ACTION_DATA,
141 Mpi2RaidActionData_t, *pMpi2RaidActionData_t;
142
143
144typedef struct _MPI2_RAID_ACTION_REQUEST {
145 U8 Action;
146 U8 Reserved1;
147 U8 ChainOffset;
148 U8 Function;
149 U16 VolDevHandle;
150 U8 PhysDiskNum;
151 U8 MsgFlags;
152 U8 VP_ID;
153 U8 VF_ID;
154 U16 Reserved2;
155 U32 Reserved3;
156 MPI2_RAID_ACTION_DATA ActionDataWord;
157 MPI2_SGE_SIMPLE_UNION ActionDataSGE;
158} MPI2_RAID_ACTION_REQUEST, *PTR_MPI2_RAID_ACTION_REQUEST,
159 Mpi2RaidActionRequest_t, *pMpi2RaidActionRequest_t;
160
161
162
163#define MPI2_RAID_ACTION_INDICATOR_STRUCT (0x01)
164#define MPI2_RAID_ACTION_CREATE_VOLUME (0x02)
165#define MPI2_RAID_ACTION_DELETE_VOLUME (0x03)
166#define MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES (0x04)
167#define MPI2_RAID_ACTION_ENABLE_ALL_VOLUMES (0x05)
168#define MPI2_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
169#define MPI2_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
170#define MPI2_RAID_ACTION_FAIL_PHYSDISK (0x0F)
171#define MPI2_RAID_ACTION_ACTIVATE_VOLUME (0x11)
172#define MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
173#define MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE (0x17)
174#define MPI2_RAID_ACTION_SET_VOLUME_NAME (0x18)
175#define MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE (0x19)
176#define MPI2_RAID_ACTION_ENABLE_FAILED_VOLUME (0x1C)
177#define MPI2_RAID_ACTION_CREATE_HOT_SPARE (0x1D)
178#define MPI2_RAID_ACTION_DELETE_HOT_SPARE (0x1E)
179#define MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED (0x20)
180#define MPI2_RAID_ACTION_START_RAID_FUNCTION (0x21)
181#define MPI2_RAID_ACTION_STOP_RAID_FUNCTION (0x22)
182#define MPI2_RAID_ACTION_COMPATIBILITY_CHECK (0x23)
183#define MPI2_RAID_ACTION_PHYSDISK_HIDDEN (0x24)
184#define MPI2_RAID_ACTION_MIN_PRODUCT_SPECIFIC (0x80)
185#define MPI2_RAID_ACTION_MAX_PRODUCT_SPECIFIC (0xFF)
186
187
188
189
190
191
192#ifndef MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS
193#define MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS (1)
194#endif
195
196typedef struct _MPI2_RAID_VOLUME_PHYSDISK {
197 U8 RAIDSetNum;
198 U8 PhysDiskMap;
199 U16 PhysDiskDevHandle;
200} MPI2_RAID_VOLUME_PHYSDISK, *PTR_MPI2_RAID_VOLUME_PHYSDISK,
201 Mpi2RaidVolumePhysDisk_t, *pMpi2RaidVolumePhysDisk_t;
202
203
204#define MPI2_RAIDACTION_PHYSDISK_PRIMARY (0x01)
205#define MPI2_RAIDACTION_PHYSDISK_SECONDARY (0x02)
206
207typedef struct _MPI2_RAID_VOLUME_CREATION_STRUCT {
208 U8 NumPhysDisks;
209 U8 VolumeType;
210 U16 Reserved1;
211 U32 VolumeCreationFlags;
212 U32 VolumeSettings;
213 U8 Reserved2;
214 U8 ResyncRate;
215 U16 DataScrubDuration;
216 U64 VolumeMaxLBA;
217 U32 StripeSize;
218 U8 Name[16];
219 MPI2_RAID_VOLUME_PHYSDISK
220 PhysDisk[MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS];
221} MPI2_RAID_VOLUME_CREATION_STRUCT,
222 *PTR_MPI2_RAID_VOLUME_CREATION_STRUCT,
223 Mpi2RaidVolumeCreationStruct_t,
224 *pMpi2RaidVolumeCreationStruct_t;
225
226
227
228
229#define MPI2_RAID_VOL_CREATION_DEFAULT_SETTINGS (0x80000000)
230#define MPI2_RAID_VOL_CREATION_BACKGROUND_INIT (0x00000004)
231#define MPI2_RAID_VOL_CREATION_LOW_LEVEL_INIT (0x00000002)
232#define MPI2_RAID_VOL_CREATION_MIGRATE_DATA (0x00000001)
233
234
235
236#define MPI2_RAID_VOL_CREATION_USE_DEFAULT_SETTINGS (0x80)
237
238
239
240typedef struct _MPI2_RAID_ONLINE_CAPACITY_EXPANSION {
241 U32 Flags;
242 U16 DevHandle0;
243 U16 Reserved1;
244 U16 DevHandle1;
245 U16 Reserved2;
246} MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
247 *PTR_MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
248 Mpi2RaidOnlineCapacityExpansion_t,
249 *pMpi2RaidOnlineCapacityExpansion_t;
250
251
252
253typedef struct _MPI2_RAID_COMPATIBILITY_INPUT_STRUCT {
254 U16 SourceDevHandle;
255 U16 CandidateDevHandle;
256 U32 Flags;
257 U32 Reserved1;
258 U32 Reserved2;
259} MPI2_RAID_COMPATIBILITY_INPUT_STRUCT,
260 *PTR_MPI2_RAID_COMPATIBILITY_INPUT_STRUCT,
261 Mpi2RaidCompatibilityInputStruct_t,
262 *pMpi2RaidCompatibilityInputStruct_t;
263
264
265#define MPI2_RAID_COMPAT_SOURCE_IS_VOLUME_FLAG (0x00000002)
266#define MPI2_RAID_COMPAT_REPORT_SOURCE_INFO_FLAG (0x00000001)
267
268
269
270typedef struct _MPI2_RAID_VOL_INDICATOR {
271 U64 TotalBlocks;
272 U64 BlocksRemaining;
273 U32 Flags;
274 U32 ElapsedSeconds;
275} MPI2_RAID_VOL_INDICATOR, *PTR_MPI2_RAID_VOL_INDICATOR,
276 Mpi2RaidVolIndicator_t, *pMpi2RaidVolIndicator_t;
277
278
279#define MPI2_RAID_VOL_FLAGS_ELAPSED_SECONDS_VALID (0x80000000)
280#define MPI2_RAID_VOL_FLAGS_OP_MASK (0x0000000F)
281#define MPI2_RAID_VOL_FLAGS_OP_BACKGROUND_INIT (0x00000000)
282#define MPI2_RAID_VOL_FLAGS_OP_ONLINE_CAP_EXPANSION (0x00000001)
283#define MPI2_RAID_VOL_FLAGS_OP_CONSISTENCY_CHECK (0x00000002)
284#define MPI2_RAID_VOL_FLAGS_OP_RESYNC (0x00000003)
285#define MPI2_RAID_VOL_FLAGS_OP_MDC (0x00000004)
286
287
288
289typedef struct _MPI2_RAID_COMPATIBILITY_RESULT_STRUCT {
290 U8 State;
291 U8 Reserved1;
292 U16 Reserved2;
293 U32 GenericAttributes;
294 U32 OEMSpecificAttributes;
295 U32 Reserved3;
296 U32 Reserved4;
297} MPI2_RAID_COMPATIBILITY_RESULT_STRUCT,
298 *PTR_MPI2_RAID_COMPATIBILITY_RESULT_STRUCT,
299 Mpi2RaidCompatibilityResultStruct_t,
300 *pMpi2RaidCompatibilityResultStruct_t;
301
302
303#define MPI2_RAID_COMPAT_STATE_COMPATIBLE (0x00)
304#define MPI2_RAID_COMPAT_STATE_NOT_COMPATIBLE (0x01)
305
306
307#define MPI2_RAID_COMPAT_GENATTRIB_4K_SECTOR (0x00000010)
308
309#define MPI2_RAID_COMPAT_GENATTRIB_MEDIA_MASK (0x0000000C)
310#define MPI2_RAID_COMPAT_GENATTRIB_SOLID_STATE_DRIVE (0x00000008)
311#define MPI2_RAID_COMPAT_GENATTRIB_HARD_DISK_DRIVE (0x00000004)
312
313#define MPI2_RAID_COMPAT_GENATTRIB_PROTOCOL_MASK (0x00000003)
314#define MPI2_RAID_COMPAT_GENATTRIB_SAS_PROTOCOL (0x00000002)
315#define MPI2_RAID_COMPAT_GENATTRIB_SATA_PROTOCOL (0x00000001)
316
317
318typedef union _MPI2_RAID_ACTION_REPLY_DATA {
319 U32 Word[6];
320 MPI2_RAID_VOL_INDICATOR RaidVolumeIndicator;
321 U16 VolDevHandle;
322 U8 VolumeState;
323 U8 PhysDiskNum;
324 MPI2_RAID_COMPATIBILITY_RESULT_STRUCT RaidCompatibilityResult;
325} MPI2_RAID_ACTION_REPLY_DATA, *PTR_MPI2_RAID_ACTION_REPLY_DATA,
326 Mpi2RaidActionReplyData_t, *pMpi2RaidActionReplyData_t;
327
328
329
330
331
332typedef struct _MPI2_RAID_ACTION_REPLY {
333 U8 Action;
334 U8 Reserved1;
335 U8 MsgLength;
336 U8 Function;
337 U16 VolDevHandle;
338 U8 PhysDiskNum;
339 U8 MsgFlags;
340 U8 VP_ID;
341 U8 VF_ID;
342 U16 Reserved2;
343 U16 Reserved3;
344 U16 IOCStatus;
345 U32 IOCLogInfo;
346 MPI2_RAID_ACTION_REPLY_DATA ActionData;
347} MPI2_RAID_ACTION_REPLY, *PTR_MPI2_RAID_ACTION_REPLY,
348 Mpi2RaidActionReply_t, *pMpi2RaidActionReply_t;
349
350#endif
351