mpi_fc.h 17 KB

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