2 * Copyright (c) 2001-2007 LSI Corporation.
6 * Title: MPI RAID message and structures
7 * Creation Date: February 27, 2001
9 * mpi_raid.h Version: 01.05.03
14 * Date Version Description
15 * -------- -------- ------------------------------------------------------
16 * 02-27-01 01.01.01 Original release for this file.
17 * 03-27-01 01.01.02 Added structure offset comments.
18 * 08-08-01 01.02.01 Original release for v1.2 work.
19 * 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes.
20 * 10-04-01 01.02.03 Added ActionData defines for
21 * MPI_RAID_ACTION_DELETE_VOLUME action.
22 * 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC.
23 * 03-14-02 01.02.05 Added define for MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT.
24 * 05-07-02 01.02.06 Added define for MPI_RAID_ACTION_ACTIVATE_VOLUME,
25 * MPI_RAID_ACTION_INACTIVATE_VOLUME, and
26 * MPI_RAID_ACTION_ADATA_INACTIVATE_ALL.
27 * 07-12-02 01.02.07 Added structures for Mailbox request and reply.
28 * 11-15-02 01.02.08 Added missing MsgContext field to MSG_MAILBOX_REQUEST.
29 * 04-01-03 01.02.09 New action data option flag for
30 * MPI_RAID_ACTION_DELETE_VOLUME.
31 * 05-11-04 01.03.01 Original release for MPI v1.3.
32 * 08-19-04 01.05.01 Original release for MPI v1.5.
33 * 01-15-05 01.05.02 Added defines for the two new RAID Actions for
34 * _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
35 * 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
37 * --------------------------------------------------------------------------
44 /******************************************************************************
46 * R A I D M e s s a g e s
48 *******************************************************************************/
51 /****************************************************************************/
52 /* RAID Action Request */
53 /****************************************************************************/
55 typedef struct _MSG_RAID_ACTION
58 U8 Reserved1; /* 01h */
59 U8 ChainOffset; /* 02h */
60 U8 Function; /* 03h */
61 U8 VolumeID; /* 04h */
62 U8 VolumeBus; /* 05h */
63 U8 PhysDiskNum; /* 06h */
64 U8 MsgFlags; /* 07h */
65 U32 MsgContext; /* 08h */
66 U32 Reserved2; /* 0Ch */
67 U32 ActionDataWord; /* 10h */
68 SGE_SIMPLE_UNION ActionDataSGE; /* 14h */
69 } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST,
70 MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t;
73 /* RAID Action request Action values */
75 #define MPI_RAID_ACTION_STATUS (0x00)
76 #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01)
77 #define MPI_RAID_ACTION_CREATE_VOLUME (0x02)
78 #define MPI_RAID_ACTION_DELETE_VOLUME (0x03)
79 #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04)
80 #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05)
81 #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06)
82 #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07)
83 #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08)
84 #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
85 #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
86 #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C)
87 #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D)
88 #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)
89 #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)
90 #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)
91 #define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11)
92 #define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
93 #define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)
94 #define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)
95 #define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
97 /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
98 #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
99 #define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002)
101 /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */
102 #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000)
103 #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001)
105 #define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
106 #define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002)
108 /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
109 #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
111 /* ActionDataWord defines for use with MPI_RAID_ACTION_SET_RESYNC_RATE action */
112 #define MPI_RAID_ACTION_ADATA_RESYNC_RATE_MASK (0x000000FF)
114 /* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */
115 #define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF)
117 /* ActionDataWord defines for use with MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
118 #define MPI_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x00000001)
119 #define MPI_RAID_ACTION_ADATA_MASK_FW_UPDATE_TIMEOUT (0x0000FF00)
120 #define MPI_RAID_ACTION_ADATA_SHIFT_FW_UPDATE_TIMEOUT (8)
123 /* RAID Action reply message */
125 typedef struct _MSG_RAID_ACTION_REPLY
128 U8 Reserved; /* 01h */
129 U8 MsgLength; /* 02h */
130 U8 Function; /* 03h */
131 U8 VolumeID; /* 04h */
132 U8 VolumeBus; /* 05h */
133 U8 PhysDiskNum; /* 06h */
134 U8 MsgFlags; /* 07h */
135 U32 MsgContext; /* 08h */
136 U16 ActionStatus; /* 0Ch */
137 U16 IOCStatus; /* 0Eh */
138 U32 IOCLogInfo; /* 10h */
139 U32 VolumeStatus; /* 14h */
140 U32 ActionData; /* 18h */
141 } MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY,
142 MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t;
145 /* RAID Volume reply ActionStatus values */
147 #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000)
148 #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001)
149 #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002)
150 #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003)
153 /* RAID Volume reply RAID Volume Indicator structure */
155 typedef struct _MPI_RAID_VOL_INDICATOR
157 U64 TotalBlocks; /* 00h */
158 U64 BlocksRemaining; /* 08h */
159 } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR,
160 MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t;
163 /****************************************************************************/
164 /* SCSI IO RAID Passthrough Request */
165 /****************************************************************************/
167 typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST
169 U8 PhysDiskNum; /* 00h */
170 U8 Reserved1; /* 01h */
171 U8 ChainOffset; /* 02h */
172 U8 Function; /* 03h */
173 U8 CDBLength; /* 04h */
174 U8 SenseBufferLength; /* 05h */
175 U8 Reserved2; /* 06h */
176 U8 MsgFlags; /* 07h */
177 U32 MsgContext; /* 08h */
179 U32 Control; /* 14h */
180 U8 CDB[16]; /* 18h */
181 U32 DataLength; /* 28h */
182 U32 SenseBufferLowAddr; /* 2Ch */
183 SGE_IO_UNION SGL; /* 30h */
184 } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST,
185 SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t;
188 /* SCSI IO RAID Passthrough reply structure */
190 typedef struct _MSG_SCSI_IO_RAID_PT_REPLY
192 U8 PhysDiskNum; /* 00h */
193 U8 Reserved1; /* 01h */
194 U8 MsgLength; /* 02h */
195 U8 Function; /* 03h */
196 U8 CDBLength; /* 04h */
197 U8 SenseBufferLength; /* 05h */
198 U8 Reserved2; /* 06h */
199 U8 MsgFlags; /* 07h */
200 U32 MsgContext; /* 08h */
201 U8 SCSIStatus; /* 0Ch */
202 U8 SCSIState; /* 0Dh */
203 U16 IOCStatus; /* 0Eh */
204 U32 IOCLogInfo; /* 10h */
205 U32 TransferCount; /* 14h */
206 U32 SenseCount; /* 18h */
207 U32 ResponseInfo; /* 1Ch */
208 } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY,
209 SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;
212 /****************************************************************************/
213 /* Mailbox reqeust structure */
214 /****************************************************************************/
216 typedef struct _MSG_MAILBOX_REQUEST
228 } MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST,
229 MailboxRequest_t, MPI_POINTER pMailboxRequest_t;
232 /* Mailbox reply structure */
233 typedef struct _MSG_MAILBOX_REPLY
235 U16 Reserved1; /* 00h */
236 U8 MsgLength; /* 02h */
237 U8 Function; /* 03h */
238 U16 Reserved2; /* 04h */
239 U8 Reserved3; /* 06h */
240 U8 MsgFlags; /* 07h */
241 U32 MsgContext; /* 08h */
242 U16 MailboxStatus; /* 0Ch */
243 U16 IOCStatus; /* 0Eh */
244 U32 IOCLogInfo; /* 10h */
245 U32 Reserved4; /* 14h */
246 } MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY,
247 MailboxReply_t, MPI_POINTER pMailboxReply_t;