1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef MPI2_SAS_H
29#define MPI2_SAS_H
30
31
32
33
34#define MPI2_SASSTATUS_SUCCESS (0x00)
35#define MPI2_SASSTATUS_UNKNOWN_ERROR (0x01)
36#define MPI2_SASSTATUS_INVALID_FRAME (0x02)
37#define MPI2_SASSTATUS_UTC_BAD_DEST (0x03)
38#define MPI2_SASSTATUS_UTC_BREAK_RECEIVED (0x04)
39#define MPI2_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED (0x05)
40#define MPI2_SASSTATUS_UTC_PORT_LAYER_REQUEST (0x06)
41#define MPI2_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED (0x07)
42#define MPI2_SASSTATUS_UTC_STP_RESOURCES_BUSY (0x08)
43#define MPI2_SASSTATUS_UTC_WRONG_DESTINATION (0x09)
44#define MPI2_SASSTATUS_SHORT_INFORMATION_UNIT (0x0A)
45#define MPI2_SASSTATUS_LONG_INFORMATION_UNIT (0x0B)
46#define MPI2_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA (0x0C)
47#define MPI2_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR (0x0D)
48#define MPI2_SASSTATUS_XFER_RDY_NOT_EXPECTED (0x0E)
49#define MPI2_SASSTATUS_DATA_INCORRECT_DATA_LENGTH (0x0F)
50#define MPI2_SASSTATUS_DATA_TOO_MUCH_READ_DATA (0x10)
51#define MPI2_SASSTATUS_DATA_OFFSET_ERROR (0x11)
52#define MPI2_SASSTATUS_SDSF_NAK_RECEIVED (0x12)
53#define MPI2_SASSTATUS_SDSF_CONNECTION_FAILED (0x13)
54#define MPI2_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT (0x14)
55
56
57
58
59
60
61#define MPI2_SAS_DEVICE_INFO_SEP (0x00004000)
62#define MPI2_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)
63#define MPI2_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
64#define MPI2_SAS_DEVICE_INFO_DIRECT_ATTACH (0x00000800)
65#define MPI2_SAS_DEVICE_INFO_SSP_TARGET (0x00000400)
66#define MPI2_SAS_DEVICE_INFO_STP_TARGET (0x00000200)
67#define MPI2_SAS_DEVICE_INFO_SMP_TARGET (0x00000100)
68#define MPI2_SAS_DEVICE_INFO_SATA_DEVICE (0x00000080)
69#define MPI2_SAS_DEVICE_INFO_SSP_INITIATOR (0x00000040)
70#define MPI2_SAS_DEVICE_INFO_STP_INITIATOR (0x00000020)
71#define MPI2_SAS_DEVICE_INFO_SMP_INITIATOR (0x00000010)
72#define MPI2_SAS_DEVICE_INFO_SATA_HOST (0x00000008)
73
74#define MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE (0x00000007)
75#define MPI2_SAS_DEVICE_INFO_NO_DEVICE (0x00000000)
76#define MPI2_SAS_DEVICE_INFO_END_DEVICE (0x00000001)
77#define MPI2_SAS_DEVICE_INFO_EDGE_EXPANDER (0x00000002)
78#define MPI2_SAS_DEVICE_INFO_FANOUT_EXPANDER (0x00000003)
79
80
81
82
83
84
85
86
87
88
89
90
91
92typedef struct _MPI2_SMP_PASSTHROUGH_REQUEST
93{
94 U8 PassthroughFlags;
95 U8 PhysicalPort;
96 U8 ChainOffset;
97 U8 Function;
98 U16 RequestDataLength;
99 U8 SGLFlags;
100 U8 MsgFlags;
101 U8 VP_ID;
102 U8 VF_ID;
103 U16 Reserved1;
104 U32 Reserved2;
105 U64 SASAddress;
106 U32 Reserved3;
107 U32 Reserved4;
108 MPI2_SIMPLE_SGE_UNION SGL;
109} MPI2_SMP_PASSTHROUGH_REQUEST, MPI2_POINTER PTR_MPI2_SMP_PASSTHROUGH_REQUEST,
110 Mpi2SmpPassthroughRequest_t, MPI2_POINTER pMpi2SmpPassthroughRequest_t;
111
112
113#define MPI2_SMP_PT_REQ_PT_FLAGS_IMMEDIATE (0x80)
114
115
116
117
118
119typedef struct _MPI2_SMP_PASSTHROUGH_REPLY
120{
121 U8 PassthroughFlags;
122 U8 PhysicalPort;
123 U8 MsgLength;
124 U8 Function;
125 U16 ResponseDataLength;
126 U8 SGLFlags;
127 U8 MsgFlags;
128 U8 VP_ID;
129 U8 VF_ID;
130 U16 Reserved1;
131 U8 Reserved2;
132 U8 SASStatus;
133 U16 IOCStatus;
134 U32 IOCLogInfo;
135 U32 Reserved3;
136 U8 ResponseData[4];
137} MPI2_SMP_PASSTHROUGH_REPLY, MPI2_POINTER PTR_MPI2_SMP_PASSTHROUGH_REPLY,
138 Mpi2SmpPassthroughReply_t, MPI2_POINTER pMpi2SmpPassthroughReply_t;
139
140
141#define MPI2_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE (0x80)
142
143
144
145
146
147
148
149
150
151typedef struct _MPI2_SATA_PASSTHROUGH_REQUEST
152{
153 U16 DevHandle;
154 U8 ChainOffset;
155 U8 Function;
156 U16 PassthroughFlags;
157 U8 SGLFlags;
158 U8 MsgFlags;
159 U8 VP_ID;
160 U8 VF_ID;
161 U16 Reserved1;
162 U32 Reserved2;
163 U32 Reserved3;
164 U32 Reserved4;
165 U32 DataLength;
166 U8 CommandFIS[20];
167 MPI2_SGE_IO_UNION SGL;
168} MPI2_SATA_PASSTHROUGH_REQUEST, MPI2_POINTER PTR_MPI2_SATA_PASSTHROUGH_REQUEST,
169 Mpi2SataPassthroughRequest_t, MPI2_POINTER pMpi2SataPassthroughRequest_t;
170
171
172#define MPI2_SATA_PT_REQ_PT_FLAGS_EXECUTE_DIAG (0x0100)
173#define MPI2_SATA_PT_REQ_PT_FLAGS_DMA (0x0020)
174#define MPI2_SATA_PT_REQ_PT_FLAGS_PIO (0x0010)
175#define MPI2_SATA_PT_REQ_PT_FLAGS_UNSPECIFIED_VU (0x0004)
176#define MPI2_SATA_PT_REQ_PT_FLAGS_WRITE (0x0002)
177#define MPI2_SATA_PT_REQ_PT_FLAGS_READ (0x0001)
178
179
180
181
182
183typedef struct _MPI2_SATA_PASSTHROUGH_REPLY
184{
185 U16 DevHandle;
186 U8 MsgLength;
187 U8 Function;
188 U16 PassthroughFlags;
189 U8 SGLFlags;
190 U8 MsgFlags;
191 U8 VP_ID;
192 U8 VF_ID;
193 U16 Reserved1;
194 U8 Reserved2;
195 U8 SASStatus;
196 U16 IOCStatus;
197 U32 IOCLogInfo;
198 U8 StatusFIS[20];
199 U32 StatusControlRegisters;
200 U32 TransferCount;
201} MPI2_SATA_PASSTHROUGH_REPLY, MPI2_POINTER PTR_MPI2_SATA_PASSTHROUGH_REPLY,
202 Mpi2SataPassthroughReply_t, MPI2_POINTER pMpi2SataPassthroughReply_t;
203
204
205
206
207
208
209
210
211
212typedef struct _MPI2_SAS_IOUNIT_CONTROL_REQUEST
213{
214 U8 Operation;
215 U8 Reserved1;
216 U8 ChainOffset;
217 U8 Function;
218 U16 DevHandle;
219 U8 IOCParameter;
220 U8 MsgFlags;
221 U8 VP_ID;
222 U8 VF_ID;
223 U16 Reserved3;
224 U16 Reserved4;
225 U8 PhyNum;
226 U8 PrimFlags;
227 U32 Primitive;
228 U8 LookupMethod;
229 U8 Reserved5;
230 U16 SlotNumber;
231 U64 LookupAddress;
232 U32 IOCParameterValue;
233 U32 Reserved7;
234 U32 Reserved8;
235} MPI2_SAS_IOUNIT_CONTROL_REQUEST,
236 MPI2_POINTER PTR_MPI2_SAS_IOUNIT_CONTROL_REQUEST,
237 Mpi2SasIoUnitControlRequest_t, MPI2_POINTER pMpi2SasIoUnitControlRequest_t;
238
239
240#define MPI2_SAS_OP_CLEAR_ALL_PERSISTENT (0x02)
241#define MPI2_SAS_OP_PHY_LINK_RESET (0x06)
242#define MPI2_SAS_OP_PHY_HARD_RESET (0x07)
243#define MPI2_SAS_OP_PHY_CLEAR_ERROR_LOG (0x08)
244#define MPI2_SAS_OP_SEND_PRIMITIVE (0x0A)
245#define MPI2_SAS_OP_FORCE_FULL_DISCOVERY (0x0B)
246#define MPI2_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C)
247#define MPI2_SAS_OP_REMOVE_DEVICE (0x0D)
248#define MPI2_SAS_OP_LOOKUP_MAPPING (0x0E)
249#define MPI2_SAS_OP_SET_IOC_PARAMETER (0x0F)
250#define MPI2_SAS_OP_DEV_ENABLE_NCQ (0x14)
251#define MPI2_SAS_OP_DEV_DISABLE_NCQ (0x15)
252#define MPI2_SAS_OP_PRODUCT_SPECIFIC_MIN (0x80)
253
254
255#define MPI2_SAS_PRIMFLAGS_SINGLE (0x08)
256#define MPI2_SAS_PRIMFLAGS_TRIPLE (0x02)
257#define MPI2_SAS_PRIMFLAGS_REDUNDANT (0x01)
258
259
260#define MPI2_SAS_LOOKUP_METHOD_SAS_ADDRESS (0x01)
261#define MPI2_SAS_LOOKUP_METHOD_SAS_ENCLOSURE_SLOT (0x02)
262#define MPI2_SAS_LOOKUP_METHOD_SAS_DEVICE_NAME (0x03)
263
264
265
266typedef struct _MPI2_SAS_IOUNIT_CONTROL_REPLY
267{
268 U8 Operation;
269 U8 Reserved1;
270 U8 MsgLength;
271 U8 Function;
272 U16 DevHandle;
273 U8 IOCParameter;
274 U8 MsgFlags;
275 U8 VP_ID;
276 U8 VF_ID;
277 U16 Reserved3;
278 U16 Reserved4;
279 U16 IOCStatus;
280 U32 IOCLogInfo;
281} MPI2_SAS_IOUNIT_CONTROL_REPLY,
282 MPI2_POINTER PTR_MPI2_SAS_IOUNIT_CONTROL_REPLY,
283 Mpi2SasIoUnitControlReply_t, MPI2_POINTER pMpi2SasIoUnitControlReply_t;
284
285
286#endif
287
288
289