2 * Copyright (c) 2000-2008 LSI Corporation.
6 * Title: MPI Integrated RAID messages and structures
7 * Creation Date: April 26, 2007
9 * mpi2_raid.h Version: 02.00.04
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 * --------------------------------------------------------------------------
31 /*****************************************************************************
33 * Integrated RAID Messages
35 *****************************************************************************/
37 /****************************************************************************
38 * RAID Action messages
39 ****************************************************************************/
41 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DELETE_VOLUME action */
42 #define MPI2_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
43 #define MPI2_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000001)
45 /* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
47 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES action */
48 #define MPI2_RAID_ACTION_ADATA_DISABL_FULL_REBUILD (0x00000001)
50 /* ActionDataWord for MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE Action */
51 typedef struct _MPI2_RAID_ACTION_RATE_DATA
53 U8 RateToChange
; /* 0x00 */
54 U8 RateOrMode
; /* 0x01 */
55 U16 DataScrubDuration
; /* 0x02 */
56 } MPI2_RAID_ACTION_RATE_DATA
, MPI2_POINTER PTR_MPI2_RAID_ACTION_RATE_DATA
,
57 Mpi2RaidActionRateData_t
, MPI2_POINTER pMpi2RaidActionRateData_t
;
59 #define MPI2_RAID_ACTION_SET_RATE_RESYNC (0x00)
60 #define MPI2_RAID_ACTION_SET_RATE_DATA_SCRUB (0x01)
61 #define MPI2_RAID_ACTION_SET_RATE_POWERSAVE_MODE (0x02)
63 /* ActionDataWord for MPI2_RAID_ACTION_START_RAID_FUNCTION Action */
64 typedef struct _MPI2_RAID_ACTION_START_RAID_FUNCTION
66 U8 RAIDFunction
; /* 0x00 */
68 U16 Reserved1
; /* 0x02 */
69 } MPI2_RAID_ACTION_START_RAID_FUNCTION
,
70 MPI2_POINTER PTR_MPI2_RAID_ACTION_START_RAID_FUNCTION
,
71 Mpi2RaidActionStartRaidFunction_t
,
72 MPI2_POINTER pMpi2RaidActionStartRaidFunction_t
;
74 /* defines for the RAIDFunction field */
75 #define MPI2_RAID_ACTION_START_BACKGROUND_INIT (0x00)
76 #define MPI2_RAID_ACTION_START_ONLINE_CAP_EXPANSION (0x01)
77 #define MPI2_RAID_ACTION_START_CONSISTENCY_CHECK (0x02)
79 /* defines for the Flags field */
80 #define MPI2_RAID_ACTION_START_NEW (0x00)
81 #define MPI2_RAID_ACTION_START_RESUME (0x01)
83 /* ActionDataWord for MPI2_RAID_ACTION_STOP_RAID_FUNCTION Action */
84 typedef struct _MPI2_RAID_ACTION_STOP_RAID_FUNCTION
86 U8 RAIDFunction
; /* 0x00 */
88 U16 Reserved1
; /* 0x02 */
89 } MPI2_RAID_ACTION_STOP_RAID_FUNCTION
,
90 MPI2_POINTER PTR_MPI2_RAID_ACTION_STOP_RAID_FUNCTION
,
91 Mpi2RaidActionStopRaidFunction_t
,
92 MPI2_POINTER pMpi2RaidActionStopRaidFunction_t
;
94 /* defines for the RAIDFunction field */
95 #define MPI2_RAID_ACTION_STOP_BACKGROUND_INIT (0x00)
96 #define MPI2_RAID_ACTION_STOP_ONLINE_CAP_EXPANSION (0x01)
97 #define MPI2_RAID_ACTION_STOP_CONSISTENCY_CHECK (0x02)
99 /* defines for the Flags field */
100 #define MPI2_RAID_ACTION_STOP_ABORT (0x00)
101 #define MPI2_RAID_ACTION_STOP_PAUSE (0x01)
103 /* ActionDataWord for MPI2_RAID_ACTION_CREATE_HOT_SPARE Action */
104 typedef struct _MPI2_RAID_ACTION_HOT_SPARE
106 U8 HotSparePool
; /* 0x00 */
107 U8 Reserved1
; /* 0x01 */
108 U16 DevHandle
; /* 0x02 */
109 } MPI2_RAID_ACTION_HOT_SPARE
, MPI2_POINTER PTR_MPI2_RAID_ACTION_HOT_SPARE
,
110 Mpi2RaidActionHotSpare_t
, MPI2_POINTER pMpi2RaidActionHotSpare_t
;
112 /* ActionDataWord for MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE Action */
113 typedef struct _MPI2_RAID_ACTION_FW_UPDATE_MODE
116 U8 DeviceFirmwareUpdateModeTimeout
; /* 0x01 */
117 U16 Reserved1
; /* 0x02 */
118 } MPI2_RAID_ACTION_FW_UPDATE_MODE
,
119 MPI2_POINTER PTR_MPI2_RAID_ACTION_FW_UPDATE_MODE
,
120 Mpi2RaidActionFwUpdateMode_t
, MPI2_POINTER pMpi2RaidActionFwUpdateMode_t
;
122 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
123 #define MPI2_RAID_ACTION_ADATA_DISABLE_FW_UPDATE (0x00)
124 #define MPI2_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x01)
126 typedef union _MPI2_RAID_ACTION_DATA
129 MPI2_RAID_ACTION_RATE_DATA Rates
;
130 MPI2_RAID_ACTION_START_RAID_FUNCTION StartRaidFunction
;
131 MPI2_RAID_ACTION_STOP_RAID_FUNCTION StopRaidFunction
;
132 MPI2_RAID_ACTION_HOT_SPARE HotSpare
;
133 MPI2_RAID_ACTION_FW_UPDATE_MODE FwUpdateMode
;
134 } MPI2_RAID_ACTION_DATA
, MPI2_POINTER PTR_MPI2_RAID_ACTION_DATA
,
135 Mpi2RaidActionData_t
, MPI2_POINTER pMpi2RaidActionData_t
;
138 /* RAID Action Request Message */
139 typedef struct _MPI2_RAID_ACTION_REQUEST
141 U8 Action
; /* 0x00 */
142 U8 Reserved1
; /* 0x01 */
143 U8 ChainOffset
; /* 0x02 */
144 U8 Function
; /* 0x03 */
145 U16 VolDevHandle
; /* 0x04 */
146 U8 PhysDiskNum
; /* 0x06 */
147 U8 MsgFlags
; /* 0x07 */
150 U16 Reserved2
; /* 0x0A */
151 U32 Reserved3
; /* 0x0C */
152 MPI2_RAID_ACTION_DATA ActionDataWord
; /* 0x10 */
153 MPI2_SGE_SIMPLE_UNION ActionDataSGE
; /* 0x14 */
154 } MPI2_RAID_ACTION_REQUEST
, MPI2_POINTER PTR_MPI2_RAID_ACTION_REQUEST
,
155 Mpi2RaidActionRequest_t
, MPI2_POINTER pMpi2RaidActionRequest_t
;
157 /* RAID Action request Action values */
159 #define MPI2_RAID_ACTION_INDICATOR_STRUCT (0x01)
160 #define MPI2_RAID_ACTION_CREATE_VOLUME (0x02)
161 #define MPI2_RAID_ACTION_DELETE_VOLUME (0x03)
162 #define MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES (0x04)
163 #define MPI2_RAID_ACTION_ENABLE_ALL_VOLUMES (0x05)
164 #define MPI2_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
165 #define MPI2_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
166 #define MPI2_RAID_ACTION_FAIL_PHYSDISK (0x0F)
167 #define MPI2_RAID_ACTION_ACTIVATE_VOLUME (0x11)
168 #define MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
169 #define MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE (0x17)
170 #define MPI2_RAID_ACTION_SET_VOLUME_NAME (0x18)
171 #define MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE (0x19)
172 #define MPI2_RAID_ACTION_ENABLE_FAILED_VOLUME (0x1C)
173 #define MPI2_RAID_ACTION_CREATE_HOT_SPARE (0x1D)
174 #define MPI2_RAID_ACTION_DELETE_HOT_SPARE (0x1E)
175 #define MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED (0x20)
176 #define MPI2_RAID_ACTION_START_RAID_FUNCTION (0x21)
177 #define MPI2_RAID_ACTION_STOP_RAID_FUNCTION (0x22)
180 /* RAID Volume Creation Structure */
183 * The following define can be customized for the targeted product.
185 #ifndef MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS
186 #define MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS (1)
189 typedef struct _MPI2_RAID_VOLUME_PHYSDISK
191 U8 RAIDSetNum
; /* 0x00 */
192 U8 PhysDiskMap
; /* 0x01 */
193 U16 PhysDiskDevHandle
; /* 0x02 */
194 } MPI2_RAID_VOLUME_PHYSDISK
, MPI2_POINTER PTR_MPI2_RAID_VOLUME_PHYSDISK
,
195 Mpi2RaidVolumePhysDisk_t
, MPI2_POINTER pMpi2RaidVolumePhysDisk_t
;
197 /* defines for the PhysDiskMap field */
198 #define MPI2_RAIDACTION_PHYSDISK_PRIMARY (0x01)
199 #define MPI2_RAIDACTION_PHYSDISK_SECONDARY (0x02)
201 typedef struct _MPI2_RAID_VOLUME_CREATION_STRUCT
203 U8 NumPhysDisks
; /* 0x00 */
204 U8 VolumeType
; /* 0x01 */
205 U16 Reserved1
; /* 0x02 */
206 U32 VolumeCreationFlags
; /* 0x04 */
207 U32 VolumeSettings
; /* 0x08 */
208 U8 Reserved2
; /* 0x0C */
209 U8 ResyncRate
; /* 0x0D */
210 U16 DataScrubDuration
; /* 0x0E */
211 U64 VolumeMaxLBA
; /* 0x10 */
212 U32 StripeSize
; /* 0x18 */
213 U8 Name
[16]; /* 0x1C */
214 MPI2_RAID_VOLUME_PHYSDISK PhysDisk
[MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS
];/* 0x2C */
215 } MPI2_RAID_VOLUME_CREATION_STRUCT
,
216 MPI2_POINTER PTR_MPI2_RAID_VOLUME_CREATION_STRUCT
,
217 Mpi2RaidVolumeCreationStruct_t
, MPI2_POINTER pMpi2RaidVolumeCreationStruct_t
;
219 /* use MPI2_RAID_VOL_TYPE_ defines from mpi2_cnfg.h for VolumeType */
221 /* defines for the VolumeCreationFlags field */
222 #define MPI2_RAID_VOL_CREATION_DEFAULT_SETTINGS (0x80000000)
223 #define MPI2_RAID_VOL_CREATION_BACKGROUND_INIT (0x00000004)
224 #define MPI2_RAID_VOL_CREATION_LOW_LEVEL_INIT (0x00000002)
225 #define MPI2_RAID_VOL_CREATION_MIGRATE_DATA (0x00000001)
226 /* The following is an obsolete define.
227 * It must be shifted left 24 bits in order to set the proper bit.
229 #define MPI2_RAID_VOL_CREATION_USE_DEFAULT_SETTINGS (0x80)
232 /* RAID Online Capacity Expansion Structure */
234 typedef struct _MPI2_RAID_ONLINE_CAPACITY_EXPANSION
236 U32 Flags
; /* 0x00 */
237 U16 DevHandle0
; /* 0x04 */
238 U16 Reserved1
; /* 0x06 */
239 U16 DevHandle1
; /* 0x08 */
240 U16 Reserved2
; /* 0x0A */
241 } MPI2_RAID_ONLINE_CAPACITY_EXPANSION
,
242 MPI2_POINTER PTR_MPI2_RAID_ONLINE_CAPACITY_EXPANSION
,
243 Mpi2RaidOnlineCapacityExpansion_t
,
244 MPI2_POINTER pMpi2RaidOnlineCapacityExpansion_t
;
247 /* RAID Volume Indicator Structure */
249 typedef struct _MPI2_RAID_VOL_INDICATOR
251 U64 TotalBlocks
; /* 0x00 */
252 U64 BlocksRemaining
; /* 0x08 */
253 U32 Flags
; /* 0x10 */
254 } MPI2_RAID_VOL_INDICATOR
, MPI2_POINTER PTR_MPI2_RAID_VOL_INDICATOR
,
255 Mpi2RaidVolIndicator_t
, MPI2_POINTER pMpi2RaidVolIndicator_t
;
257 /* defines for RAID Volume Indicator Flags field */
258 #define MPI2_RAID_VOL_FLAGS_OP_MASK (0x0000000F)
259 #define MPI2_RAID_VOL_FLAGS_OP_BACKGROUND_INIT (0x00000000)
260 #define MPI2_RAID_VOL_FLAGS_OP_ONLINE_CAP_EXPANSION (0x00000001)
261 #define MPI2_RAID_VOL_FLAGS_OP_CONSISTENCY_CHECK (0x00000002)
262 #define MPI2_RAID_VOL_FLAGS_OP_RESYNC (0x00000003)
265 /* RAID Action Reply ActionData union */
266 typedef union _MPI2_RAID_ACTION_REPLY_DATA
269 MPI2_RAID_VOL_INDICATOR RaidVolumeIndicator
;
273 } MPI2_RAID_ACTION_REPLY_DATA
, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY_DATA
,
274 Mpi2RaidActionReplyData_t
, MPI2_POINTER pMpi2RaidActionReplyData_t
;
276 /* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
279 /* RAID Action Reply Message */
280 typedef struct _MPI2_RAID_ACTION_REPLY
282 U8 Action
; /* 0x00 */
283 U8 Reserved1
; /* 0x01 */
284 U8 MsgLength
; /* 0x02 */
285 U8 Function
; /* 0x03 */
286 U16 VolDevHandle
; /* 0x04 */
287 U8 PhysDiskNum
; /* 0x06 */
288 U8 MsgFlags
; /* 0x07 */
291 U16 Reserved2
; /* 0x0A */
292 U16 Reserved3
; /* 0x0C */
293 U16 IOCStatus
; /* 0x0E */
294 U32 IOCLogInfo
; /* 0x10 */
295 MPI2_RAID_ACTION_REPLY_DATA ActionData
; /* 0x14 */
296 } MPI2_RAID_ACTION_REPLY
, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY
,
297 Mpi2RaidActionReply_t
, MPI2_POINTER pMpi2RaidActionReply_t
;