mpi_raid.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * Copyright (c) 2001-2003 LSI Logic 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.xx
  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. * --------------------------------------------------------------------------
  32. */
  33. #ifndef MPI_RAID_H
  34. #define MPI_RAID_H
  35. /******************************************************************************
  36. *
  37. * R A I D M e s s a g e s
  38. *
  39. *******************************************************************************/
  40. /****************************************************************************/
  41. /* RAID Action Request */
  42. /****************************************************************************/
  43. typedef struct _MSG_RAID_ACTION
  44. {
  45. U8 Action; /* 00h */
  46. U8 Reserved1; /* 01h */
  47. U8 ChainOffset; /* 02h */
  48. U8 Function; /* 03h */
  49. U8 VolumeID; /* 04h */
  50. U8 VolumeBus; /* 05h */
  51. U8 PhysDiskNum; /* 06h */
  52. U8 MsgFlags; /* 07h */
  53. U32 MsgContext; /* 08h */
  54. U32 Reserved2; /* 0Ch */
  55. U32 ActionDataWord; /* 10h */
  56. SGE_SIMPLE_UNION ActionDataSGE; /* 14h */
  57. } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST,
  58. MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t;
  59. /* RAID Action request Action values */
  60. #define MPI_RAID_ACTION_STATUS (0x00)
  61. #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01)
  62. #define MPI_RAID_ACTION_CREATE_VOLUME (0x02)
  63. #define MPI_RAID_ACTION_DELETE_VOLUME (0x03)
  64. #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04)
  65. #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05)
  66. #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06)
  67. #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07)
  68. #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08)
  69. #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
  70. #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
  71. #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C)
  72. #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D)
  73. #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)
  74. #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)
  75. #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)
  76. #define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11)
  77. #define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
  78. /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
  79. #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
  80. #define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002)
  81. /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */
  82. #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000)
  83. #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001)
  84. #define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
  85. #define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002)
  86. /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
  87. #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
  88. /* RAID Action reply message */
  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. /* RAID Volume reply ActionStatus values */
  108. #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000)
  109. #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001)
  110. #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002)
  111. #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003)
  112. /* RAID Volume reply RAID Volume Indicator structure */
  113. typedef struct _MPI_RAID_VOL_INDICATOR
  114. {
  115. U64 TotalBlocks; /* 00h */
  116. U64 BlocksRemaining; /* 08h */
  117. } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR,
  118. MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t;
  119. /****************************************************************************/
  120. /* SCSI IO RAID Passthrough Request */
  121. /****************************************************************************/
  122. typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST
  123. {
  124. U8 PhysDiskNum; /* 00h */
  125. U8 Reserved1; /* 01h */
  126. U8 ChainOffset; /* 02h */
  127. U8 Function; /* 03h */
  128. U8 CDBLength; /* 04h */
  129. U8 SenseBufferLength; /* 05h */
  130. U8 Reserved2; /* 06h */
  131. U8 MsgFlags; /* 07h */
  132. U32 MsgContext; /* 08h */
  133. U8 LUN[8]; /* 0Ch */
  134. U32 Control; /* 14h */
  135. U8 CDB[16]; /* 18h */
  136. U32 DataLength; /* 28h */
  137. U32 SenseBufferLowAddr; /* 2Ch */
  138. SGE_IO_UNION SGL; /* 30h */
  139. } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST,
  140. SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t;
  141. /* SCSI IO RAID Passthrough reply structure */
  142. typedef struct _MSG_SCSI_IO_RAID_PT_REPLY
  143. {
  144. U8 PhysDiskNum; /* 00h */
  145. U8 Reserved1; /* 01h */
  146. U8 MsgLength; /* 02h */
  147. U8 Function; /* 03h */
  148. U8 CDBLength; /* 04h */
  149. U8 SenseBufferLength; /* 05h */
  150. U8 Reserved2; /* 06h */
  151. U8 MsgFlags; /* 07h */
  152. U32 MsgContext; /* 08h */
  153. U8 SCSIStatus; /* 0Ch */
  154. U8 SCSIState; /* 0Dh */
  155. U16 IOCStatus; /* 0Eh */
  156. U32 IOCLogInfo; /* 10h */
  157. U32 TransferCount; /* 14h */
  158. U32 SenseCount; /* 18h */
  159. U32 ResponseInfo; /* 1Ch */
  160. } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY,
  161. SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;
  162. /****************************************************************************/
  163. /* Mailbox reqeust structure */
  164. /****************************************************************************/
  165. typedef struct _MSG_MAILBOX_REQUEST
  166. {
  167. U16 Reserved1;
  168. U8 ChainOffset;
  169. U8 Function;
  170. U16 Reserved2;
  171. U8 Reserved3;
  172. U8 MsgFlags;
  173. U32 MsgContext;
  174. U8 Command[10];
  175. U16 Reserved4;
  176. SGE_IO_UNION SGL;
  177. } MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST,
  178. MailboxRequest_t, MPI_POINTER pMailboxRequest_t;
  179. /* Mailbox reply structure */
  180. typedef struct _MSG_MAILBOX_REPLY
  181. {
  182. U16 Reserved1; /* 00h */
  183. U8 MsgLength; /* 02h */
  184. U8 Function; /* 03h */
  185. U16 Reserved2; /* 04h */
  186. U8 Reserved3; /* 06h */
  187. U8 MsgFlags; /* 07h */
  188. U32 MsgContext; /* 08h */
  189. U16 MailboxStatus; /* 0Ch */
  190. U16 IOCStatus; /* 0Eh */
  191. U32 IOCLogInfo; /* 10h */
  192. U32 Reserved4; /* 14h */
  193. } MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY,
  194. MailboxReply_t, MPI_POINTER pMailboxReply_t;
  195. #endif