Print this page
Initial modifications using the code changes present between
the LSI source code for FreeBSD drivers. Specifically the changes
between from mpslsi-source-17.00.00.00 -> mpslsi-source-03.00.00.00.
This mainly involves using a different scatter/gather element in
frame setup.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/scsi/adapters/mpt_sas3/mpi/mpi2_raid.h
+++ new/usr/src/uts/common/sys/scsi/adapters/mpt_sas3/mpi/mpi2_raid.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 - * Copyright (c) 2000 to 2009, LSI Corporation.
24 - * All rights reserved.
23 + * Copyright (c) 2000-2012 LSI Corporation.
25 24 *
26 25 * Redistribution and use in source and binary forms of all code within
27 26 * this file that is exclusively owned by LSI, with or without
28 27 * modification, is permitted provided that, in addition to the CDDL 1.0
29 28 * License requirements, the following conditions are met:
30 29 *
31 30 * Neither the name of the author nor the names of its contributors may be
32 31 * used to endorse or promote products derived from this software without
33 32 * specific prior written permission.
34 33 *
35 34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36 35 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37 36 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
38 37 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
39 38 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
40 39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
41 40 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
42 41 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
43 42 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
44 43 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45 44 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
46 45 * DAMAGE.
47 46 */
48 47
49 48 /*
50 49 * Name: mpi2_raid.h
51 50 * Title: MPI Integrated RAID messages and structures
52 51 * Creation Date: April 26, 2007
53 52 *
54 - * mpi2_raid.h Version: 02.00.04
53 + * mpi2_raid.h Version: 02.00.05
55 54 *
56 55 * Version History
57 56 * ---------------
58 57 *
59 58 * Date Version Description
60 59 * -------- -------- ------------------------------------------------------
61 60 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
62 61 * 08-31-07 02.00.01 Modifications to RAID Action request and reply,
63 62 * including the Actions and ActionData.
64 63 * 02-29-08 02.00.02 Added MPI2_RAID_ACTION_ADATA_DISABL_FULL_REBUILD.
65 64 * 05-21-08 02.00.03 Added MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS so that
66 65 * the PhysDisk array in MPI2_RAID_VOLUME_CREATION_STRUCT
67 66 * can be sized by the build environment.
68 67 * 07-30-09 02.00.04 Added proper define for the Use Default Settings bit of
69 68 * VolumeCreationFlags and marked the old one as obsolete.
69 + * 05-12-10 02.00.05 Added MPI2_RAID_VOL_FLAGS_OP_MDC define.
70 70 * --------------------------------------------------------------------------
71 71 */
72 72
73 73 #ifndef MPI2_RAID_H
74 74 #define MPI2_RAID_H
75 75
76 76 /*****************************************************************************
77 77 *
78 78 * Integrated RAID Messages
79 79 *
80 80 *****************************************************************************/
81 81
82 82 /****************************************************************************
83 83 * RAID Action messages
84 84 ****************************************************************************/
85 85
86 86 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DELETE_VOLUME action */
87 87 #define MPI2_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
88 88 #define MPI2_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000001)
89 89
90 90 /* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
91 91
92 92 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES action */
93 93 #define MPI2_RAID_ACTION_ADATA_DISABL_FULL_REBUILD (0x00000001)
94 94
95 95 /* ActionDataWord for MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE Action */
96 96 typedef struct _MPI2_RAID_ACTION_RATE_DATA
97 97 {
98 98 U8 RateToChange; /* 0x00 */
99 99 U8 RateOrMode; /* 0x01 */
100 100 U16 DataScrubDuration; /* 0x02 */
101 101 } MPI2_RAID_ACTION_RATE_DATA, MPI2_POINTER PTR_MPI2_RAID_ACTION_RATE_DATA,
102 102 Mpi2RaidActionRateData_t, MPI2_POINTER pMpi2RaidActionRateData_t;
103 103
104 104 #define MPI2_RAID_ACTION_SET_RATE_RESYNC (0x00)
105 105 #define MPI2_RAID_ACTION_SET_RATE_DATA_SCRUB (0x01)
106 106 #define MPI2_RAID_ACTION_SET_RATE_POWERSAVE_MODE (0x02)
107 107
108 108 /* ActionDataWord for MPI2_RAID_ACTION_START_RAID_FUNCTION Action */
109 109 typedef struct _MPI2_RAID_ACTION_START_RAID_FUNCTION
110 110 {
111 111 U8 RAIDFunction; /* 0x00 */
112 112 U8 Flags; /* 0x01 */
113 113 U16 Reserved1; /* 0x02 */
114 114 } MPI2_RAID_ACTION_START_RAID_FUNCTION,
115 115 MPI2_POINTER PTR_MPI2_RAID_ACTION_START_RAID_FUNCTION,
116 116 Mpi2RaidActionStartRaidFunction_t,
117 117 MPI2_POINTER pMpi2RaidActionStartRaidFunction_t;
118 118
119 119 /* defines for the RAIDFunction field */
120 120 #define MPI2_RAID_ACTION_START_BACKGROUND_INIT (0x00)
121 121 #define MPI2_RAID_ACTION_START_ONLINE_CAP_EXPANSION (0x01)
122 122 #define MPI2_RAID_ACTION_START_CONSISTENCY_CHECK (0x02)
123 123
124 124 /* defines for the Flags field */
125 125 #define MPI2_RAID_ACTION_START_NEW (0x00)
126 126 #define MPI2_RAID_ACTION_START_RESUME (0x01)
127 127
128 128 /* ActionDataWord for MPI2_RAID_ACTION_STOP_RAID_FUNCTION Action */
129 129 typedef struct _MPI2_RAID_ACTION_STOP_RAID_FUNCTION
130 130 {
131 131 U8 RAIDFunction; /* 0x00 */
132 132 U8 Flags; /* 0x01 */
133 133 U16 Reserved1; /* 0x02 */
134 134 } MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
135 135 MPI2_POINTER PTR_MPI2_RAID_ACTION_STOP_RAID_FUNCTION,
136 136 Mpi2RaidActionStopRaidFunction_t,
137 137 MPI2_POINTER pMpi2RaidActionStopRaidFunction_t;
138 138
139 139 /* defines for the RAIDFunction field */
140 140 #define MPI2_RAID_ACTION_STOP_BACKGROUND_INIT (0x00)
141 141 #define MPI2_RAID_ACTION_STOP_ONLINE_CAP_EXPANSION (0x01)
142 142 #define MPI2_RAID_ACTION_STOP_CONSISTENCY_CHECK (0x02)
143 143
144 144 /* defines for the Flags field */
145 145 #define MPI2_RAID_ACTION_STOP_ABORT (0x00)
146 146 #define MPI2_RAID_ACTION_STOP_PAUSE (0x01)
147 147
148 148 /* ActionDataWord for MPI2_RAID_ACTION_CREATE_HOT_SPARE Action */
149 149 typedef struct _MPI2_RAID_ACTION_HOT_SPARE
150 150 {
151 151 U8 HotSparePool; /* 0x00 */
152 152 U8 Reserved1; /* 0x01 */
153 153 U16 DevHandle; /* 0x02 */
154 154 } MPI2_RAID_ACTION_HOT_SPARE, MPI2_POINTER PTR_MPI2_RAID_ACTION_HOT_SPARE,
155 155 Mpi2RaidActionHotSpare_t, MPI2_POINTER pMpi2RaidActionHotSpare_t;
156 156
157 157 /* ActionDataWord for MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE Action */
158 158 typedef struct _MPI2_RAID_ACTION_FW_UPDATE_MODE
159 159 {
160 160 U8 Flags; /* 0x00 */
161 161 U8 DeviceFirmwareUpdateModeTimeout; /* 0x01 */
162 162 U16 Reserved1; /* 0x02 */
163 163 } MPI2_RAID_ACTION_FW_UPDATE_MODE,
164 164 MPI2_POINTER PTR_MPI2_RAID_ACTION_FW_UPDATE_MODE,
165 165 Mpi2RaidActionFwUpdateMode_t, MPI2_POINTER pMpi2RaidActionFwUpdateMode_t;
166 166
167 167 /* ActionDataWord defines for use with MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
168 168 #define MPI2_RAID_ACTION_ADATA_DISABLE_FW_UPDATE (0x00)
169 169 #define MPI2_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x01)
170 170
171 171 typedef union _MPI2_RAID_ACTION_DATA
172 172 {
173 173 U32 Word;
174 174 MPI2_RAID_ACTION_RATE_DATA Rates;
175 175 MPI2_RAID_ACTION_START_RAID_FUNCTION StartRaidFunction;
176 176 MPI2_RAID_ACTION_STOP_RAID_FUNCTION StopRaidFunction;
177 177 MPI2_RAID_ACTION_HOT_SPARE HotSpare;
178 178 MPI2_RAID_ACTION_FW_UPDATE_MODE FwUpdateMode;
179 179 } MPI2_RAID_ACTION_DATA, MPI2_POINTER PTR_MPI2_RAID_ACTION_DATA,
180 180 Mpi2RaidActionData_t, MPI2_POINTER pMpi2RaidActionData_t;
181 181
182 182
183 183 /* RAID Action Request Message */
184 184 typedef struct _MPI2_RAID_ACTION_REQUEST
185 185 {
186 186 U8 Action; /* 0x00 */
187 187 U8 Reserved1; /* 0x01 */
188 188 U8 ChainOffset; /* 0x02 */
189 189 U8 Function; /* 0x03 */
190 190 U16 VolDevHandle; /* 0x04 */
191 191 U8 PhysDiskNum; /* 0x06 */
192 192 U8 MsgFlags; /* 0x07 */
193 193 U8 VP_ID; /* 0x08 */
194 194 U8 VF_ID; /* 0x09 */
195 195 U16 Reserved2; /* 0x0A */
196 196 U32 Reserved3; /* 0x0C */
197 197 MPI2_RAID_ACTION_DATA ActionDataWord; /* 0x10 */
198 198 MPI2_SGE_SIMPLE_UNION ActionDataSGE; /* 0x14 */
199 199 } MPI2_RAID_ACTION_REQUEST, MPI2_POINTER PTR_MPI2_RAID_ACTION_REQUEST,
200 200 Mpi2RaidActionRequest_t, MPI2_POINTER pMpi2RaidActionRequest_t;
201 201
202 202 /* RAID Action request Action values */
203 203
204 204 #define MPI2_RAID_ACTION_INDICATOR_STRUCT (0x01)
205 205 #define MPI2_RAID_ACTION_CREATE_VOLUME (0x02)
206 206 #define MPI2_RAID_ACTION_DELETE_VOLUME (0x03)
207 207 #define MPI2_RAID_ACTION_DISABLE_ALL_VOLUMES (0x04)
208 208 #define MPI2_RAID_ACTION_ENABLE_ALL_VOLUMES (0x05)
209 209 #define MPI2_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
210 210 #define MPI2_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
211 211 #define MPI2_RAID_ACTION_FAIL_PHYSDISK (0x0F)
212 212 #define MPI2_RAID_ACTION_ACTIVATE_VOLUME (0x11)
↓ open down ↓ |
133 lines elided |
↑ open up ↑ |
213 213 #define MPI2_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
214 214 #define MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE (0x17)
215 215 #define MPI2_RAID_ACTION_SET_VOLUME_NAME (0x18)
216 216 #define MPI2_RAID_ACTION_SET_RAID_FUNCTION_RATE (0x19)
217 217 #define MPI2_RAID_ACTION_ENABLE_FAILED_VOLUME (0x1C)
218 218 #define MPI2_RAID_ACTION_CREATE_HOT_SPARE (0x1D)
219 219 #define MPI2_RAID_ACTION_DELETE_HOT_SPARE (0x1E)
220 220 #define MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED (0x20)
221 221 #define MPI2_RAID_ACTION_START_RAID_FUNCTION (0x21)
222 222 #define MPI2_RAID_ACTION_STOP_RAID_FUNCTION (0x22)
223 -
223 +#define MPI2_RAID_ACTION_FAST_PATH_PERMITTED (0x24)
224 224
225 225 /* RAID Volume Creation Structure */
226 226
227 227 /*
228 228 * The following define can be customized for the targeted product.
229 229 */
230 230 #ifndef MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS
231 231 #define MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS (1)
232 232 #endif
233 233
234 234 typedef struct _MPI2_RAID_VOLUME_PHYSDISK
235 235 {
236 236 U8 RAIDSetNum; /* 0x00 */
237 237 U8 PhysDiskMap; /* 0x01 */
238 238 U16 PhysDiskDevHandle; /* 0x02 */
239 239 } MPI2_RAID_VOLUME_PHYSDISK, MPI2_POINTER PTR_MPI2_RAID_VOLUME_PHYSDISK,
240 240 Mpi2RaidVolumePhysDisk_t, MPI2_POINTER pMpi2RaidVolumePhysDisk_t;
241 241
242 242 /* defines for the PhysDiskMap field */
243 243 #define MPI2_RAIDACTION_PHYSDISK_PRIMARY (0x01)
244 244 #define MPI2_RAIDACTION_PHYSDISK_SECONDARY (0x02)
245 245
246 246 typedef struct _MPI2_RAID_VOLUME_CREATION_STRUCT
247 247 {
248 248 U8 NumPhysDisks; /* 0x00 */
249 249 U8 VolumeType; /* 0x01 */
250 250 U16 Reserved1; /* 0x02 */
251 251 U32 VolumeCreationFlags; /* 0x04 */
252 252 U32 VolumeSettings; /* 0x08 */
253 253 U8 Reserved2; /* 0x0C */
254 254 U8 ResyncRate; /* 0x0D */
255 255 U16 DataScrubDuration; /* 0x0E */
256 256 U64 VolumeMaxLBA; /* 0x10 */
257 257 U32 StripeSize; /* 0x18 */
258 258 U8 Name[16]; /* 0x1C */
259 259 MPI2_RAID_VOLUME_PHYSDISK PhysDisk[MPI2_RAID_VOL_CREATION_NUM_PHYSDISKS];/* 0x2C */
260 260 } MPI2_RAID_VOLUME_CREATION_STRUCT,
261 261 MPI2_POINTER PTR_MPI2_RAID_VOLUME_CREATION_STRUCT,
262 262 Mpi2RaidVolumeCreationStruct_t, MPI2_POINTER pMpi2RaidVolumeCreationStruct_t;
263 263
264 264 /* use MPI2_RAID_VOL_TYPE_ defines from mpi2_cnfg.h for VolumeType */
265 265
266 266 /* defines for the VolumeCreationFlags field */
267 267 #define MPI2_RAID_VOL_CREATION_DEFAULT_SETTINGS (0x80000000)
268 268 #define MPI2_RAID_VOL_CREATION_BACKGROUND_INIT (0x00000004)
269 269 #define MPI2_RAID_VOL_CREATION_LOW_LEVEL_INIT (0x00000002)
270 270 #define MPI2_RAID_VOL_CREATION_MIGRATE_DATA (0x00000001)
271 271 /* The following is an obsolete define.
272 272 * It must be shifted left 24 bits in order to set the proper bit.
273 273 */
274 274 #define MPI2_RAID_VOL_CREATION_USE_DEFAULT_SETTINGS (0x80)
275 275
276 276
277 277 /* RAID Online Capacity Expansion Structure */
278 278
279 279 typedef struct _MPI2_RAID_ONLINE_CAPACITY_EXPANSION
280 280 {
281 281 U32 Flags; /* 0x00 */
282 282 U16 DevHandle0; /* 0x04 */
283 283 U16 Reserved1; /* 0x06 */
284 284 U16 DevHandle1; /* 0x08 */
285 285 U16 Reserved2; /* 0x0A */
286 286 } MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
287 287 MPI2_POINTER PTR_MPI2_RAID_ONLINE_CAPACITY_EXPANSION,
288 288 Mpi2RaidOnlineCapacityExpansion_t,
289 289 MPI2_POINTER pMpi2RaidOnlineCapacityExpansion_t;
290 290
291 291
292 292 /* RAID Volume Indicator Structure */
293 293
294 294 typedef struct _MPI2_RAID_VOL_INDICATOR
295 295 {
296 296 U64 TotalBlocks; /* 0x00 */
297 297 U64 BlocksRemaining; /* 0x08 */
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
298 298 U32 Flags; /* 0x10 */
299 299 } MPI2_RAID_VOL_INDICATOR, MPI2_POINTER PTR_MPI2_RAID_VOL_INDICATOR,
300 300 Mpi2RaidVolIndicator_t, MPI2_POINTER pMpi2RaidVolIndicator_t;
301 301
302 302 /* defines for RAID Volume Indicator Flags field */
303 303 #define MPI2_RAID_VOL_FLAGS_OP_MASK (0x0000000F)
304 304 #define MPI2_RAID_VOL_FLAGS_OP_BACKGROUND_INIT (0x00000000)
305 305 #define MPI2_RAID_VOL_FLAGS_OP_ONLINE_CAP_EXPANSION (0x00000001)
306 306 #define MPI2_RAID_VOL_FLAGS_OP_CONSISTENCY_CHECK (0x00000002)
307 307 #define MPI2_RAID_VOL_FLAGS_OP_RESYNC (0x00000003)
308 +#define MPI2_RAID_VOL_FLAGS_OP_MDC (0x00000004)
308 309
309 310
310 311 /* RAID Action Reply ActionData union */
311 312 typedef union _MPI2_RAID_ACTION_REPLY_DATA
312 313 {
313 314 U32 Word[5];
314 315 MPI2_RAID_VOL_INDICATOR RaidVolumeIndicator;
315 316 U16 VolDevHandle;
316 317 U8 VolumeState;
317 318 U8 PhysDiskNum;
318 319 } MPI2_RAID_ACTION_REPLY_DATA, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY_DATA,
319 320 Mpi2RaidActionReplyData_t, MPI2_POINTER pMpi2RaidActionReplyData_t;
320 321
321 322 /* use MPI2_RAIDVOL0_SETTING_ defines from mpi2_cnfg.h for MPI2_RAID_ACTION_CHANGE_VOL_WRITE_CACHE action */
322 323
323 324
324 325 /* RAID Action Reply Message */
325 326 typedef struct _MPI2_RAID_ACTION_REPLY
326 327 {
327 328 U8 Action; /* 0x00 */
328 329 U8 Reserved1; /* 0x01 */
329 330 U8 MsgLength; /* 0x02 */
330 331 U8 Function; /* 0x03 */
331 332 U16 VolDevHandle; /* 0x04 */
332 333 U8 PhysDiskNum; /* 0x06 */
333 334 U8 MsgFlags; /* 0x07 */
334 335 U8 VP_ID; /* 0x08 */
335 336 U8 VF_ID; /* 0x09 */
336 337 U16 Reserved2; /* 0x0A */
337 338 U16 Reserved3; /* 0x0C */
338 339 U16 IOCStatus; /* 0x0E */
339 340 U32 IOCLogInfo; /* 0x10 */
340 341 MPI2_RAID_ACTION_REPLY_DATA ActionData; /* 0x14 */
341 342 } MPI2_RAID_ACTION_REPLY, MPI2_POINTER PTR_MPI2_RAID_ACTION_REPLY,
342 343 Mpi2RaidActionReply_t, MPI2_POINTER pMpi2RaidActionReply_t;
343 344
344 345
345 346 #endif
346 347
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX