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