aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpi/mpi2_raid.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-11-11 07:00:17 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-11 18:11:23 -0500
commit3c5866565f37d45e3b812e3045caf2358f2f2377 (patch)
tree86c6c4a2e284b401bb56c30a9ce8659732810dd3 /drivers/scsi/mpt2sas/mpi/mpi2_raid.h
parent2a188cb42b43b7a579c2b6d0e9fa095182333540 (diff)
mpt2sas: Use mpi headers from mpt3sas
Use a single set of the hardware description headers instead of having them in the source tree twice. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_raid.h')
-rw-r--r--drivers/scsi/mpt2sas/mpi/mpi2_raid.h366
1 files changed, 0 insertions, 366 deletions
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_raid.h b/drivers/scsi/mpt2sas/mpi/mpi2_raid.h
deleted file mode 100644
index 7efa58ff0d34..000000000000
--- a/drivers/scsi/mpt2sas/mpi/mpi2_raid.h
+++ /dev/null
@@ -1,366 +0,0 @@
1/*
2 * Copyright (c) 2000-2014 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.10
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 * 04-17-13 02.00.10 Added MPI25_RAID_ACTION_ADATA_ALLOW_PI.
33 * --------------------------------------------------------------------------
34 */
35
36#ifndef MPI2_RAID_H
37#define MPI2_RAID_H
38
39/*****************************************************************************
40*
41* Integrated RAID Messages
42*
43*****************************************************************************/
44
45/****************************************************************************
46* RAID Action messages
47****************************************************************************/
48
49/* ActionDataWord defines for use with MPI2_RAID_ACTION_CREATE_VOLUME action */
50#define MPI25_RAID_ACTION_ADATA_ALLOW_PI (0x80000000)
51
52/* ActionDataWord defines for use with MPI2_RAID_ACTION_DELETE_VOLUME action */
53#define MPI2_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
54#define MPI2_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000001)
55
56/* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
57
58/* ActionDataWord defines for use with MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES action */
59#define MPI2_RAID_ACTION_ADATA_DISABL_FULL_REBUILD (0x00000001)
60
61/* ActionDataWord for MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE Action */
62typedef struct _MPI2_RAID_ACTION_RATE_DATA
63{
64 U8 RateToChange; /* 0x00 */
65 U8 RateOrMode; /* 0x01 */
66 U16 DataScrubDuration; /* 0x02 */
67} MPI2_RAID_ACTION_RATE_DATA, MPI2_POINTER PTR_MPI2_RAID_ACTION_RATE_DATA,
68 Mpi2RaidActionRateData_t, MPI2_POINTER pMpi2RaidActionRateData_t;
69
70#define MPI2_RAID_ACTION_SET_RATE_RESYNC (0x00)
71#define MPI2_RAID_ACTION_SET_RATE_DATA_SCRUB (0x01)
72#define MPI2_RAID_ACTION_SET_RATE_POWERSAVE_MODE (0x02)
73
74/* ActionDataWord for MPI2_RAID_ACTION_START_RAID_FUNCTION Action */
75typedef struct _MPI2_RAID_ACTION_START_RAID_FUNCTION
76{
77 U8 RAIDFunction; /* 0x00 */
78 U8 Flags; /* 0x01 */
79 U16 Reserved1; /* 0x02 */
80} MPI2_RAID_ACTION_START_RAID_FUNCTION,
81 MPI2_POINTER PTR_MPI2_RAID_ACTION_START_RAID_FUNCTION,
82 Mpi2RaidActionStartRaidFunction_t,
83 MPI2_POINTER pMpi2RaidActionStartRaidFunction_t;
84
85/* defines for the RAIDFunction field */
86#define MPI2_RAID_ACTION_START_BACKGROUND_INIT (0x00)
87#define MPI2_RAID_ACTION_START_ONLINE_CAP_EXPANSION (0x01)
88#define MPI2_RAID_ACTION_START_CONSISTENCY_CHECK (0x02)
89
90/* defines for the Flags field */
91#define MPI2_RAID_ACTION_START_NEW (0x00)
92#define MPI2_RAID_ACTION_START_RESUME (0x01)
93
94/* ActionDataWord for MPI2_RAID_ACTION_STOP_RAID_FUNCTION Action */
95typedef struct _MPI2_RAID_ACTION_STOP_RAID_FUNCTION
96{
97 U8 RAIDFunction; /* 0x00 */
98 U8 Flags; /* 0x01 */
99 U16 Reserved1; /* 0x02 */
100} MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
101 MPI2_POINTER PTR_MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
102 Mpi2RaidActionStopRaidFunction_t,
103 MPI2_POINTER pMpi2RaidActionStopRaidFunction_t;
104
105/* defines for the RAIDFunction field */
106#define MPI2_RAID_ACTION_STOP_BACKGROUND_INIT (0x00)
107#define MPI2_RAID_ACTION_STOP_ONLINE_CAP_EXPANSION (0x01)
108#define MPI2_RAID_ACTION_STOP_CONSISTENCY_CHECK (0x02)
109
110/* defines for the Flags field */
111#define MPI2_RAID_ACTION_STOP_ABORT (0x00)
112#define MPI2_RAID_ACTION_STOP_PAUSE (0x01)
113
114/* ActionDataWord for MPI2_RAID_ACTION_CREATE_HOT_SPARE Action */
115typedef struct _MPI2_RAID_ACTION_HOT_SPARE
116{
117 U8 HotSparePool; /* 0x00 */
118 U8 Reserved1; /* 0x01 */
119 U16 DevHandle; /* 0x02 */
120} MPI2_RAID_ACTION_HOT_SPARE, MPI2_POINTER PTR_MPI2_RAID_ACTION_HOT_SPARE,
121 Mpi2RaidActionHotSpare_t, MPI2_POINTER pMpi2RaidActionHotSpare_t;
122
123/* ActionDataWord for MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE Action */
124typedef struct _MPI2_RAID_ACTION_FW_UPDATE_MODE
125{
126 U8 Flags; /* 0x00 */
127 U8 DeviceFirmwareUpdateModeTimeout; /* 0x01 */
128 U16 Reserved1; /* 0x02 */
129} MPI2_RAID_ACTION_FW_UPDATE_MODE,
130 MPI2_POINTER PTR_MPI2_RAID_ACTION_FW_UPDATE_MODE,
131 Mpi2RaidActionFwUpdateMode_t, MPI2_POINTER pMpi2RaidActionFwUpdateMode_t;
132
133/* ActionDataWord defines for use with MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
134#define MPI2_RAID_ACTION_ADATA_DISABLE_FW_UPDATE (0x00)
135#define MPI2_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x01)
136
137typedef union _MPI2_RAID_ACTION_DATA
138{
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, MPI2_POINTER PTR_MPI2_RAID_ACTION_DATA,
146 Mpi2RaidActionData_t, MPI2_POINTER pMpi2RaidActionData_t;
147
148
149/* RAID Action Request Message */
150typedef struct _MPI2_RAID_ACTION_REQUEST
151{
152 U8 Action; /* 0x00 */
153 U8 Reserved1; /* 0x01 */
154 U8 ChainOffset; /* 0x02 */
155 U8 Function; /* 0x03 */
156 U16 VolDevHandle; /* 0x04 */
157 U8 PhysDiskNum; /* 0x06 */
158 U8 MsgFlags; /* 0x07 */
159 U8 VP_ID; /* 0x08 */
160 U8 VF_ID; /* 0x09 */
161 U16 Reserved2; /* 0x0A */
162 U32 Reserved3; /* 0x0C */
163 MPI2_RAID_ACTION_DATA ActionDataWord; /* 0x10 */
164 MPI2_SGE_SIMPLE_UNION ActionDataSGE; /* 0x14 */
165} MPI2_RAID_ACTION_REQUEST, MPI2_POINTER PTR_MPI2_RAID_ACTION_REQUEST,
166 Mpi2RaidActionRequest_t, MPI2_POINTER pMpi2RaidActionRequest_t;
167
168/* RAID Action request Action values */
169
170#define MPI2_RAID_ACTION_INDICATOR_STRUCT (0x01)
171#define MPI2_RAID_ACTION_CREATE_VOLUME (0x02)
172#define MPI2_RAID_ACTION_DELETE_VOLUME (0x03)
173#define MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES (0x04)
174#define MPI2_RAID_ACTION_ENABLE_ALL_VOLUMES (0x05)
175#define MPI2_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
176#define MPI2_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
177#define MPI2_RAID_ACTION_FAIL_PHYSDISK (0x0F)
178#define MPI2_RAID_ACTION_ACTIVATE_VOLUME (0x11)
179#define MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
180#define MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE (0x17)
181#define MPI2_RAID_ACTION_SET_VOLUME_NAME (0x18)
182#define MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE (0x19)
183#define MPI2_RAID_ACTION_ENABLE_FAILED_VOLUME (0x1C)
184#define MPI2_RAID_ACTION_CREATE_HOT_SPARE (0x1D)
185#define MPI2_RAID_ACTION_DELETE_HOT_SPARE (0x1E)
186#define MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED (0x20)
187#define MPI2_RAID_ACTION_START_RAID_FUNCTION (0x21)
188#define MPI2_RAID_ACTION_STOP_RAID_FUNCTION (0x22)
189#define MPI2_RAID_ACTION_COMPATIBILITY_CHECK (0x23)
190#define MPI2_RAID_ACTION_PHYSDISK_HIDDEN (0x24)
191#define MPI2_RAID_ACTION_MIN_PRODUCT_SPECIFIC (0x80)
192#define MPI2_RAID_ACTION_MAX_PRODUCT_SPECIFIC (0xFF)
193
194/* RAID Volume Creation Structure */
195
196/*
197 * The following define can be customized for the targeted product.
198 */
199#ifndef MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS
200#define MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS (1)
201#endif
202
203typedef struct _MPI2_RAID_VOLUME_PHYSDISK
204{
205 U8 RAIDSetNum; /* 0x00 */
206 U8 PhysDiskMap; /* 0x01 */
207 U16 PhysDiskDevHandle; /* 0x02 */
208} MPI2_RAID_VOLUME_PHYSDISK, MPI2_POINTER PTR_MPI2_RAID_VOLUME_PHYSDISK,
209 Mpi2RaidVolumePhysDisk_t, MPI2_POINTER pMpi2RaidVolumePhysDisk_t;
210
211/* defines for the PhysDiskMap field */
212#define MPI2_RAIDACTION_PHYSDISK_PRIMARY (0x01)
213#define MPI2_RAIDACTION_PHYSDISK_SECONDARY (0x02)
214
215typedef struct _MPI2_RAID_VOLUME_CREATION_STRUCT
216{
217 U8 NumPhysDisks; /* 0x00 */
218 U8 VolumeType; /* 0x01 */
219 U16 Reserved1; /* 0x02 */
220 U32 VolumeCreationFlags; /* 0x04 */
221 U32 VolumeSettings; /* 0x08 */
222 U8 Reserved2; /* 0x0C */
223 U8 ResyncRate; /* 0x0D */
224 U16 DataScrubDuration; /* 0x0E */
225 U64 VolumeMaxLBA; /* 0x10 */
226 U32 StripeSize; /* 0x18 */
227 U8 Name[16]; /* 0x1C */
228 MPI2_RAID_VOLUME_PHYSDISK PhysDisk[MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS];/* 0x2C */
229} MPI2_RAID_VOLUME_CREATION_STRUCT,
230 MPI2_POINTER PTR_MPI2_RAID_VOLUME_CREATION_STRUCT,
231 Mpi2RaidVolumeCreationStruct_t, MPI2_POINTER pMpi2RaidVolumeCreationStruct_t;
232
233/* use MPI2_RAID_VOL_TYPE_ defines from mpi2_cnfg.h for VolumeType */
234
235/* defines for the VolumeCreationFlags field */
236#define MPI2_RAID_VOL_CREATION_DEFAULT_SETTINGS (0x80000000)
237#define MPI2_RAID_VOL_CREATION_BACKGROUND_INIT (0x00000004)
238#define MPI2_RAID_VOL_CREATION_LOW_LEVEL_INIT (0x00000002)
239#define MPI2_RAID_VOL_CREATION_MIGRATE_DATA (0x00000001)
240/* The following is an obsolete define.
241 * It must be shifted left 24 bits in order to set the proper bit.
242 */
243#define MPI2_RAID_VOL_CREATION_USE_DEFAULT_SETTINGS (0x80)
244
245
246/* RAID Online Capacity Expansion Structure */
247
248typedef struct _MPI2_RAID_ONLINE_CAPACITY_EXPANSION
249{
250 U32 Flags; /* 0x00 */
251 U16 DevHandle0; /* 0x04 */
252 U16 Reserved1; /* 0x06 */
253 U16 DevHandle1; /* 0x08 */
254 U16 Reserved2; /* 0x0A */
255} MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
256 MPI2_POINTER PTR_MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
257 Mpi2RaidOnlineCapacityExpansion_t,
258 MPI2_POINTER pMpi2RaidOnlineCapacityExpansion_t;
259
260/* RAID Compatibility Input Structure */
261
262typedef struct _MPI2_RAID_COMPATIBILITY_INPUT_STRUCT {
263 U16 SourceDevHandle; /* 0x00 */
264 U16 CandidateDevHandle; /* 0x02 */
265 U32 Flags; /* 0x04 */
266 U32 Reserved1; /* 0x08 */
267 U32 Reserved2; /* 0x0C */
268} MPI2_RAID_COMPATIBILITY_INPUT_STRUCT,
269MPI2_POINTER PTR_MPI2_RAID_COMPATIBILITY_INPUT_STRUCT,
270Mpi2RaidCompatibilityInputStruct_t,
271MPI2_POINTER pMpi2RaidCompatibilityInputStruct_t;
272
273/* defines for RAID Compatibility Structure Flags field */
274#define MPI2_RAID_COMPAT_SOURCE_IS_VOLUME_FLAG (0x00000002)
275#define MPI2_RAID_COMPAT_REPORT_SOURCE_INFO_FLAG (0x00000001)
276
277
278/* RAID Volume Indicator Structure */
279
280typedef struct _MPI2_RAID_VOL_INDICATOR
281{
282 U64 TotalBlocks; /* 0x00 */
283 U64 BlocksRemaining; /* 0x08 */
284 U32 Flags; /* 0x10 */
285 U32 ElapsedSeconds; /* 0x14 */
286} MPI2_RAID_VOL_INDICATOR, MPI2_POINTER PTR_MPI2_RAID_VOL_INDICATOR,
287 Mpi2RaidVolIndicator_t, MPI2_POINTER pMpi2RaidVolIndicator_t;
288
289/* defines for RAID Volume Indicator Flags field */
290#define MPI2_RAID_VOL_FLAGS_ELAPSED_SECONDS_VALID (0x80000000)
291
292#define MPI2_RAID_VOL_FLAGS_OP_MASK (0x0000000F)
293#define MPI2_RAID_VOL_FLAGS_OP_BACKGROUND_INIT (0x00000000)
294#define MPI2_RAID_VOL_FLAGS_OP_ONLINE_CAP_EXPANSION (0x00000001)
295#define MPI2_RAID_VOL_FLAGS_OP_CONSISTENCY_CHECK (0x00000002)
296#define MPI2_RAID_VOL_FLAGS_OP_RESYNC (0x00000003)
297#define MPI2_RAID_VOL_FLAGS_OP_MDC (0x00000004)
298
299/* RAID Compatibility Result Structure */
300
301typedef struct _MPI2_RAID_COMPATIBILITY_RESULT_STRUCT {
302 U8 State; /* 0x00 */
303 U8 Reserved1; /* 0x01 */
304 U16 Reserved2; /* 0x02 */
305 U32 GenericAttributes; /* 0x04 */
306 U32 OEMSpecificAttributes; /* 0x08 */
307 U32 Reserved3; /* 0x0C */
308 U32 Reserved4; /* 0x10 */
309} MPI2_RAID_COMPATIBILITY_RESULT_STRUCT,
310MPI2_POINTER PTR_MPI2_RAID_COMPATIBILITY_RESULT_STRUCT,
311Mpi2RaidCompatibilityResultStruct_t,
312MPI2_POINTER pMpi2RaidCompatibilityResultStruct_t;
313
314/* defines for RAID Compatibility Result Structure State field */
315#define MPI2_RAID_COMPAT_STATE_COMPATIBLE (0x00)
316#define MPI2_RAID_COMPAT_STATE_NOT_COMPATIBLE (0x01)
317
318/* defines for RAID Compatibility Result Structure GenericAttributes field */
319#define MPI2_RAID_COMPAT_GENATTRIB_4K_SECTOR (0x00000010)
320
321#define MPI2_RAID_COMPAT_GENATTRIB_MEDIA_MASK (0x0000000C)
322#define MPI2_RAID_COMPAT_GENATTRIB_SOLID_STATE_DRIVE (0x00000008)
323#define MPI2_RAID_COMPAT_GENATTRIB_HARD_DISK_DRIVE (0x00000004)
324
325#define MPI2_RAID_COMPAT_GENATTRIB_PROTOCOL_MASK (0x00000003)
326#define MPI2_RAID_COMPAT_GENATTRIB_SAS_PROTOCOL (0x00000002)
327#define MPI2_RAID_COMPAT_GENATTRIB_SATA_PROTOCOL (0x00000001)
328
329/* RAID Action Reply ActionData union */
330typedef union _MPI2_RAID_ACTION_REPLY_DATA
331{
332 U32 Word[6];
333 MPI2_RAID_VOL_INDICATOR RaidVolumeIndicator;
334 U16 VolDevHandle;
335 U8 VolumeState;
336 U8 PhysDiskNum;
337 MPI2_RAID_COMPATIBILITY_RESULT_STRUCT RaidCompatibilityResult;
338} MPI2_RAID_ACTION_REPLY_DATA, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY_DATA,
339 Mpi2RaidActionReplyData_t, MPI2_POINTER pMpi2RaidActionReplyData_t;
340
341/* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
342
343
344/* RAID Action Reply Message */
345typedef struct _MPI2_RAID_ACTION_REPLY
346{
347 U8 Action; /* 0x00 */
348 U8 Reserved1; /* 0x01 */
349 U8 MsgLength; /* 0x02 */
350 U8 Function; /* 0x03 */
351 U16 VolDevHandle; /* 0x04 */
352 U8 PhysDiskNum; /* 0x06 */
353 U8 MsgFlags; /* 0x07 */
354 U8 VP_ID; /* 0x08 */
355 U8 VF_ID; /* 0x09 */
356 U16 Reserved2; /* 0x0A */
357 U16 Reserved3; /* 0x0C */
358 U16 IOCStatus; /* 0x0E */
359 U32 IOCLogInfo; /* 0x10 */
360 MPI2_RAID_ACTION_REPLY_DATA ActionData; /* 0x14 */
361} MPI2_RAID_ACTION_REPLY, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY,
362 Mpi2RaidActionReply_t, MPI2_POINTER pMpi2RaidActionReply_t;
363
364
365#endif
366