1 /* $FreeBSD$ */ 2 /* 3 * Copyright (c) 2001 LSI Logic Corporation. 4 * 5 * 6 * Name: MPI_RAID.H 7 * Title: MPI RAID message and structures 8 * Creation Date: February 27, 2001 9 * 10 * MPI Version: 01.02.04 11 * 12 * Version History 13 * --------------- 14 * 15 * Date Version Description 16 * -------- -------- ------------------------------------------------------ 17 * 02-27-01 01.01.01 Original release for this file. 18 * 03-27-01 01.01.02 Added structure offset comments. 19 * 08-08-01 01.02.01 Original release for v1.2 work. 20 * 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes. 21 * 10-04-01 01.02.03 Added ActionData defines for 22 * MPI_RAID_ACTION_DELETE_VOLUME action. 23 * 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC. 24 * -------------------------------------------------------------------------- 25 */ 26 27 #ifndef MPI_RAID_H 28 #define MPI_RAID_H 29 30 31 /****************************************************************************** 32 * 33 * R A I D M e s s a g e s 34 * 35 *******************************************************************************/ 36 37 38 /****************************************************************************/ 39 /* RAID Volume Request */ 40 /****************************************************************************/ 41 42 typedef struct _MSG_RAID_ACTION 43 { 44 U8 Action; /* 00h */ 45 U8 Reserved1; /* 01h */ 46 U8 ChainOffset; /* 02h */ 47 U8 Function; /* 03h */ 48 U8 VolumeID; /* 04h */ 49 U8 VolumeBus; /* 05h */ 50 U8 PhysDiskNum; /* 06h */ 51 U8 MsgFlags; /* 07h */ 52 U32 MsgContext; /* 08h */ 53 U32 Reserved2; /* 0Ch */ 54 U32 ActionDataWord; /* 10h */ 55 SGE_SIMPLE_UNION ActionDataSGE; /* 14h */ 56 } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST, 57 MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t; 58 59 60 /* RAID Action request Action values */ 61 62 #define MPI_RAID_ACTION_STATUS (0x00) 63 #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01) 64 #define MPI_RAID_ACTION_CREATE_VOLUME (0x02) 65 #define MPI_RAID_ACTION_DELETE_VOLUME (0x03) 66 #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04) 67 #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05) 68 #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06) 69 #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07) 70 #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08) 71 #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A) 72 #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B) 73 #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C) 74 #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D) 75 #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E) 76 #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F) 77 #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10) 78 79 /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ 80 #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) 81 82 /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */ 83 #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000) 84 #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001) 85 86 87 /* RAID Action reply message */ 88 89 typedef struct _MSG_RAID_ACTION_REPLY 90 { 91 U8 Action; /* 00h */ 92 U8 Reserved; /* 01h */ 93 U8 MsgLength; /* 02h */ 94 U8 Function; /* 03h */ 95 U8 VolumeID; /* 04h */ 96 U8 VolumeBus; /* 05h */ 97 U8 PhysDiskNum; /* 06h */ 98 U8 MsgFlags; /* 07h */ 99 U32 MsgContext; /* 08h */ 100 U16 ActionStatus; /* 0Ch */ 101 U16 IOCStatus; /* 0Eh */ 102 U32 IOCLogInfo; /* 10h */ 103 U32 VolumeStatus; /* 14h */ 104 U32 ActionData; /* 18h */ 105 } MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY, 106 MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t; 107 108 109 /* RAID Volume reply ActionStatus values */ 110 111 #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000) 112 #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001) 113 #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002) 114 #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003) 115 116 117 /* RAID Volume reply RAID Volume Indicator structure */ 118 119 typedef struct _MPI_RAID_VOL_INDICATOR 120 { 121 U64 TotalBlocks; /* 00h */ 122 U64 BlocksRemaining; /* 08h */ 123 } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR, 124 MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t; 125 126 127 /****************************************************************************/ 128 /* SCSI IO RAID Passthrough Request */ 129 /****************************************************************************/ 130 131 typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST 132 { 133 U8 PhysDiskNum; /* 00h */ 134 U8 Reserved1; /* 01h */ 135 U8 ChainOffset; /* 02h */ 136 U8 Function; /* 03h */ 137 U8 CDBLength; /* 04h */ 138 U8 SenseBufferLength; /* 05h */ 139 U8 Reserved2; /* 06h */ 140 U8 MsgFlags; /* 07h */ 141 U32 MsgContext; /* 08h */ 142 U8 LUN[8]; /* 0Ch */ 143 U32 Control; /* 14h */ 144 U8 CDB[16]; /* 18h */ 145 U32 DataLength; /* 28h */ 146 U32 SenseBufferLowAddr; /* 2Ch */ 147 SGE_IO_UNION SGL; /* 30h */ 148 } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST, 149 SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t; 150 151 152 /* SCSI IO RAID Passthrough reply structure */ 153 154 typedef struct _MSG_SCSI_IO_RAID_PT_REPLY 155 { 156 U8 PhysDiskNum; /* 00h */ 157 U8 Reserved1; /* 01h */ 158 U8 MsgLength; /* 02h */ 159 U8 Function; /* 03h */ 160 U8 CDBLength; /* 04h */ 161 U8 SenseBufferLength; /* 05h */ 162 U8 Reserved2; /* 06h */ 163 U8 MsgFlags; /* 07h */ 164 U32 MsgContext; /* 08h */ 165 U8 SCSIStatus; /* 0Ch */ 166 U8 SCSIState; /* 0Dh */ 167 U16 IOCStatus; /* 0Eh */ 168 U32 IOCLogInfo; /* 10h */ 169 U32 TransferCount; /* 14h */ 170 U32 SenseCount; /* 18h */ 171 U32 ResponseInfo; /* 1Ch */ 172 } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY, 173 SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t; 174 175 176 #endif 177 178 179 180