mpi_init.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. /*
  2. * Copyright (c) 2000-2008 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi_init.h
  6. * Title: MPI initiator mode messages and structures
  7. * Creation Date: June 8, 2000
  8. *
  9. * mpi_init.h Version: 01.05.09
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
  17. * 05-24-00 00.10.02 Added SenseBufferLength to _MSG_SCSI_IO_REPLY.
  18. * 06-06-00 01.00.01 Update version number for 1.0 release.
  19. * 06-08-00 01.00.02 Added MPI_SCSI_RSP_INFO_ definitions.
  20. * 11-02-00 01.01.01 Original release for post 1.0 work.
  21. * 12-04-00 01.01.02 Added MPI_SCSIIO_CONTROL_NO_DISCONNECT.
  22. * 02-20-01 01.01.03 Started using MPI_POINTER.
  23. * 03-27-01 01.01.04 Added structure offset comments.
  24. * 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT.
  25. * 08-08-01 01.02.01 Original release for v1.2 work.
  26. * 08-29-01 01.02.02 Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET.
  27. * Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for
  28. * MSG_SCSI_IO_REPLY.
  29. * 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure
  30. * Processor messages.
  31. * 10-04-01 01.02.04 Added defines for SEP request Action field.
  32. * 05-31-02 01.02.05 Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define
  33. * for SCSI IO requests.
  34. * 11-15-02 01.02.06 Added special extended SCSI Status defines for FCP.
  35. * 06-26-03 01.02.07 Added MPI_SCSI_STATUS_FCPEXT_UNASSIGNED define.
  36. * 05-11-04 01.03.01 Original release for MPI v1.3.
  37. * 08-19-04 01.05.01 Added MsgFlags defines for EEDP to SCSI IO request.
  38. * Added new word to MSG_SCSI_IO_REPLY to add TaskTag field
  39. * and a reserved U16.
  40. * Added new MSG_SCSI_IO32_REQUEST structure.
  41. * Added a TaskType of Clear Task Set to SCSI
  42. * Task Management request.
  43. * 12-07-04 01.05.02 Added support for Task Management Query Task.
  44. * 01-15-05 01.05.03 Modified SCSI Enclosure Processor Request to support
  45. * WWID addressing.
  46. * 03-11-05 01.05.04 Removed EEDP flags from SCSI IO Request.
  47. * Removed SCSI IO 32 Request.
  48. * Modified SCSI Enclosure Processor Request and Reply to
  49. * support Enclosure/Slot addressing rather than WWID
  50. * addressing.
  51. * 06-24-05 01.05.05 Added SCSI IO 32 structures and defines.
  52. * Added four new defines for SEP SlotStatus.
  53. * 08-03-05 01.05.06 Fixed some MPI_SCSIIO32_MSGFLGS_ defines to make them
  54. * unique in the first 32 characters.
  55. * 03-27-06 01.05.07 Added Task Management type of Clear ACA.
  56. * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA.
  57. * 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management
  58. * Request: Do Not Send Task IU and Soft Reset Option.
  59. * --------------------------------------------------------------------------
  60. */
  61. #ifndef MPI_INIT_H
  62. #define MPI_INIT_H
  63. /*****************************************************************************
  64. *
  65. * S C S I I n i t i a t o r M e s s a g e s
  66. *
  67. *****************************************************************************/
  68. /****************************************************************************/
  69. /* SCSI IO messages and associated structures */
  70. /****************************************************************************/
  71. typedef struct _MSG_SCSI_IO_REQUEST
  72. {
  73. U8 TargetID; /* 00h */
  74. U8 Bus; /* 01h */
  75. U8 ChainOffset; /* 02h */
  76. U8 Function; /* 03h */
  77. U8 CDBLength; /* 04h */
  78. U8 SenseBufferLength; /* 05h */
  79. U8 Reserved; /* 06h */
  80. U8 MsgFlags; /* 07h */
  81. U32 MsgContext; /* 08h */
  82. U8 LUN[8]; /* 0Ch */
  83. U32 Control; /* 14h */
  84. U8 CDB[16]; /* 18h */
  85. U32 DataLength; /* 28h */
  86. U32 SenseBufferLowAddr; /* 2Ch */
  87. SGE_IO_UNION SGL; /* 30h */
  88. } MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST,
  89. SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t;
  90. /* SCSI IO MsgFlags bits */
  91. #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01)
  92. #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00)
  93. #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 (0x01)
  94. #define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02)
  95. #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00)
  96. #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02)
  97. #define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04)
  98. /* SCSI IO LUN fields */
  99. #define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF)
  100. #define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000)
  101. #define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF)
  102. #define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000)
  103. #define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00)
  104. #define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00)
  105. /* SCSI IO Control bits */
  106. #define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000)
  107. #define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000)
  108. #define MPI_SCSIIO_CONTROL_WRITE (0x01000000)
  109. #define MPI_SCSIIO_CONTROL_READ (0x02000000)
  110. #define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK (0x3C000000)
  111. #define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT (26)
  112. #define MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK (0x00000700)
  113. #define MPI_SCSIIO_CONTROL_SIMPLEQ (0x00000000)
  114. #define MPI_SCSIIO_CONTROL_HEADOFQ (0x00000100)
  115. #define MPI_SCSIIO_CONTROL_ORDEREDQ (0x00000200)
  116. #define MPI_SCSIIO_CONTROL_ACAQ (0x00000400)
  117. #define MPI_SCSIIO_CONTROL_UNTAGGED (0x00000500)
  118. #define MPI_SCSIIO_CONTROL_NO_DISCONNECT (0x00000700)
  119. #define MPI_SCSIIO_CONTROL_TASKMANAGE_MASK (0x00FF0000)
  120. #define MPI_SCSIIO_CONTROL_OBSOLETE (0x00800000)
  121. #define MPI_SCSIIO_CONTROL_CLEAR_ACA_RSV (0x00400000)
  122. #define MPI_SCSIIO_CONTROL_TARGET_RESET (0x00200000)
  123. #define MPI_SCSIIO_CONTROL_LUN_RESET_RSV (0x00100000)
  124. #define MPI_SCSIIO_CONTROL_RESERVED (0x00080000)
  125. #define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV (0x00040000)
  126. #define MPI_SCSIIO_CONTROL_ABORT_TASK_SET (0x00020000)
  127. #define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000)
  128. /* SCSI IO reply structure */
  129. typedef struct _MSG_SCSI_IO_REPLY
  130. {
  131. U8 TargetID; /* 00h */
  132. U8 Bus; /* 01h */
  133. U8 MsgLength; /* 02h */
  134. U8 Function; /* 03h */
  135. U8 CDBLength; /* 04h */
  136. U8 SenseBufferLength; /* 05h */
  137. U8 Reserved; /* 06h */
  138. U8 MsgFlags; /* 07h */
  139. U32 MsgContext; /* 08h */
  140. U8 SCSIStatus; /* 0Ch */
  141. U8 SCSIState; /* 0Dh */
  142. U16 IOCStatus; /* 0Eh */
  143. U32 IOCLogInfo; /* 10h */
  144. U32 TransferCount; /* 14h */
  145. U32 SenseCount; /* 18h */
  146. U32 ResponseInfo; /* 1Ch */
  147. U16 TaskTag; /* 20h */
  148. U16 Reserved1; /* 22h */
  149. } MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY,
  150. SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t;
  151. /* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */
  152. #define MPI_SCSI_STATUS_SUCCESS (0x00)
  153. #define MPI_SCSI_STATUS_CHECK_CONDITION (0x02)
  154. #define MPI_SCSI_STATUS_CONDITION_MET (0x04)
  155. #define MPI_SCSI_STATUS_BUSY (0x08)
  156. #define MPI_SCSI_STATUS_INTERMEDIATE (0x10)
  157. #define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET (0x14)
  158. #define MPI_SCSI_STATUS_RESERVATION_CONFLICT (0x18)
  159. #define MPI_SCSI_STATUS_COMMAND_TERMINATED (0x22)
  160. #define MPI_SCSI_STATUS_TASK_SET_FULL (0x28)
  161. #define MPI_SCSI_STATUS_ACA_ACTIVE (0x30)
  162. #define MPI_SCSI_STATUS_FCPEXT_DEVICE_LOGGED_OUT (0x80)
  163. #define MPI_SCSI_STATUS_FCPEXT_NO_LINK (0x81)
  164. #define MPI_SCSI_STATUS_FCPEXT_UNASSIGNED (0x82)
  165. /* SCSI IO Reply SCSIState values */
  166. #define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01)
  167. #define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02)
  168. #define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04)
  169. #define MPI_SCSI_STATE_TERMINATED (0x08)
  170. #define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10)
  171. #define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20)
  172. /* SCSI IO Reply ResponseInfo values */
  173. /* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */
  174. #define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000)
  175. #define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR (0x01000000)
  176. #define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID (0x02000000)
  177. #define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR (0x03000000)
  178. #define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000)
  179. #define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED (0x05000000)
  180. #define MPI_SCSI_RSP_INFO_SPI_LQ_INVALID_TYPE (0x06000000)
  181. #define MPI_SCSI_TASKTAG_UNKNOWN (0xFFFF)
  182. /****************************************************************************/
  183. /* SCSI IO 32 messages and associated structures */
  184. /****************************************************************************/
  185. typedef struct
  186. {
  187. U8 CDB[20]; /* 00h */
  188. U32 PrimaryReferenceTag; /* 14h */
  189. U16 PrimaryApplicationTag; /* 18h */
  190. U16 PrimaryApplicationTagMask; /* 1Ah */
  191. U32 TransferLength; /* 1Ch */
  192. } MPI_SCSI_IO32_CDB_EEDP32, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP32,
  193. MpiScsiIo32CdbEedp32_t, MPI_POINTER pMpiScsiIo32CdbEedp32_t;
  194. typedef struct
  195. {
  196. U8 CDB[16]; /* 00h */
  197. U32 DataLength; /* 10h */
  198. U32 PrimaryReferenceTag; /* 14h */
  199. U16 PrimaryApplicationTag; /* 18h */
  200. U16 PrimaryApplicationTagMask; /* 1Ah */
  201. U32 TransferLength; /* 1Ch */
  202. } MPI_SCSI_IO32_CDB_EEDP16, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP16,
  203. MpiScsiIo32CdbEedp16_t, MPI_POINTER pMpiScsiIo32CdbEedp16_t;
  204. typedef union
  205. {
  206. U8 CDB32[32];
  207. MPI_SCSI_IO32_CDB_EEDP32 EEDP32;
  208. MPI_SCSI_IO32_CDB_EEDP16 EEDP16;
  209. SGE_SIMPLE_UNION SGE;
  210. } MPI_SCSI_IO32_CDB_UNION, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_UNION,
  211. MpiScsiIo32Cdb_t, MPI_POINTER pMpiScsiIo32Cdb_t;
  212. typedef struct
  213. {
  214. U8 TargetID; /* 00h */
  215. U8 Bus; /* 01h */
  216. U16 Reserved1; /* 02h */
  217. U32 Reserved2; /* 04h */
  218. } MPI_SCSI_IO32_BUS_TARGET_ID_FORM, MPI_POINTER PTR_MPI_SCSI_IO32_BUS_TARGET_ID_FORM,
  219. MpiScsiIo32BusTargetIdForm_t, MPI_POINTER pMpiScsiIo32BusTargetIdForm_t;
  220. typedef union
  221. {
  222. MPI_SCSI_IO32_BUS_TARGET_ID_FORM SCSIID;
  223. U64 WWID;
  224. } MPI_SCSI_IO32_ADDRESS, MPI_POINTER PTR_MPI_SCSI_IO32_ADDRESS,
  225. MpiScsiIo32Address_t, MPI_POINTER pMpiScsiIo32Address_t;
  226. typedef struct _MSG_SCSI_IO32_REQUEST
  227. {
  228. U8 Port; /* 00h */
  229. U8 Reserved1; /* 01h */
  230. U8 ChainOffset; /* 02h */
  231. U8 Function; /* 03h */
  232. U8 CDBLength; /* 04h */
  233. U8 SenseBufferLength; /* 05h */
  234. U8 Flags; /* 06h */
  235. U8 MsgFlags; /* 07h */
  236. U32 MsgContext; /* 08h */
  237. U8 LUN[8]; /* 0Ch */
  238. U32 Control; /* 14h */
  239. MPI_SCSI_IO32_CDB_UNION CDB; /* 18h */
  240. U32 DataLength; /* 38h */
  241. U32 BidirectionalDataLength; /* 3Ch */
  242. U32 SecondaryReferenceTag; /* 40h */
  243. U16 SecondaryApplicationTag; /* 44h */
  244. U16 Reserved2; /* 46h */
  245. U16 EEDPFlags; /* 48h */
  246. U16 ApplicationTagTranslationMask; /* 4Ah */
  247. U32 EEDPBlockSize; /* 4Ch */
  248. MPI_SCSI_IO32_ADDRESS DeviceAddress; /* 50h */
  249. U8 SGLOffset0; /* 58h */
  250. U8 SGLOffset1; /* 59h */
  251. U8 SGLOffset2; /* 5Ah */
  252. U8 SGLOffset3; /* 5Bh */
  253. U32 Reserved3; /* 5Ch */
  254. U32 Reserved4; /* 60h */
  255. U32 SenseBufferLowAddr; /* 64h */
  256. SGE_IO_UNION SGL; /* 68h */
  257. } MSG_SCSI_IO32_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO32_REQUEST,
  258. SCSIIO32Request_t, MPI_POINTER pSCSIIO32Request_t;
  259. /* SCSI IO 32 MsgFlags bits */
  260. #define MPI_SCSIIO32_MSGFLGS_SENSE_WIDTH (0x01)
  261. #define MPI_SCSIIO32_MSGFLGS_32_SENSE_WIDTH (0x00)
  262. #define MPI_SCSIIO32_MSGFLGS_64_SENSE_WIDTH (0x01)
  263. #define MPI_SCSIIO32_MSGFLGS_SENSE_LOCATION (0x02)
  264. #define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_HOST (0x00)
  265. #define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_IOC (0x02)
  266. #define MPI_SCSIIO32_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04)
  267. #define MPI_SCSIIO32_MSGFLGS_SGL_OFFSETS_CHAINS (0x08)
  268. #define MPI_SCSIIO32_MSGFLGS_MULTICAST (0x10)
  269. #define MPI_SCSIIO32_MSGFLGS_BIDIRECTIONAL (0x20)
  270. #define MPI_SCSIIO32_MSGFLGS_LARGE_CDB (0x40)
  271. /* SCSI IO 32 Flags bits */
  272. #define MPI_SCSIIO32_FLAGS_FORM_MASK (0x03)
  273. #define MPI_SCSIIO32_FLAGS_FORM_SCSIID (0x00)
  274. #define MPI_SCSIIO32_FLAGS_FORM_WWID (0x01)
  275. /* SCSI IO 32 LUN fields */
  276. #define MPI_SCSIIO32_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF)
  277. #define MPI_SCSIIO32_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000)
  278. #define MPI_SCSIIO32_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF)
  279. #define MPI_SCSIIO32_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000)
  280. #define MPI_SCSIIO32_LUN_LEVEL_1_WORD (0xFF00)
  281. #define MPI_SCSIIO32_LUN_LEVEL_1_DWORD (0x0000FF00)
  282. /* SCSI IO 32 Control bits */
  283. #define MPI_SCSIIO32_CONTROL_DATADIRECTION_MASK (0x03000000)
  284. #define MPI_SCSIIO32_CONTROL_NODATATRANSFER (0x00000000)
  285. #define MPI_SCSIIO32_CONTROL_WRITE (0x01000000)
  286. #define MPI_SCSIIO32_CONTROL_READ (0x02000000)
  287. #define MPI_SCSIIO32_CONTROL_BIDIRECTIONAL (0x03000000)
  288. #define MPI_SCSIIO32_CONTROL_ADDCDBLEN_MASK (0xFC000000)
  289. #define MPI_SCSIIO32_CONTROL_ADDCDBLEN_SHIFT (26)
  290. #define MPI_SCSIIO32_CONTROL_TASKATTRIBUTE_MASK (0x00000700)
  291. #define MPI_SCSIIO32_CONTROL_SIMPLEQ (0x00000000)
  292. #define MPI_SCSIIO32_CONTROL_HEADOFQ (0x00000100)
  293. #define MPI_SCSIIO32_CONTROL_ORDEREDQ (0x00000200)
  294. #define MPI_SCSIIO32_CONTROL_ACAQ (0x00000400)
  295. #define MPI_SCSIIO32_CONTROL_UNTAGGED (0x00000500)
  296. #define MPI_SCSIIO32_CONTROL_NO_DISCONNECT (0x00000700)
  297. #define MPI_SCSIIO32_CONTROL_TASKMANAGE_MASK (0x00FF0000)
  298. #define MPI_SCSIIO32_CONTROL_OBSOLETE (0x00800000)
  299. #define MPI_SCSIIO32_CONTROL_CLEAR_ACA_RSV (0x00400000)
  300. #define MPI_SCSIIO32_CONTROL_TARGET_RESET (0x00200000)
  301. #define MPI_SCSIIO32_CONTROL_LUN_RESET_RSV (0x00100000)
  302. #define MPI_SCSIIO32_CONTROL_RESERVED (0x00080000)
  303. #define MPI_SCSIIO32_CONTROL_CLR_TASK_SET_RSV (0x00040000)
  304. #define MPI_SCSIIO32_CONTROL_ABORT_TASK_SET (0x00020000)
  305. #define MPI_SCSIIO32_CONTROL_RESERVED2 (0x00010000)
  306. /* SCSI IO 32 EEDPFlags */
  307. #define MPI_SCSIIO32_EEDPFLAGS_MASK_OP (0x0007)
  308. #define MPI_SCSIIO32_EEDPFLAGS_NOOP_OP (0x0000)
  309. #define MPI_SCSIIO32_EEDPFLAGS_CHK_OP (0x0001)
  310. #define MPI_SCSIIO32_EEDPFLAGS_STRIP_OP (0x0002)
  311. #define MPI_SCSIIO32_EEDPFLAGS_CHKRM_OP (0x0003)
  312. #define MPI_SCSIIO32_EEDPFLAGS_INSERT_OP (0x0004)
  313. #define MPI_SCSIIO32_EEDPFLAGS_REPLACE_OP (0x0006)
  314. #define MPI_SCSIIO32_EEDPFLAGS_CHKREGEN_OP (0x0007)
  315. #define MPI_SCSIIO32_EEDPFLAGS_PASS_REF_TAG (0x0008)
  316. #define MPI_SCSIIO32_EEDPFLAGS_8_9THS_MODE (0x0010)
  317. #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_MASK (0x0700)
  318. #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_GUARD (0x0100)
  319. #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_REFTAG (0x0200)
  320. #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_LBATAG (0x0400)
  321. #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_SHIFT (8)
  322. #define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_APPTAG (0x1000)
  323. #define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_APPTAG (0x2000)
  324. #define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_REFTAG (0x4000)
  325. #define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_REFTAG (0x8000)
  326. /* SCSIIO32 IO reply structure */
  327. typedef struct _MSG_SCSIIO32_IO_REPLY
  328. {
  329. U8 Port; /* 00h */
  330. U8 Reserved1; /* 01h */
  331. U8 MsgLength; /* 02h */
  332. U8 Function; /* 03h */
  333. U8 CDBLength; /* 04h */
  334. U8 SenseBufferLength; /* 05h */
  335. U8 Flags; /* 06h */
  336. U8 MsgFlags; /* 07h */
  337. U32 MsgContext; /* 08h */
  338. U8 SCSIStatus; /* 0Ch */
  339. U8 SCSIState; /* 0Dh */
  340. U16 IOCStatus; /* 0Eh */
  341. U32 IOCLogInfo; /* 10h */
  342. U32 TransferCount; /* 14h */
  343. U32 SenseCount; /* 18h */
  344. U32 ResponseInfo; /* 1Ch */
  345. U16 TaskTag; /* 20h */
  346. U16 Reserved2; /* 22h */
  347. U32 BidirectionalTransferCount; /* 24h */
  348. } MSG_SCSIIO32_IO_REPLY, MPI_POINTER PTR_MSG_SCSIIO32_IO_REPLY,
  349. SCSIIO32Reply_t, MPI_POINTER pSCSIIO32Reply_t;
  350. /****************************************************************************/
  351. /* SCSI Task Management messages */
  352. /****************************************************************************/
  353. typedef struct _MSG_SCSI_TASK_MGMT
  354. {
  355. U8 TargetID; /* 00h */
  356. U8 Bus; /* 01h */
  357. U8 ChainOffset; /* 02h */
  358. U8 Function; /* 03h */
  359. U8 Reserved; /* 04h */
  360. U8 TaskType; /* 05h */
  361. U8 Reserved1; /* 06h */
  362. U8 MsgFlags; /* 07h */
  363. U32 MsgContext; /* 08h */
  364. U8 LUN[8]; /* 0Ch */
  365. U32 Reserved2[7]; /* 14h */
  366. U32 TaskMsgContext; /* 30h */
  367. } MSG_SCSI_TASK_MGMT, MPI_POINTER PTR_SCSI_TASK_MGMT,
  368. SCSITaskMgmt_t, MPI_POINTER pSCSITaskMgmt_t;
  369. /* TaskType values */
  370. #define MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK (0x01)
  371. #define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02)
  372. #define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03)
  373. #define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS (0x04)
  374. #define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05)
  375. #define MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06)
  376. #define MPI_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07)
  377. #define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08)
  378. /* MsgFlags bits */
  379. #define MPI_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU (0x01)
  380. #define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00)
  381. #define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION (0x02)
  382. #define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
  383. #define MPI_SCSITASKMGMT_MSGFLAGS_SOFT_RESET_OPTION (0x08)
  384. /* SCSI Task Management Reply */
  385. typedef struct _MSG_SCSI_TASK_MGMT_REPLY
  386. {
  387. U8 TargetID; /* 00h */
  388. U8 Bus; /* 01h */
  389. U8 MsgLength; /* 02h */
  390. U8 Function; /* 03h */
  391. U8 ResponseCode; /* 04h */
  392. U8 TaskType; /* 05h */
  393. U8 Reserved1; /* 06h */
  394. U8 MsgFlags; /* 07h */
  395. U32 MsgContext; /* 08h */
  396. U8 Reserved2[2]; /* 0Ch */
  397. U16 IOCStatus; /* 0Eh */
  398. U32 IOCLogInfo; /* 10h */
  399. U32 TerminationCount; /* 14h */
  400. } MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY,
  401. SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t;
  402. /* ResponseCode values */
  403. #define MPI_SCSITASKMGMT_RSP_TM_COMPLETE (0x00)
  404. #define MPI_SCSITASKMGMT_RSP_INVALID_FRAME (0x02)
  405. #define MPI_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED (0x04)
  406. #define MPI_SCSITASKMGMT_RSP_TM_FAILED (0x05)
  407. #define MPI_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08)
  408. #define MPI_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09)
  409. #define MPI_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80)
  410. /****************************************************************************/
  411. /* SCSI Enclosure Processor messages */
  412. /****************************************************************************/
  413. typedef struct _MSG_SEP_REQUEST
  414. {
  415. U8 TargetID; /* 00h */
  416. U8 Bus; /* 01h */
  417. U8 ChainOffset; /* 02h */
  418. U8 Function; /* 03h */
  419. U8 Action; /* 04h */
  420. U8 Flags; /* 05h */
  421. U8 Reserved1; /* 06h */
  422. U8 MsgFlags; /* 07h */
  423. U32 MsgContext; /* 08h */
  424. U32 SlotStatus; /* 0Ch */
  425. U32 Reserved2; /* 10h */
  426. U32 Reserved3; /* 14h */
  427. U32 Reserved4; /* 18h */
  428. U16 Slot; /* 1Ch */
  429. U16 EnclosureHandle; /* 1Eh */
  430. } MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST,
  431. SEPRequest_t, MPI_POINTER pSEPRequest_t;
  432. /* Action defines */
  433. #define MPI_SEP_REQ_ACTION_WRITE_STATUS (0x00)
  434. #define MPI_SEP_REQ_ACTION_READ_STATUS (0x01)
  435. /* Flags defines */
  436. #define MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS (0x01)
  437. #define MPI_SEP_REQ_FLAGS_BUS_TARGETID_ADDRESS (0x00)
  438. /* SlotStatus bits for MSG_SEP_REQUEST */
  439. #define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR (0x00000001)
  440. #define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY (0x00000002)
  441. #define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING (0x00000004)
  442. #define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)
  443. #define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010)
  444. #define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK (0x00000020)
  445. #define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT (0x00000040)
  446. #define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED (0x00000080)
  447. #define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE (0x00000100)
  448. #define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED (0x00000200)
  449. #define MPI_SEP_REQ_SLOTSTATUS_REQ_CONSISTENCY_CHECK (0x00001000)
  450. #define MPI_SEP_REQ_SLOTSTATUS_DISABLE (0x00002000)
  451. #define MPI_SEP_REQ_SLOTSTATUS_REQ_RESERVED_DEVICE (0x00004000)
  452. #define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000)
  453. #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE (0x00040000)
  454. #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT (0x00080000)
  455. #define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE (0x00400000)
  456. #define MPI_SEP_REQ_SLOTSTATUS_ACTIVE (0x00800000)
  457. #define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000)
  458. #define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000)
  459. #define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF (0x10000000)
  460. #define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET (0x80000000)
  461. typedef struct _MSG_SEP_REPLY
  462. {
  463. U8 TargetID; /* 00h */
  464. U8 Bus; /* 01h */
  465. U8 MsgLength; /* 02h */
  466. U8 Function; /* 03h */
  467. U8 Action; /* 04h */
  468. U8 Reserved1; /* 05h */
  469. U8 Reserved2; /* 06h */
  470. U8 MsgFlags; /* 07h */
  471. U32 MsgContext; /* 08h */
  472. U16 Reserved3; /* 0Ch */
  473. U16 IOCStatus; /* 0Eh */
  474. U32 IOCLogInfo; /* 10h */
  475. U32 SlotStatus; /* 14h */
  476. U32 Reserved4; /* 18h */
  477. U16 Slot; /* 1Ch */
  478. U16 EnclosureHandle; /* 1Eh */
  479. } MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY,
  480. SEPReply_t, MPI_POINTER pSEPReply_t;
  481. /* SlotStatus bits for MSG_SEP_REPLY */
  482. #define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR (0x00000001)
  483. #define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY (0x00000002)
  484. #define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING (0x00000004)
  485. #define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)
  486. #define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010)
  487. #define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK (0x00000020)
  488. #define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT (0x00000040)
  489. #define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED (0x00000080)
  490. #define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE (0x00000100)
  491. #define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED (0x00000200)
  492. #define MPI_SEP_REPLY_SLOTSTATUS_CONSISTENCY_CHECK (0x00001000)
  493. #define MPI_SEP_REPLY_SLOTSTATUS_DISABLE (0x00002000)
  494. #define MPI_SEP_REPLY_SLOTSTATUS_RESERVED_DEVICE (0x00004000)
  495. #define MPI_SEP_REPLY_SLOTSTATUS_REPORT (0x00010000)
  496. #define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000)
  497. #define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY (0x00040000)
  498. #define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY (0x00080000)
  499. #define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE (0x00400000)
  500. #define MPI_SEP_REPLY_SLOTSTATUS_ACTIVE (0x00800000)
  501. #define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED (0x01000000)
  502. #define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED (0x02000000)
  503. #define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000)
  504. #define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000)
  505. #define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF (0x10000000)
  506. #define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED (0x40000000)
  507. #define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED (0x80000000)
  508. #endif