mpi_init.h 28 KB

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