mpi_fc.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. /*
  2. * Copyright (c) 2000-2008 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi_fc.h
  6. * Title: MPI Fibre Channel messages and structures
  7. * Creation Date: June 12, 2000
  8. *
  9. * mpi_fc.h Version: 01.05.01
  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. * 06-06-00 01.00.01 Update version number for 1.0 release.
  18. * 06-12-00 01.00.02 Added _MSG_FC_ABORT_REPLY structure.
  19. * 11-02-00 01.01.01 Original release for post 1.0 work
  20. * 12-04-00 01.01.02 Added messages for Common Transport Send and
  21. * Primitive Send.
  22. * 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix
  23. * and modified the FcPrimitiveSend flags.
  24. * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger
  25. * field.
  26. * Added FC_ABORT_TYPE_CT_SEND_REQUEST and
  27. * FC_ABORT_TYPE_EXLINKSEND_REQUEST for FcAbort request.
  28. * Added MPI_FC_PRIM_SEND_FLAGS_STOP_SEND.
  29. * 02-20-01 01.01.05 Started using MPI_POINTER.
  30. * 03-27-01 01.01.06 Added Flags field to MSG_LINK_SERVICE_BUFFER_POST_REPLY
  31. * and defined MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED.
  32. * Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
  33. * Added structure offset comments.
  34. * 04-09-01 01.01.07 Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
  35. * 08-08-01 01.02.01 Original release for v1.2 work.
  36. * 09-28-01 01.02.02 Change name of reserved field in
  37. * MSG_LINK_SERVICE_RSP_REPLY.
  38. * 05-31-02 01.02.03 Adding AliasIndex to FC Direct Access requests.
  39. * 01-16-04 01.02.04 Added define for MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK.
  40. * 05-11-04 01.03.01 Original release for MPI v1.3.
  41. * 08-19-04 01.05.01 Original release for MPI v1.5.
  42. * --------------------------------------------------------------------------
  43. */
  44. #ifndef MPI_FC_H
  45. #define MPI_FC_H
  46. /*****************************************************************************
  47. *
  48. * F C D i r e c t A c c e s s M e s s a g e s
  49. *
  50. *****************************************************************************/
  51. /****************************************************************************/
  52. /* Link Service Buffer Post messages */
  53. /****************************************************************************/
  54. typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REQUEST
  55. {
  56. U8 BufferPostFlags; /* 00h */
  57. U8 BufferCount; /* 01h */
  58. U8 ChainOffset; /* 02h */
  59. U8 Function; /* 03h */
  60. U16 Reserved; /* 04h */
  61. U8 Reserved1; /* 06h */
  62. U8 MsgFlags; /* 07h */
  63. U32 MsgContext; /* 08h */
  64. SGE_TRANS_SIMPLE_UNION SGL;
  65. } MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
  66. MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REQUEST,
  67. LinkServiceBufferPostRequest_t, MPI_POINTER pLinkServiceBufferPostRequest_t;
  68. #define LINK_SERVICE_BUFFER_POST_FLAGS_PORT_MASK (0x01)
  69. typedef struct _WWNFORMAT
  70. {
  71. U32 PortNameHigh; /* 00h */
  72. U32 PortNameLow; /* 04h */
  73. U32 NodeNameHigh; /* 08h */
  74. U32 NodeNameLow; /* 0Ch */
  75. } WWNFORMAT,
  76. WwnFormat_t;
  77. /* Link Service Buffer Post Reply */
  78. typedef struct _MSG_LINK_SERVICE_BUFFER_POST_REPLY
  79. {
  80. U8 Flags; /* 00h */
  81. U8 Reserved; /* 01h */
  82. U8 MsgLength; /* 02h */
  83. U8 Function; /* 03h */
  84. U16 Reserved1; /* 04h */
  85. U8 PortNumber; /* 06h */
  86. U8 MsgFlags; /* 07h */
  87. U32 MsgContext; /* 08h */
  88. U16 Reserved2; /* 0Ch */
  89. U16 IOCStatus; /* 0Eh */
  90. U32 IOCLogInfo; /* 10h */
  91. U32 TransferLength; /* 14h */
  92. U32 TransactionContext; /* 18h */
  93. U32 Rctl_Did; /* 1Ch */
  94. U32 Csctl_Sid; /* 20h */
  95. U32 Type_Fctl; /* 24h */
  96. U16 SeqCnt; /* 28h */
  97. U8 Dfctl; /* 2Ah */
  98. U8 SeqId; /* 2Bh */
  99. U16 Rxid; /* 2Ch */
  100. U16 Oxid; /* 2Eh */
  101. U32 Parameter; /* 30h */
  102. WWNFORMAT Wwn; /* 34h */
  103. } MSG_LINK_SERVICE_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_BUFFER_POST_REPLY,
  104. LinkServiceBufferPostReply_t, MPI_POINTER pLinkServiceBufferPostReply_t;
  105. #define MPI_LS_BUF_POST_REPLY_FLAG_NO_RSP_NEEDED (0x80)
  106. #define MPI_FC_DID_MASK (0x00FFFFFF)
  107. #define MPI_FC_DID_SHIFT (0)
  108. #define MPI_FC_RCTL_MASK (0xFF000000)
  109. #define MPI_FC_RCTL_SHIFT (24)
  110. #define MPI_FC_SID_MASK (0x00FFFFFF)
  111. #define MPI_FC_SID_SHIFT (0)
  112. #define MPI_FC_CSCTL_MASK (0xFF000000)
  113. #define MPI_FC_CSCTL_SHIFT (24)
  114. #define MPI_FC_FCTL_MASK (0x00FFFFFF)
  115. #define MPI_FC_FCTL_SHIFT (0)
  116. #define MPI_FC_TYPE_MASK (0xFF000000)
  117. #define MPI_FC_TYPE_SHIFT (24)
  118. /* obsolete name for the above */
  119. #define FCP_TARGET_DID_MASK (0x00FFFFFF)
  120. #define FCP_TARGET_DID_SHIFT (0)
  121. #define FCP_TARGET_RCTL_MASK (0xFF000000)
  122. #define FCP_TARGET_RCTL_SHIFT (24)
  123. #define FCP_TARGET_SID_MASK (0x00FFFFFF)
  124. #define FCP_TARGET_SID_SHIFT (0)
  125. #define FCP_TARGET_CSCTL_MASK (0xFF000000)
  126. #define FCP_TARGET_CSCTL_SHIFT (24)
  127. #define FCP_TARGET_FCTL_MASK (0x00FFFFFF)
  128. #define FCP_TARGET_FCTL_SHIFT (0)
  129. #define FCP_TARGET_TYPE_MASK (0xFF000000)
  130. #define FCP_TARGET_TYPE_SHIFT (24)
  131. /****************************************************************************/
  132. /* Link Service Response messages */
  133. /****************************************************************************/
  134. typedef struct _MSG_LINK_SERVICE_RSP_REQUEST
  135. {
  136. U8 RspFlags; /* 00h */
  137. U8 RspLength; /* 01h */
  138. U8 ChainOffset; /* 02h */
  139. U8 Function; /* 03h */
  140. U16 Reserved1; /* 04h */
  141. U8 Reserved2; /* 06h */
  142. U8 MsgFlags; /* 07h */
  143. U32 MsgContext; /* 08h */
  144. U32 Rctl_Did; /* 0Ch */
  145. U32 Csctl_Sid; /* 10h */
  146. U32 Type_Fctl; /* 14h */
  147. U16 SeqCnt; /* 18h */
  148. U8 Dfctl; /* 1Ah */
  149. U8 SeqId; /* 1Bh */
  150. U16 Rxid; /* 1Ch */
  151. U16 Oxid; /* 1Eh */
  152. U32 Parameter; /* 20h */
  153. SGE_SIMPLE_UNION SGL; /* 24h */
  154. } MSG_LINK_SERVICE_RSP_REQUEST, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REQUEST,
  155. LinkServiceRspRequest_t, MPI_POINTER pLinkServiceRspRequest_t;
  156. #define LINK_SERVICE_RSP_FLAGS_IMMEDIATE (0x80)
  157. #define LINK_SERVICE_RSP_FLAGS_PORT_MASK (0x01)
  158. /* Link Service Response Reply */
  159. typedef struct _MSG_LINK_SERVICE_RSP_REPLY
  160. {
  161. U16 Reserved; /* 00h */
  162. U8 MsgLength; /* 02h */
  163. U8 Function; /* 03h */
  164. U16 Reserved1; /* 04h */
  165. U8 Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */
  166. U8 MsgFlags; /* 07h */
  167. U32 MsgContext; /* 08h */
  168. U16 Reserved3; /* 0Ch */
  169. U16 IOCStatus; /* 0Eh */
  170. U32 IOCLogInfo; /* 10h */
  171. U32 InitiatorIndex; /* 14h */
  172. } MSG_LINK_SERVICE_RSP_REPLY, MPI_POINTER PTR_MSG_LINK_SERVICE_RSP_REPLY,
  173. LinkServiceRspReply_t, MPI_POINTER pLinkServiceRspReply_t;
  174. /****************************************************************************/
  175. /* Extended Link Service Send messages */
  176. /****************************************************************************/
  177. typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
  178. {
  179. U8 SendFlags; /* 00h */
  180. U8 AliasIndex; /* 01h */
  181. U8 ChainOffset; /* 02h */
  182. U8 Function; /* 03h */
  183. U32 MsgFlags_Did; /* 04h */
  184. U32 MsgContext; /* 08h */
  185. U32 ElsCommandCode; /* 0Ch */
  186. SGE_SIMPLE_UNION SGL; /* 10h */
  187. } MSG_EXLINK_SERVICE_SEND_REQUEST, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REQUEST,
  188. ExLinkServiceSendRequest_t, MPI_POINTER pExLinkServiceSendRequest_t;
  189. #define EX_LINK_SERVICE_SEND_DID_MASK (0x00FFFFFF)
  190. #define EX_LINK_SERVICE_SEND_DID_SHIFT (0)
  191. #define EX_LINK_SERVICE_SEND_MSGFLAGS_MASK (0xFF000000)
  192. #define EX_LINK_SERVICE_SEND_MSGFLAGS_SHIFT (24)
  193. /* Extended Link Service Send Reply */
  194. typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
  195. {
  196. U8 Reserved; /* 00h */
  197. U8 AliasIndex; /* 01h */
  198. U8 MsgLength; /* 02h */
  199. U8 Function; /* 03h */
  200. U16 Reserved1; /* 04h */
  201. U8 Reserved2; /* 06h */
  202. U8 MsgFlags; /* 07h */
  203. U32 MsgContext; /* 08h */
  204. U16 Reserved3; /* 0Ch */
  205. U16 IOCStatus; /* 0Eh */
  206. U32 IOCLogInfo; /* 10h */
  207. U32 ResponseLength; /* 14h */
  208. } MSG_EXLINK_SERVICE_SEND_REPLY, MPI_POINTER PTR_MSG_EXLINK_SERVICE_SEND_REPLY,
  209. ExLinkServiceSendReply_t, MPI_POINTER pExLinkServiceSendReply_t;
  210. /****************************************************************************/
  211. /* FC Abort messages */
  212. /****************************************************************************/
  213. typedef struct _MSG_FC_ABORT_REQUEST
  214. {
  215. U8 AbortFlags; /* 00h */
  216. U8 AbortType; /* 01h */
  217. U8 ChainOffset; /* 02h */
  218. U8 Function; /* 03h */
  219. U16 Reserved1; /* 04h */
  220. U8 Reserved2; /* 06h */
  221. U8 MsgFlags; /* 07h */
  222. U32 MsgContext; /* 08h */
  223. U32 TransactionContextToAbort; /* 0Ch */
  224. } MSG_FC_ABORT_REQUEST, MPI_POINTER PTR_MSG_FC_ABORT_REQUEST,
  225. FcAbortRequest_t, MPI_POINTER pFcAbortRequest_t;
  226. #define FC_ABORT_FLAG_PORT_MASK (0x01)
  227. #define FC_ABORT_TYPE_ALL_FC_BUFFERS (0x00)
  228. #define FC_ABORT_TYPE_EXACT_FC_BUFFER (0x01)
  229. #define FC_ABORT_TYPE_CT_SEND_REQUEST (0x02)
  230. #define FC_ABORT_TYPE_EXLINKSEND_REQUEST (0x03)
  231. /* FC Abort Reply */
  232. typedef struct _MSG_FC_ABORT_REPLY
  233. {
  234. U16 Reserved; /* 00h */
  235. U8 MsgLength; /* 02h */
  236. U8 Function; /* 03h */
  237. U16 Reserved1; /* 04h */
  238. U8 Reserved2; /* 06h */
  239. U8 MsgFlags; /* 07h */
  240. U32 MsgContext; /* 08h */
  241. U16 Reserved3; /* 0Ch */
  242. U16 IOCStatus; /* 0Eh */
  243. U32 IOCLogInfo; /* 10h */
  244. } MSG_FC_ABORT_REPLY, MPI_POINTER PTR_MSG_FC_ABORT_REPLY,
  245. FcAbortReply_t, MPI_POINTER pFcAbortReply_t;
  246. /****************************************************************************/
  247. /* FC Common Transport Send messages */
  248. /****************************************************************************/
  249. typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
  250. {
  251. U8 SendFlags; /* 00h */
  252. U8 AliasIndex; /* 01h */
  253. U8 ChainOffset; /* 02h */
  254. U8 Function; /* 03h */
  255. U32 MsgFlags_Did; /* 04h */
  256. U32 MsgContext; /* 08h */
  257. U16 CTCommandCode; /* 0Ch */
  258. U8 FsType; /* 0Eh */
  259. U8 Reserved1; /* 0Fh */
  260. SGE_SIMPLE_UNION SGL; /* 10h */
  261. } MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
  262. MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REQUEST,
  263. FcCommonTransportSendRequest_t, MPI_POINTER pFcCommonTransportSendRequest_t;
  264. #define MPI_FC_CT_SEND_DID_MASK (0x00FFFFFF)
  265. #define MPI_FC_CT_SEND_DID_SHIFT (0)
  266. #define MPI_FC_CT_SEND_MSGFLAGS_MASK (0xFF000000)
  267. #define MPI_FC_CT_SEND_MSGFLAGS_SHIFT (24)
  268. /* FC Common Transport Send Reply */
  269. typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
  270. {
  271. U8 Reserved; /* 00h */
  272. U8 AliasIndex; /* 01h */
  273. U8 MsgLength; /* 02h */
  274. U8 Function; /* 03h */
  275. U16 Reserved1; /* 04h */
  276. U8 Reserved2; /* 06h */
  277. U8 MsgFlags; /* 07h */
  278. U32 MsgContext; /* 08h */
  279. U16 Reserved3; /* 0Ch */
  280. U16 IOCStatus; /* 0Eh */
  281. U32 IOCLogInfo; /* 10h */
  282. U32 ResponseLength; /* 14h */
  283. } MSG_FC_COMMON_TRANSPORT_SEND_REPLY, MPI_POINTER PTR_MSG_FC_COMMON_TRANSPORT_SEND_REPLY,
  284. FcCommonTransportSendReply_t, MPI_POINTER pFcCommonTransportSendReply_t;
  285. /****************************************************************************/
  286. /* FC Primitive Send messages */
  287. /****************************************************************************/
  288. typedef struct _MSG_FC_PRIMITIVE_SEND_REQUEST
  289. {
  290. U8 SendFlags; /* 00h */
  291. U8 Reserved; /* 01h */
  292. U8 ChainOffset; /* 02h */
  293. U8 Function; /* 03h */
  294. U16 Reserved1; /* 04h */
  295. U8 Reserved2; /* 06h */
  296. U8 MsgFlags; /* 07h */
  297. U32 MsgContext; /* 08h */
  298. U8 FcPrimitive[4]; /* 0Ch */
  299. } MSG_FC_PRIMITIVE_SEND_REQUEST, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REQUEST,
  300. FcPrimitiveSendRequest_t, MPI_POINTER pFcPrimitiveSendRequest_t;
  301. #define MPI_FC_PRIM_SEND_FLAGS_PORT_MASK (0x01)
  302. #define MPI_FC_PRIM_SEND_FLAGS_ML_RESET_LINK (0x02)
  303. #define MPI_FC_PRIM_SEND_FLAGS_RESET_LINK (0x04)
  304. #define MPI_FC_PRIM_SEND_FLAGS_STOP_SEND (0x08)
  305. #define MPI_FC_PRIM_SEND_FLAGS_SEND_ONCE (0x10)
  306. #define MPI_FC_PRIM_SEND_FLAGS_SEND_AROUND (0x20)
  307. #define MPI_FC_PRIM_SEND_FLAGS_UNTIL_FULL (0x40)
  308. #define MPI_FC_PRIM_SEND_FLAGS_FOREVER (0x80)
  309. /* FC Primitive Send Reply */
  310. typedef struct _MSG_FC_PRIMITIVE_SEND_REPLY
  311. {
  312. U8 SendFlags; /* 00h */
  313. U8 Reserved; /* 01h */
  314. U8 MsgLength; /* 02h */
  315. U8 Function; /* 03h */
  316. U16 Reserved1; /* 04h */
  317. U8 Reserved2; /* 06h */
  318. U8 MsgFlags; /* 07h */
  319. U32 MsgContext; /* 08h */
  320. U16 Reserved3; /* 0Ch */
  321. U16 IOCStatus; /* 0Eh */
  322. U32 IOCLogInfo; /* 10h */
  323. } MSG_FC_PRIMITIVE_SEND_REPLY, MPI_POINTER PTR_MSG_FC_PRIMITIVE_SEND_REPLY,
  324. FcPrimitiveSendReply_t, MPI_POINTER pFcPrimitiveSendReply_t;
  325. #endif