mpi_sas.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /*
  2. * Copyright (c) 2003 LSI Logic Corporation.
  3. *
  4. *
  5. * Name: mpi_sas.h
  6. * Title: MPI Serial Attached SCSI structures and definitions
  7. * Creation Date: April 23, 2003
  8. *
  9. * mpi_sas.h Version: 01.05.xx
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * xx-yy-zz 01.05.01 Original release.
  17. * --------------------------------------------------------------------------
  18. */
  19. #ifndef MPI_SAS_H
  20. #define MPI_SAS_H
  21. /*****************************************************************************
  22. *
  23. * S e r i a l A t t a c h e d S C S I M e s s a g e s
  24. *
  25. *****************************************************************************/
  26. /****************************************************************************/
  27. /* Serial Management Protocol Passthrough Request */
  28. /****************************************************************************/
  29. typedef struct _MSG_SMP_PASSTHROUGH_REQUEST
  30. {
  31. U8 PassthroughFlags; /* 00h */
  32. U8 PhysicalPort; /* 01h */
  33. U8 ChainOffset; /* 02h */
  34. U8 Function; /* 03h */
  35. U16 RequestDataLength; /* 04h */
  36. U8 ConnectionRate; /* 06h */
  37. U8 MsgFlags; /* 07h */
  38. U32 MsgContext; /* 08h */
  39. U32 Reserved1; /* 0Ch */
  40. U64 SASAddress; /* 10h */
  41. U32 Reserved2; /* 18h */
  42. U32 Reserved3; /* 1Ch */
  43. SGE_SIMPLE_UNION SGL; /* 20h */
  44. } MSG_SMP_PASSTHROUGH_REQUEST, MPI_POINTER PTR_MSG_SMP_PASSTHROUGH_REQUEST,
  45. SmpPassthroughRequest_t, MPI_POINTER pSmpPassthroughRequest_t;
  46. #define MPI_SMP_PT_REQ_PT_FLAGS_IMMEDIATE (0x80)
  47. #define MPI_SMP_PT_REQ_CONNECT_RATE_NEGOTIATED (0x00)
  48. #define MPI_SMP_PT_REQ_CONNECT_RATE_1_5 (0x08)
  49. #define MPI_SMP_PT_REQ_CONNECT_RATE_3_0 (0x09)
  50. /* Serial Management Protocol Passthrough Reply */
  51. typedef struct _MSG_SMP_PASSTHROUGH_REPLY
  52. {
  53. U8 PassthroughFlags; /* 00h */
  54. U8 PhysicalPort; /* 01h */
  55. U8 MsgLength; /* 02h */
  56. U8 Function; /* 03h */
  57. U16 ResponseDataLength; /* 04h */
  58. U8 Reserved1; /* 06h */
  59. U8 MsgFlags; /* 07h */
  60. U32 MsgContext; /* 08h */
  61. U8 Reserved2; /* 0Ch */
  62. U8 SASStatus; /* 0Dh */
  63. U16 IOCStatus; /* 0Eh */
  64. U32 IOCLogInfo; /* 10h */
  65. U32 Reserved3; /* 14h */
  66. U8 ResponseData[4]; /* 18h */
  67. } MSG_SMP_PASSTHROUGH_REPLY, MPI_POINTER PTR_MSG_SMP_PASSTHROUGH_REPLY,
  68. SmpPassthroughReply_t, MPI_POINTER pSmpPassthroughReply_t;
  69. #define MPI_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE (0x80)
  70. /* values for the SASStatus field */
  71. #define MPI_SASSTATUS_SUCCESS (0x00)
  72. #define MPI_SASSTATUS_UNKNOWN_ERROR (0x01)
  73. #define MPI_SASSTATUS_INVALID_FRAME (0x02)
  74. #define MPI_SASSTATUS_UTC_BAD_DEST (0x03)
  75. #define MPI_SASSTATUS_UTC_BREAK_RECEIVED (0x04)
  76. #define MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED (0x05)
  77. #define MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST (0x06)
  78. #define MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED (0x07)
  79. #define MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY (0x08)
  80. #define MPI_SASSTATUS_UTC_WRONG_DESTINATION (0x09)
  81. #define MPI_SASSTATUS_SHORT_INFORMATION_UNIT (0x0A)
  82. #define MPI_SASSTATUS_LONG_INFORMATION_UNIT (0x0B)
  83. #define MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA (0x0C)
  84. #define MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR (0x0D)
  85. #define MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED (0x0E)
  86. #define MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH (0x0F)
  87. #define MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA (0x10)
  88. #define MPI_SASSTATUS_DATA_OFFSET_ERROR (0x11)
  89. #define MPI_SASSTATUS_SDSF_NAK_RECEIVED (0x12)
  90. #define MPI_SASSTATUS_SDSF_CONNECTION_FAILED (0x13)
  91. #define MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT (0x14)
  92. /*
  93. * Values for the SAS DeviceInfo field used in SAS Device Status Change Event
  94. * data and SAS IO Unit Configuration pages.
  95. */
  96. #define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)
  97. #define MPI_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
  98. #define MPI_SAS_DEVICE_INFO_DIRECT_ATTACH (0x00000800)
  99. #define MPI_SAS_DEVICE_INFO_SSP_TARGET (0x00000400)
  100. #define MPI_SAS_DEVICE_INFO_STP_TARGET (0x00000200)
  101. #define MPI_SAS_DEVICE_INFO_SMP_TARGET (0x00000100)
  102. #define MPI_SAS_DEVICE_INFO_SATA_DEVICE (0x00000080)
  103. #define MPI_SAS_DEVICE_INFO_SSP_INITIATOR (0x00000040)
  104. #define MPI_SAS_DEVICE_INFO_STP_INITIATOR (0x00000020)
  105. #define MPI_SAS_DEVICE_INFO_SMP_INITIATOR (0x00000010)
  106. #define MPI_SAS_DEVICE_INFO_SATA_HOST (0x00000008)
  107. #define MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE (0x00000007)
  108. #define MPI_SAS_DEVICE_INFO_NO_DEVICE (0x00000000)
  109. #define MPI_SAS_DEVICE_INFO_END_DEVICE (0x00000001)
  110. #define MPI_SAS_DEVICE_INFO_EDGE_EXPANDER (0x00000002)
  111. #define MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER (0x00000003)
  112. /****************************************************************************/
  113. /* SAS IO Unit Control Request */
  114. /****************************************************************************/
  115. typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUEST
  116. {
  117. U8 Operation; /* 00h */
  118. U8 Reserved1; /* 01h */
  119. U8 ChainOffset; /* 02h */
  120. U8 Function; /* 03h */
  121. U16 Reserved2; /* 04h */
  122. U8 Reserved3; /* 06h */
  123. U8 MsgFlags; /* 07h */
  124. U32 MsgContext; /* 08h */
  125. U8 TargetID; /* 0Ch */
  126. U8 Bus; /* 0Dh */
  127. U8 PhyNum; /* 0Eh */
  128. U8 Reserved4; /* 0Fh */
  129. U32 Reserved5; /* 10h */
  130. U64 SASAddress; /* 14h */
  131. U32 Reserved6; /* 1Ch */
  132. } MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST,
  133. SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
  134. /* values for the ... field */
  135. #define MPI_SAS_OP_CLEAR_NOT_PRESENT (0x01)
  136. #define MPI_SAS_OP_CLEAR_ALL (0x02)
  137. #define MPI_SAS_OP_MAP (0x03)
  138. #define MPI_SAS_OP_MOVE (0x04)
  139. #define MPI_SAS_OP_CLEAR (0x05)
  140. #define MPI_SAS_OP_PHY_LINK_RESET (0x06)
  141. #define MPI_SAS_OP_PHY_HARD_RESET (0x07)
  142. #define MPI_SAS_OP_PHY_CLEAR_ERROR_LOG (0x08)
  143. /* SAS IO Unit Control Reply */
  144. typedef struct _MSG_SAS_IOUNIT_CONTROL_REPLY
  145. {
  146. U8 Operation; /* 00h */
  147. U8 Reserved1; /* 01h */
  148. U8 MsgLength; /* 02h */
  149. U8 Function; /* 03h */
  150. U16 Reserved2; /* 04h */
  151. U8 Reserved3; /* 06h */
  152. U8 MsgFlags; /* 07h */
  153. U32 MsgContext; /* 08h */
  154. U16 Reserved4; /* 0Ch */
  155. U16 IOCStatus; /* 0Eh */
  156. U32 IOCLogInfo; /* 10h */
  157. } MSG_SAS_IOUNIT_CONTROL_REPLY, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REPLY,
  158. SasIoUnitControlReply_t, MPI_POINTER pSasIoUnitControlReply_t;
  159. #endif