diff options
Diffstat (limited to 'drivers/message/fusion/lsi/mpi_targ.h')
-rw-r--r-- | drivers/message/fusion/lsi/mpi_targ.h | 160 |
1 files changed, 151 insertions, 9 deletions
diff --git a/drivers/message/fusion/lsi/mpi_targ.h b/drivers/message/fusion/lsi/mpi_targ.h index 804dc85426c1..623901fd82be 100644 --- a/drivers/message/fusion/lsi/mpi_targ.h +++ b/drivers/message/fusion/lsi/mpi_targ.h | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2003 LSI Logic Corporation. | 2 | * Copyright (c) 2000-2004 LSI Logic Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi_targ.h | 5 | * Name: mpi_targ.h |
6 | * Title: MPI Target mode messages and structures | 6 | * Title: MPI Target mode messages and structures |
7 | * Creation Date: June 22, 2000 | 7 | * Creation Date: June 22, 2000 |
8 | * | 8 | * |
9 | * mpi_targ.h Version: 01.05.xx | 9 | * mpi_targ.h Version: 01.05.04 |
10 | * | 10 | * |
11 | * Version History | 11 | * Version History |
12 | * --------------- | 12 | * --------------- |
@@ -43,6 +43,16 @@ | |||
43 | * Added PRIORITY_REASON_TARGET_BUSY. | 43 | * Added PRIORITY_REASON_TARGET_BUSY. |
44 | * 11-15-02 01.02.08 Added AliasID field to MPI_TARGET_SCSI_SPI_CMD_BUFFER. | 44 | * 11-15-02 01.02.08 Added AliasID field to MPI_TARGET_SCSI_SPI_CMD_BUFFER. |
45 | * 04-01-03 01.02.09 Added OptionalOxid field to MPI_TARGET_FCP_CMD_BUFFER. | 45 | * 04-01-03 01.02.09 Added OptionalOxid field to MPI_TARGET_FCP_CMD_BUFFER. |
46 | * 05-11-04 01.03.01 Original release for MPI v1.3. | ||
47 | * 08-19-04 01.05.01 Added new request message structures for | ||
48 | * MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, | ||
49 | * MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, and | ||
50 | * MSG_TARGET_ASSIST_EXT_REQUEST. | ||
51 | * Added new structures for SAS SSP Command buffer, SSP | ||
52 | * Task buffer, and SSP Status IU. | ||
53 | * 10-05-04 01.05.02 MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY added. | ||
54 | * 02-22-05 01.05.03 Changed a comment. | ||
55 | * 03-11-05 01.05.04 Removed TargetAssistExtended Request. | ||
46 | * -------------------------------------------------------------------------- | 56 | * -------------------------------------------------------------------------- |
47 | */ | 57 | */ |
48 | 58 | ||
@@ -133,6 +143,25 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY | |||
133 | } MSG_PRIORITY_CMD_RECEIVED_REPLY, MPI_POINTER PTR_MSG_PRIORITY_CMD_RECEIVED_REPLY, | 143 | } MSG_PRIORITY_CMD_RECEIVED_REPLY, MPI_POINTER PTR_MSG_PRIORITY_CMD_RECEIVED_REPLY, |
134 | PriorityCommandReceivedReply_t, MPI_POINTER pPriorityCommandReceivedReply_t; | 144 | PriorityCommandReceivedReply_t, MPI_POINTER pPriorityCommandReceivedReply_t; |
135 | 145 | ||
146 | |||
147 | typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY | ||
148 | { | ||
149 | U16 Reserved; /* 00h */ | ||
150 | U8 MsgLength; /* 02h */ | ||
151 | U8 Function; /* 03h */ | ||
152 | U16 Reserved1; /* 04h */ | ||
153 | U8 Reserved2; /* 06h */ | ||
154 | U8 MsgFlags; /* 07h */ | ||
155 | U32 MsgContext; /* 08h */ | ||
156 | U8 PriorityReason; /* 0Ch */ | ||
157 | U8 Reserved3; /* 0Dh */ | ||
158 | U16 IOCStatus; /* 0Eh */ | ||
159 | U32 IOCLogInfo; /* 10h */ | ||
160 | U32 ReplyWord; /* 14h */ | ||
161 | } MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, | ||
162 | MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, | ||
163 | TargetCmdBufferPostErrorReply_t, MPI_POINTER pTargetCmdBufferPostErrorReply_t; | ||
164 | |||
136 | #define PRIORITY_REASON_NO_DISCONNECT (0x00) | 165 | #define PRIORITY_REASON_NO_DISCONNECT (0x00) |
137 | #define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01) | 166 | #define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01) |
138 | #define PRIORITY_REASON_CMD_PARITY_ERR (0x02) | 167 | #define PRIORITY_REASON_CMD_PARITY_ERR (0x02) |
@@ -146,7 +175,34 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY | |||
146 | #define PRIORITY_REASON_UNKNOWN (0xFF) | 175 | #define PRIORITY_REASON_UNKNOWN (0xFF) |
147 | 176 | ||
148 | 177 | ||
149 | typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY | 178 | /****************************************************************************/ |
179 | /* Target Command Buffer Post Base Request */ | ||
180 | /****************************************************************************/ | ||
181 | |||
182 | typedef struct _MSG_TARGET_CMD_BUF_POST_BASE_REQUEST | ||
183 | { | ||
184 | U8 BufferPostFlags; /* 00h */ | ||
185 | U8 PortNumber; /* 01h */ | ||
186 | U8 ChainOffset; /* 02h */ | ||
187 | U8 Function; /* 03h */ | ||
188 | U16 TotalCmdBuffers; /* 04h */ | ||
189 | U8 Reserved; /* 06h */ | ||
190 | U8 MsgFlags; /* 07h */ | ||
191 | U32 MsgContext; /* 08h */ | ||
192 | U32 Reserved1; /* 0Ch */ | ||
193 | U16 CmdBufferLength; /* 10h */ | ||
194 | U16 NextCmdBufferOffset; /* 12h */ | ||
195 | U32 BaseAddressLow; /* 14h */ | ||
196 | U32 BaseAddressHigh; /* 18h */ | ||
197 | } MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, | ||
198 | MPI_POINTER PTR__MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, | ||
199 | TargetCmdBufferPostBaseRequest_t, | ||
200 | MPI_POINTER pTargetCmdBufferPostBaseRequest_t; | ||
201 | |||
202 | #define CMD_BUFFER_POST_BASE_FLAGS_AUTO_POST_ALL (0x01) | ||
203 | |||
204 | |||
205 | typedef struct _MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY | ||
150 | { | 206 | { |
151 | U16 Reserved; /* 00h */ | 207 | U16 Reserved; /* 00h */ |
152 | U8 MsgLength; /* 02h */ | 208 | U8 MsgLength; /* 02h */ |
@@ -155,16 +211,41 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY | |||
155 | U8 Reserved2; /* 06h */ | 211 | U8 Reserved2; /* 06h */ |
156 | U8 MsgFlags; /* 07h */ | 212 | U8 MsgFlags; /* 07h */ |
157 | U32 MsgContext; /* 08h */ | 213 | U32 MsgContext; /* 08h */ |
158 | U8 PriorityReason; /* 0Ch */ | 214 | U16 Reserved3; /* 0Ch */ |
159 | U8 Reserved3; /* 0Dh */ | ||
160 | U16 IOCStatus; /* 0Eh */ | 215 | U16 IOCStatus; /* 0Eh */ |
161 | U32 IOCLogInfo; /* 10h */ | 216 | U32 IOCLogInfo; /* 10h */ |
162 | U32 ReplyWord; /* 14h */ | 217 | } MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY, |
163 | } MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, | 218 | MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY, |
164 | MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, | 219 | TargetCmdBufferPostBaseListReply_t, |
165 | TargetCmdBufferPostErrorReply_t, MPI_POINTER pTargetCmdBufferPostErrorReply_t; | 220 | MPI_POINTER pTargetCmdBufferPostBaseListReply_t; |
221 | |||
222 | |||
223 | /****************************************************************************/ | ||
224 | /* Target Command Buffer Post List Request */ | ||
225 | /****************************************************************************/ | ||
226 | |||
227 | typedef struct _MSG_TARGET_CMD_BUF_POST_LIST_REQUEST | ||
228 | { | ||
229 | U8 Reserved; /* 00h */ | ||
230 | U8 PortNumber; /* 01h */ | ||
231 | U8 ChainOffset; /* 02h */ | ||
232 | U8 Function; /* 03h */ | ||
233 | U16 CmdBufferCount; /* 04h */ | ||
234 | U8 Reserved1; /* 06h */ | ||
235 | U8 MsgFlags; /* 07h */ | ||
236 | U32 MsgContext; /* 08h */ | ||
237 | U32 Reserved2; /* 0Ch */ | ||
238 | U16 IoIndex[2]; /* 10h */ | ||
239 | } MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, | ||
240 | MPI_POINTER PTR_MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, | ||
241 | TargetCmdBufferPostListRequest_t, | ||
242 | MPI_POINTER pTargetCmdBufferPostListRequest_t; | ||
166 | 243 | ||
167 | 244 | ||
245 | /****************************************************************************/ | ||
246 | /* Command Buffer Formats (with 16 byte CDB) */ | ||
247 | /****************************************************************************/ | ||
248 | |||
168 | typedef struct _MPI_TARGET_FCP_CMD_BUFFER | 249 | typedef struct _MPI_TARGET_FCP_CMD_BUFFER |
169 | { | 250 | { |
170 | U8 FcpLun[8]; /* 00h */ | 251 | U8 FcpLun[8]; /* 00h */ |
@@ -201,6 +282,46 @@ typedef struct _MPI_TARGET_SCSI_SPI_CMD_BUFFER | |||
201 | MpiTargetScsiSpiCmdBuffer, MPI_POINTER pMpiTargetScsiSpiCmdBuffer; | 282 | MpiTargetScsiSpiCmdBuffer, MPI_POINTER pMpiTargetScsiSpiCmdBuffer; |
202 | 283 | ||
203 | 284 | ||
285 | typedef struct _MPI_TARGET_SSP_CMD_BUFFER | ||
286 | { | ||
287 | U8 FrameType; /* 00h */ | ||
288 | U8 Reserved1; /* 01h */ | ||
289 | U16 Reserved2; /* 02h */ | ||
290 | U16 InitiatorTag; /* 04h */ | ||
291 | U16 DevHandle; /* 06h */ | ||
292 | /* COMMAND information unit starts here */ | ||
293 | U8 LogicalUnitNumber[8]; /* 08h */ | ||
294 | U8 Reserved3; /* 10h */ | ||
295 | U8 TaskAttribute; /* lower 3 bits */ /* 11h */ | ||
296 | U8 Reserved4; /* 12h */ | ||
297 | U8 AdditionalCDBLength; /* upper 5 bits */ /* 13h */ | ||
298 | U8 CDB[16]; /* 14h */ | ||
299 | /* Additional CDB bytes extend past the CDB field */ | ||
300 | } MPI_TARGET_SSP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_CMD_BUFFER, | ||
301 | MpiTargetSspCmdBuffer, MPI_POINTER pMpiTargetSspCmdBuffer; | ||
302 | |||
303 | typedef struct _MPI_TARGET_SSP_TASK_BUFFER | ||
304 | { | ||
305 | U8 FrameType; /* 00h */ | ||
306 | U8 Reserved1; /* 01h */ | ||
307 | U16 Reserved2; /* 02h */ | ||
308 | U16 InitiatorTag; /* 04h */ | ||
309 | U16 DevHandle; /* 06h */ | ||
310 | /* TASK information unit starts here */ | ||
311 | U8 LogicalUnitNumber[8]; /* 08h */ | ||
312 | U8 Reserved3; /* 10h */ | ||
313 | U8 Reserved4; /* 11h */ | ||
314 | U8 TaskManagementFunction; /* 12h */ | ||
315 | U8 Reserved5; /* 13h */ | ||
316 | U16 ManagedTaskTag; /* 14h */ | ||
317 | U16 Reserved6; /* 16h */ | ||
318 | U32 Reserved7; /* 18h */ | ||
319 | U32 Reserved8; /* 1Ch */ | ||
320 | U32 Reserved9; /* 20h */ | ||
321 | } MPI_TARGET_SSP_TASK_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_TASK_BUFFER, | ||
322 | MpiTargetSspTaskBuffer, MPI_POINTER pMpiTargetSspTaskBuffer; | ||
323 | |||
324 | |||
204 | /****************************************************************************/ | 325 | /****************************************************************************/ |
205 | /* Target Assist Request */ | 326 | /* Target Assist Request */ |
206 | /****************************************************************************/ | 327 | /****************************************************************************/ |
@@ -308,6 +429,27 @@ typedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU | |||
308 | } MPI_TARGET_SCSI_SPI_STATUS_IU, MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_STATUS_IU, | 429 | } MPI_TARGET_SCSI_SPI_STATUS_IU, MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_STATUS_IU, |
309 | TargetScsiSpiStatusIU_t, MPI_POINTER pTargetScsiSpiStatusIU_t; | 430 | TargetScsiSpiStatusIU_t, MPI_POINTER pTargetScsiSpiStatusIU_t; |
310 | 431 | ||
432 | /* | ||
433 | * NOTE: The SSP status IU is big-endian. When used on a little-endian system, | ||
434 | * this structure properly orders the bytes. | ||
435 | */ | ||
436 | typedef struct _MPI_TARGET_SSP_RSP_IU | ||
437 | { | ||
438 | U32 Reserved0[6]; /* reserved for SSP header */ /* 00h */ | ||
439 | /* start of RESPONSE information unit */ | ||
440 | U32 Reserved1; /* 18h */ | ||
441 | U32 Reserved2; /* 1Ch */ | ||
442 | U16 Reserved3; /* 20h */ | ||
443 | U8 DataPres; /* lower 2 bits */ /* 22h */ | ||
444 | U8 Status; /* 23h */ | ||
445 | U32 Reserved4; /* 24h */ | ||
446 | U32 SenseDataLength; /* 28h */ | ||
447 | U32 ResponseDataLength; /* 2Ch */ | ||
448 | U8 ResponseSenseData[4]; /* 30h */ | ||
449 | } MPI_TARGET_SSP_RSP_IU, MPI_POINTER PTR_MPI_TARGET_SSP_RSP_IU, | ||
450 | MpiTargetSspRspIu_t, MPI_POINTER pMpiTargetSspRspIu_t; | ||
451 | |||
452 | |||
311 | /****************************************************************************/ | 453 | /****************************************************************************/ |
312 | /* Target Mode Abort Request */ | 454 | /* Target Mode Abort Request */ |
313 | /****************************************************************************/ | 455 | /****************************************************************************/ |