mpi_raid.h 12 KB

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