mpi_init.h 28 KB

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