Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Moore, Eric Dean | c1a71d1 | 2005-05-11 17:37:38 -0600 | [diff] [blame^] | 2 | * Copyright (c) 2001-2005 LSI Logic Corporation. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
| 4 | * |
| 5 | * Name: mpi_raid.h |
| 6 | * Title: MPI RAID message and structures |
| 7 | * Creation Date: February 27, 2001 |
| 8 | * |
Moore, Eric Dean | c1a71d1 | 2005-05-11 17:37:38 -0600 | [diff] [blame^] | 9 | * mpi_raid.h Version: 01.05.02 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | * |
| 11 | * Version History |
| 12 | * --------------- |
| 13 | * |
| 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. |
Moore, Eric Dean | c1a71d1 | 2005-05-11 17:37:38 -0600 | [diff] [blame^] | 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. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | * -------------------------------------------------------------------------- |
| 36 | */ |
| 37 | |
| 38 | #ifndef MPI_RAID_H |
| 39 | #define MPI_RAID_H |
| 40 | |
| 41 | |
| 42 | /****************************************************************************** |
| 43 | * |
| 44 | * R A I D M e s s a g e s |
| 45 | * |
| 46 | *******************************************************************************/ |
| 47 | |
| 48 | |
| 49 | /****************************************************************************/ |
| 50 | /* RAID Action Request */ |
| 51 | /****************************************************************************/ |
| 52 | |
| 53 | typedef struct _MSG_RAID_ACTION |
| 54 | { |
| 55 | U8 Action; /* 00h */ |
| 56 | U8 Reserved1; /* 01h */ |
| 57 | U8 ChainOffset; /* 02h */ |
| 58 | U8 Function; /* 03h */ |
| 59 | U8 VolumeID; /* 04h */ |
| 60 | U8 VolumeBus; /* 05h */ |
| 61 | U8 PhysDiskNum; /* 06h */ |
| 62 | U8 MsgFlags; /* 07h */ |
| 63 | U32 MsgContext; /* 08h */ |
| 64 | U32 Reserved2; /* 0Ch */ |
| 65 | U32 ActionDataWord; /* 10h */ |
| 66 | SGE_SIMPLE_UNION ActionDataSGE; /* 14h */ |
| 67 | } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST, |
| 68 | MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t; |
| 69 | |
| 70 | |
| 71 | /* RAID Action request Action values */ |
| 72 | |
| 73 | #define MPI_RAID_ACTION_STATUS (0x00) |
| 74 | #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01) |
| 75 | #define MPI_RAID_ACTION_CREATE_VOLUME (0x02) |
| 76 | #define MPI_RAID_ACTION_DELETE_VOLUME (0x03) |
| 77 | #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04) |
| 78 | #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05) |
| 79 | #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06) |
| 80 | #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07) |
| 81 | #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08) |
| 82 | #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A) |
| 83 | #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B) |
| 84 | #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C) |
| 85 | #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D) |
| 86 | #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E) |
| 87 | #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F) |
| 88 | #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10) |
| 89 | #define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11) |
| 90 | #define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12) |
Moore, Eric Dean | c1a71d1 | 2005-05-11 17:37:38 -0600 | [diff] [blame^] | 91 | #define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13) |
| 92 | #define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | |
| 94 | /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ |
| 95 | #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) |
| 96 | #define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002) |
| 97 | |
| 98 | /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */ |
| 99 | #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000) |
| 100 | #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001) |
| 101 | |
| 102 | #define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000) |
| 103 | #define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002) |
| 104 | |
| 105 | /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */ |
| 106 | #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001) |
| 107 | |
Moore, Eric Dean | c1a71d1 | 2005-05-11 17:37:38 -0600 | [diff] [blame^] | 108 | /* ActionDataWord defines for use with MPI_RAID_ACTION_SET_RESYNC_RATE action */ |
| 109 | #define MPI_RAID_ACTION_ADATA_RESYNC_RATE_MASK (0x000000FF) |
| 110 | |
| 111 | /* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */ |
| 112 | #define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF) |
| 113 | |
| 114 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
| 116 | /* RAID Action reply message */ |
| 117 | |
| 118 | typedef struct _MSG_RAID_ACTION_REPLY |
| 119 | { |
| 120 | U8 Action; /* 00h */ |
| 121 | U8 Reserved; /* 01h */ |
| 122 | U8 MsgLength; /* 02h */ |
| 123 | U8 Function; /* 03h */ |
| 124 | U8 VolumeID; /* 04h */ |
| 125 | U8 VolumeBus; /* 05h */ |
| 126 | U8 PhysDiskNum; /* 06h */ |
| 127 | U8 MsgFlags; /* 07h */ |
| 128 | U32 MsgContext; /* 08h */ |
| 129 | U16 ActionStatus; /* 0Ch */ |
| 130 | U16 IOCStatus; /* 0Eh */ |
| 131 | U32 IOCLogInfo; /* 10h */ |
| 132 | U32 VolumeStatus; /* 14h */ |
| 133 | U32 ActionData; /* 18h */ |
| 134 | } MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY, |
| 135 | MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t; |
| 136 | |
| 137 | |
| 138 | /* RAID Volume reply ActionStatus values */ |
| 139 | |
| 140 | #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000) |
| 141 | #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001) |
| 142 | #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002) |
| 143 | #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003) |
| 144 | |
| 145 | |
| 146 | /* RAID Volume reply RAID Volume Indicator structure */ |
| 147 | |
| 148 | typedef struct _MPI_RAID_VOL_INDICATOR |
| 149 | { |
| 150 | U64 TotalBlocks; /* 00h */ |
| 151 | U64 BlocksRemaining; /* 08h */ |
| 152 | } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR, |
| 153 | MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t; |
| 154 | |
| 155 | |
| 156 | /****************************************************************************/ |
| 157 | /* SCSI IO RAID Passthrough Request */ |
| 158 | /****************************************************************************/ |
| 159 | |
| 160 | typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST |
| 161 | { |
| 162 | U8 PhysDiskNum; /* 00h */ |
| 163 | U8 Reserved1; /* 01h */ |
| 164 | U8 ChainOffset; /* 02h */ |
| 165 | U8 Function; /* 03h */ |
| 166 | U8 CDBLength; /* 04h */ |
| 167 | U8 SenseBufferLength; /* 05h */ |
| 168 | U8 Reserved2; /* 06h */ |
| 169 | U8 MsgFlags; /* 07h */ |
| 170 | U32 MsgContext; /* 08h */ |
| 171 | U8 LUN[8]; /* 0Ch */ |
| 172 | U32 Control; /* 14h */ |
| 173 | U8 CDB[16]; /* 18h */ |
| 174 | U32 DataLength; /* 28h */ |
| 175 | U32 SenseBufferLowAddr; /* 2Ch */ |
| 176 | SGE_IO_UNION SGL; /* 30h */ |
| 177 | } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST, |
| 178 | SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t; |
| 179 | |
| 180 | |
| 181 | /* SCSI IO RAID Passthrough reply structure */ |
| 182 | |
| 183 | typedef struct _MSG_SCSI_IO_RAID_PT_REPLY |
| 184 | { |
| 185 | U8 PhysDiskNum; /* 00h */ |
| 186 | U8 Reserved1; /* 01h */ |
| 187 | U8 MsgLength; /* 02h */ |
| 188 | U8 Function; /* 03h */ |
| 189 | U8 CDBLength; /* 04h */ |
| 190 | U8 SenseBufferLength; /* 05h */ |
| 191 | U8 Reserved2; /* 06h */ |
| 192 | U8 MsgFlags; /* 07h */ |
| 193 | U32 MsgContext; /* 08h */ |
| 194 | U8 SCSIStatus; /* 0Ch */ |
| 195 | U8 SCSIState; /* 0Dh */ |
| 196 | U16 IOCStatus; /* 0Eh */ |
| 197 | U32 IOCLogInfo; /* 10h */ |
| 198 | U32 TransferCount; /* 14h */ |
| 199 | U32 SenseCount; /* 18h */ |
| 200 | U32 ResponseInfo; /* 1Ch */ |
| 201 | } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY, |
| 202 | SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t; |
| 203 | |
| 204 | |
| 205 | /****************************************************************************/ |
| 206 | /* Mailbox reqeust structure */ |
| 207 | /****************************************************************************/ |
| 208 | |
| 209 | typedef struct _MSG_MAILBOX_REQUEST |
| 210 | { |
| 211 | U16 Reserved1; |
| 212 | U8 ChainOffset; |
| 213 | U8 Function; |
| 214 | U16 Reserved2; |
| 215 | U8 Reserved3; |
| 216 | U8 MsgFlags; |
| 217 | U32 MsgContext; |
| 218 | U8 Command[10]; |
| 219 | U16 Reserved4; |
| 220 | SGE_IO_UNION SGL; |
| 221 | } MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST, |
| 222 | MailboxRequest_t, MPI_POINTER pMailboxRequest_t; |
| 223 | |
| 224 | |
| 225 | /* Mailbox reply structure */ |
| 226 | typedef struct _MSG_MAILBOX_REPLY |
| 227 | { |
| 228 | U16 Reserved1; /* 00h */ |
| 229 | U8 MsgLength; /* 02h */ |
| 230 | U8 Function; /* 03h */ |
| 231 | U16 Reserved2; /* 04h */ |
| 232 | U8 Reserved3; /* 06h */ |
| 233 | U8 MsgFlags; /* 07h */ |
| 234 | U32 MsgContext; /* 08h */ |
| 235 | U16 MailboxStatus; /* 0Ch */ |
| 236 | U16 IOCStatus; /* 0Eh */ |
| 237 | U32 IOCLogInfo; /* 10h */ |
| 238 | U32 Reserved4; /* 14h */ |
| 239 | } MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY, |
| 240 | MailboxReply_t, MPI_POINTER pMailboxReply_t; |
| 241 | |
| 242 | #endif |
| 243 | |
| 244 | |
| 245 | |