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