mpi_fc.h 17 KB

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