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