mpi_lan.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * Copyright (c) 2000-2008 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi_lan.h
  6. * Title: MPI LAN messages and structures
  7. * Creation Date: June 30, 2000
  8. *
  9. * mpi_lan.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. * 05-24-00 00.10.02 Added LANStatus field to _MSG_LAN_SEND_REPLY.
  18. * Added LANStatus field to _MSG_LAN_RECEIVE_POST_REPLY.
  19. * Moved ListCount field in _MSG_LAN_RECEIVE_POST_REPLY.
  20. * 06-06-00 01.00.01 Update version number for 1.0 release.
  21. * 06-12-00 01.00.02 Added MPI_ to BUCKETSTATUS_ definitions.
  22. * 06-22-00 01.00.03 Major changes to match new LAN definition in 1.0 spec.
  23. * 06-30-00 01.00.04 Added Context Reply definitions per revised proposal.
  24. * Changed transaction context usage to bucket/buffer.
  25. * 07-05-00 01.00.05 Removed LAN_RECEIVE_POST_BUCKET_CONTEXT_MASK definition
  26. * to lan private header file
  27. * 11-02-00 01.01.01 Original release for post 1.0 work
  28. * 02-20-01 01.01.02 Started using MPI_POINTER.
  29. * 03-27-01 01.01.03 Added structure offset comments.
  30. * 08-08-01 01.02.01 Original release for v1.2 work.
  31. * 05-11-04 01.03.01 Original release for MPI v1.3.
  32. * 08-19-04 01.05.01 Original release for MPI v1.5.
  33. * --------------------------------------------------------------------------
  34. */
  35. #ifndef MPI_LAN_H
  36. #define MPI_LAN_H
  37. /******************************************************************************
  38. *
  39. * L A N M e s s a g e s
  40. *
  41. *******************************************************************************/
  42. /* LANSend messages */
  43. typedef struct _MSG_LAN_SEND_REQUEST
  44. {
  45. U16 Reserved; /* 00h */
  46. U8 ChainOffset; /* 02h */
  47. U8 Function; /* 03h */
  48. U16 Reserved2; /* 04h */
  49. U8 PortNumber; /* 06h */
  50. U8 MsgFlags; /* 07h */
  51. U32 MsgContext; /* 08h */
  52. SGE_MPI_UNION SG_List[1]; /* 0Ch */
  53. } MSG_LAN_SEND_REQUEST, MPI_POINTER PTR_MSG_LAN_SEND_REQUEST,
  54. LANSendRequest_t, MPI_POINTER pLANSendRequest_t;
  55. typedef struct _MSG_LAN_SEND_REPLY
  56. {
  57. U16 Reserved; /* 00h */
  58. U8 MsgLength; /* 02h */
  59. U8 Function; /* 03h */
  60. U8 Reserved2; /* 04h */
  61. U8 NumberOfContexts; /* 05h */
  62. U8 PortNumber; /* 06h */
  63. U8 MsgFlags; /* 07h */
  64. U32 MsgContext; /* 08h */
  65. U16 Reserved3; /* 0Ch */
  66. U16 IOCStatus; /* 0Eh */
  67. U32 IOCLogInfo; /* 10h */
  68. U32 BufferContext; /* 14h */
  69. } MSG_LAN_SEND_REPLY, MPI_POINTER PTR_MSG_LAN_SEND_REPLY,
  70. LANSendReply_t, MPI_POINTER pLANSendReply_t;
  71. /* LANReceivePost */
  72. typedef struct _MSG_LAN_RECEIVE_POST_REQUEST
  73. {
  74. U16 Reserved; /* 00h */
  75. U8 ChainOffset; /* 02h */
  76. U8 Function; /* 03h */
  77. U16 Reserved2; /* 04h */
  78. U8 PortNumber; /* 06h */
  79. U8 MsgFlags; /* 07h */
  80. U32 MsgContext; /* 08h */
  81. U32 BucketCount; /* 0Ch */
  82. SGE_MPI_UNION SG_List[1]; /* 10h */
  83. } MSG_LAN_RECEIVE_POST_REQUEST, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REQUEST,
  84. LANReceivePostRequest_t, MPI_POINTER pLANReceivePostRequest_t;
  85. typedef struct _MSG_LAN_RECEIVE_POST_REPLY
  86. {
  87. U16 Reserved; /* 00h */
  88. U8 MsgLength; /* 02h */
  89. U8 Function; /* 03h */
  90. U8 Reserved2; /* 04h */
  91. U8 NumberOfContexts; /* 05h */
  92. U8 PortNumber; /* 06h */
  93. U8 MsgFlags; /* 07h */
  94. U32 MsgContext; /* 08h */
  95. U16 Reserved3; /* 0Ch */
  96. U16 IOCStatus; /* 0Eh */
  97. U32 IOCLogInfo; /* 10h */
  98. U32 BucketsRemaining; /* 14h */
  99. U32 PacketOffset; /* 18h */
  100. U32 PacketLength; /* 1Ch */
  101. U32 BucketContext[1]; /* 20h */
  102. } MSG_LAN_RECEIVE_POST_REPLY, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REPLY,
  103. LANReceivePostReply_t, MPI_POINTER pLANReceivePostReply_t;
  104. /* LANReset */
  105. typedef struct _MSG_LAN_RESET_REQUEST
  106. {
  107. U16 Reserved; /* 00h */
  108. U8 ChainOffset; /* 02h */
  109. U8 Function; /* 03h */
  110. U16 Reserved2; /* 04h */
  111. U8 PortNumber; /* 05h */
  112. U8 MsgFlags; /* 07h */
  113. U32 MsgContext; /* 08h */
  114. } MSG_LAN_RESET_REQUEST, MPI_POINTER PTR_MSG_LAN_RESET_REQUEST,
  115. LANResetRequest_t, MPI_POINTER pLANResetRequest_t;
  116. typedef struct _MSG_LAN_RESET_REPLY
  117. {
  118. U16 Reserved; /* 00h */
  119. U8 MsgLength; /* 02h */
  120. U8 Function; /* 03h */
  121. U16 Reserved2; /* 04h */
  122. U8 PortNumber; /* 06h */
  123. U8 MsgFlags; /* 07h */
  124. U32 MsgContext; /* 08h */
  125. U16 Reserved3; /* 0Ch */
  126. U16 IOCStatus; /* 0Eh */
  127. U32 IOCLogInfo; /* 10h */
  128. } MSG_LAN_RESET_REPLY, MPI_POINTER PTR_MSG_LAN_RESET_REPLY,
  129. LANResetReply_t, MPI_POINTER pLANResetReply_t;
  130. /****************************************************************************/
  131. /* LAN Context Reply defines and macros */
  132. /****************************************************************************/
  133. #define LAN_REPLY_PACKET_LENGTH_MASK (0x0000FFFF)
  134. #define LAN_REPLY_PACKET_LENGTH_SHIFT (0)
  135. #define LAN_REPLY_BUCKET_CONTEXT_MASK (0x07FF0000)
  136. #define LAN_REPLY_BUCKET_CONTEXT_SHIFT (16)
  137. #define LAN_REPLY_BUFFER_CONTEXT_MASK (0x07FFFFFF)
  138. #define LAN_REPLY_BUFFER_CONTEXT_SHIFT (0)
  139. #define LAN_REPLY_FORM_MASK (0x18000000)
  140. #define LAN_REPLY_FORM_RECEIVE_SINGLE (0x00)
  141. #define LAN_REPLY_FORM_RECEIVE_MULTIPLE (0x01)
  142. #define LAN_REPLY_FORM_SEND_SINGLE (0x02)
  143. #define LAN_REPLY_FORM_MESSAGE_CONTEXT (0x03)
  144. #define LAN_REPLY_FORM_SHIFT (27)
  145. #define GET_LAN_PACKET_LENGTH(x) (((x) & LAN_REPLY_PACKET_LENGTH_MASK) \
  146. >> LAN_REPLY_PACKET_LENGTH_SHIFT)
  147. #define SET_LAN_PACKET_LENGTH(x, lth) \
  148. ((x) = ((x) & ~LAN_REPLY_PACKET_LENGTH_MASK) | \
  149. (((lth) << LAN_REPLY_PACKET_LENGTH_SHIFT) & \
  150. LAN_REPLY_PACKET_LENGTH_MASK))
  151. #define GET_LAN_BUCKET_CONTEXT(x) (((x) & LAN_REPLY_BUCKET_CONTEXT_MASK) \
  152. >> LAN_REPLY_BUCKET_CONTEXT_SHIFT)
  153. #define SET_LAN_BUCKET_CONTEXT(x, ctx) \
  154. ((x) = ((x) & ~LAN_REPLY_BUCKET_CONTEXT_MASK) | \
  155. (((ctx) << LAN_REPLY_BUCKET_CONTEXT_SHIFT) & \
  156. LAN_REPLY_BUCKET_CONTEXT_MASK))
  157. #define GET_LAN_BUFFER_CONTEXT(x) (((x) & LAN_REPLY_BUFFER_CONTEXT_MASK) \
  158. >> LAN_REPLY_BUFFER_CONTEXT_SHIFT)
  159. #define SET_LAN_BUFFER_CONTEXT(x, ctx) \
  160. ((x) = ((x) & ~LAN_REPLY_BUFFER_CONTEXT_MASK) | \
  161. (((ctx) << LAN_REPLY_BUFFER_CONTEXT_SHIFT) & \
  162. LAN_REPLY_BUFFER_CONTEXT_MASK))
  163. #define GET_LAN_FORM(x) (((x) & LAN_REPLY_FORM_MASK) \
  164. >> LAN_REPLY_FORM_SHIFT)
  165. #define SET_LAN_FORM(x, frm) \
  166. ((x) = ((x) & ~LAN_REPLY_FORM_MASK) | \
  167. (((frm) << LAN_REPLY_FORM_SHIFT) & \
  168. LAN_REPLY_FORM_MASK))
  169. /****************************************************************************/
  170. /* LAN Current Device State defines */
  171. /****************************************************************************/
  172. #define MPI_LAN_DEVICE_STATE_RESET (0x00)
  173. #define MPI_LAN_DEVICE_STATE_OPERATIONAL (0x01)
  174. /****************************************************************************/
  175. /* LAN Loopback defines */
  176. /****************************************************************************/
  177. #define MPI_LAN_TX_MODES_ENABLE_LOOPBACK_SUPPRESSION (0x01)
  178. #endif