1 /*- 2 * Copyright (c) 2013 LSI Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the author nor the names of any co-contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * LSI MPT-Fusion Host Adapter FreeBSD 30 * 31 * $FreeBSD$ 32 */ 33 34 /* 35 * Copyright (c) 2000-2012 LSI Corporation. 36 * 37 * 38 * Name: mpi2_targ.h 39 * Title: MPI Target mode messages and structures 40 * Creation Date: September 8, 2006 41 * 42 * mpi2_targ.h Version: 02.00.06 43 * 44 * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 45 * prefix are for use only on MPI v2.5 products, and must not be used 46 * with MPI v2.0 products. Unless otherwise noted, names beginning with 47 * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products. 48 * 49 * Version History 50 * --------------- 51 * 52 * Date Version Description 53 * -------- -------- ------------------------------------------------------ 54 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A. 55 * 08-31-07 02.00.01 Added Command Buffer Data Location Address Space bits to 56 * BufferPostFlags field of CommandBufferPostBase Request. 57 * 02-29-08 02.00.02 Modified various names to make them 32-character unique. 58 * 10-02-08 02.00.03 Removed NextCmdBufferOffset from 59 * MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST. 60 * Target Status Send Request only takes a single SGE for 61 * response data. 62 * 02-10-10 02.00.04 Added comment to MPI2_TARGET_SSP_RSP_IU structure. 63 * 11-18-11 02.00.05 Incorporating additions for MPI v2.5. 64 * 11-27-12 02.00.06 Added InitiatorDevHandle field to MPI2_TARGET_MODE_ABORT 65 * request message structure. 66 * Added AbortType MPI2_TARGET_MODE_ABORT_DEVHANDLE and 67 * MPI2_TARGET_MODE_ABORT_ALL_COMMANDS. 68 * -------------------------------------------------------------------------- 69 */ 70 71 #ifndef MPI2_TARG_H 72 #define MPI2_TARG_H 73 74 75 /****************************************************************************** 76 * 77 * SCSI Target Messages 78 * 79 *******************************************************************************/ 80 81 /**************************************************************************** 82 * Target Command Buffer Post Base Request 83 ****************************************************************************/ 84 85 typedef struct _MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST 86 { 87 U8 BufferPostFlags; /* 0x00 */ 88 U8 Reserved1; /* 0x01 */ 89 U8 ChainOffset; /* 0x02 */ 90 U8 Function; /* 0x03 */ 91 U16 TotalCmdBuffers; /* 0x04 */ 92 U8 Reserved; /* 0x06 */ 93 U8 MsgFlags; /* 0x07 */ 94 U8 VP_ID; /* 0x08 */ 95 U8 VF_ID; /* 0x09 */ 96 U16 Reserved2; /* 0x0A */ 97 U32 Reserved3; /* 0x0C */ 98 U16 CmdBufferLength; /* 0x10 */ 99 U16 Reserved4; /* 0x12 */ 100 U32 BaseAddressLow; /* 0x14 */ 101 U32 BaseAddressHigh; /* 0x18 */ 102 } MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST, 103 MPI2_POINTER PTR_MPI2_TARGET_CMD_BUF_POST_BASE_REQUEST, 104 Mpi2TargetCmdBufferPostBaseRequest_t, 105 MPI2_POINTER pMpi2TargetCmdBufferPostBaseRequest_t; 106 107 /* values for the BufferPostflags field */ 108 #define MPI2_CMD_BUF_POST_BASE_ADDRESS_SPACE_MASK (0x0C) 109 #define MPI2_CMD_BUF_POST_BASE_SYSTEM_ADDRESS_SPACE (0x00) 110 #define MPI2_CMD_BUF_POST_BASE_IOCDDR_ADDRESS_SPACE (0x04) 111 #define MPI2_CMD_BUF_POST_BASE_IOCPLB_ADDRESS_SPACE (0x08) 112 #define MPI2_CMD_BUF_POST_BASE_IOCPLBNTA_ADDRESS_SPACE (0x0C) 113 114 #define MPI2_CMD_BUF_POST_BASE_FLAGS_AUTO_POST_ALL (0x01) 115 116 117 /**************************************************************************** 118 * Target Command Buffer Post List Request 119 ****************************************************************************/ 120 121 typedef struct _MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST 122 { 123 U16 Reserved; /* 0x00 */ 124 U8 ChainOffset; /* 0x02 */ 125 U8 Function; /* 0x03 */ 126 U16 CmdBufferCount; /* 0x04 */ 127 U8 Reserved1; /* 0x06 */ 128 U8 MsgFlags; /* 0x07 */ 129 U8 VP_ID; /* 0x08 */ 130 U8 VF_ID; /* 0x09 */ 131 U16 Reserved2; /* 0x0A */ 132 U32 Reserved3; /* 0x0C */ 133 U16 IoIndex[2]; /* 0x10 */ 134 } MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST, 135 MPI2_POINTER PTR_MPI2_TARGET_CMD_BUF_POST_LIST_REQUEST, 136 Mpi2TargetCmdBufferPostListRequest_t, 137 MPI2_POINTER pMpi2TargetCmdBufferPostListRequest_t; 138 139 /**************************************************************************** 140 * Target Command Buffer Post Base List Reply 141 ****************************************************************************/ 142 143 typedef struct _MPI2_TARGET_BUF_POST_BASE_LIST_REPLY 144 { 145 U8 Flags; /* 0x00 */ 146 U8 Reserved; /* 0x01 */ 147 U8 MsgLength; /* 0x02 */ 148 U8 Function; /* 0x03 */ 149 U16 Reserved1; /* 0x04 */ 150 U8 Reserved2; /* 0x06 */ 151 U8 MsgFlags; /* 0x07 */ 152 U8 VP_ID; /* 0x08 */ 153 U8 VF_ID; /* 0x09 */ 154 U16 Reserved3; /* 0x0A */ 155 U16 Reserved4; /* 0x0C */ 156 U16 IOCStatus; /* 0x0E */ 157 U32 IOCLogInfo; /* 0x10 */ 158 U16 IoIndex; /* 0x14 */ 159 U16 Reserved5; /* 0x16 */ 160 U32 Reserved6; /* 0x18 */ 161 } MPI2_TARGET_BUF_POST_BASE_LIST_REPLY, 162 MPI2_POINTER PTR_MPI2_TARGET_BUF_POST_BASE_LIST_REPLY, 163 Mpi2TargetCmdBufferPostBaseListReply_t, 164 MPI2_POINTER pMpi2TargetCmdBufferPostBaseListReply_t; 165 166 /* Flags defines */ 167 #define MPI2_CMD_BUF_POST_REPLY_IOINDEX_VALID (0x01) 168 169 170 /**************************************************************************** 171 * Command Buffer Formats (with 16 byte CDB) 172 ****************************************************************************/ 173 174 typedef struct _MPI2_TARGET_SSP_CMD_BUFFER 175 { 176 U8 FrameType; /* 0x00 */ 177 U8 Reserved1; /* 0x01 */ 178 U16 InitiatorConnectionTag; /* 0x02 */ 179 U32 HashedSourceSASAddress; /* 0x04 */ 180 U16 Reserved2; /* 0x08 */ 181 U16 Flags; /* 0x0A */ 182 U32 Reserved3; /* 0x0C */ 183 U16 Tag; /* 0x10 */ 184 U16 TargetPortTransferTag; /* 0x12 */ 185 U32 DataOffset; /* 0x14 */ 186 /* COMMAND information unit starts here */ 187 U8 LogicalUnitNumber[8]; /* 0x18 */ 188 U8 Reserved4; /* 0x20 */ 189 U8 TaskAttribute; /* lower 3 bits */ /* 0x21 */ 190 U8 Reserved5; /* 0x22 */ 191 U8 AdditionalCDBLength; /* upper 5 bits */ /* 0x23 */ 192 U8 CDB[16]; /* 0x24 */ 193 /* Additional CDB bytes extend past the CDB field */ 194 } MPI2_TARGET_SSP_CMD_BUFFER, MPI2_POINTER PTR_MPI2_TARGET_SSP_CMD_BUFFER, 195 Mpi2TargetSspCmdBuffer, MPI2_POINTER pMp2iTargetSspCmdBuffer; 196 197 typedef struct _MPI2_TARGET_SSP_TASK_BUFFER 198 { 199 U8 FrameType; /* 0x00 */ 200 U8 Reserved1; /* 0x01 */ 201 U16 InitiatorConnectionTag; /* 0x02 */ 202 U32 HashedSourceSASAddress; /* 0x04 */ 203 U16 Reserved2; /* 0x08 */ 204 U16 Flags; /* 0x0A */ 205 U32 Reserved3; /* 0x0C */ 206 U16 Tag; /* 0x10 */ 207 U16 TargetPortTransferTag; /* 0x12 */ 208 U32 DataOffset; /* 0x14 */ 209 /* TASK information unit starts here */ 210 U8 LogicalUnitNumber[8]; /* 0x18 */ 211 U16 Reserved4; /* 0x20 */ 212 U8 TaskManagementFunction; /* 0x22 */ 213 U8 Reserved5; /* 0x23 */ 214 U16 ManagedTaskTag; /* 0x24 */ 215 U16 Reserved6; /* 0x26 */ 216 U32 Reserved7; /* 0x28 */ 217 U32 Reserved8; /* 0x2C */ 218 U32 Reserved9; /* 0x30 */ 219 } MPI2_TARGET_SSP_TASK_BUFFER, MPI2_POINTER PTR_MPI2_TARGET_SSP_TASK_BUFFER, 220 Mpi2TargetSspTaskBuffer, MPI2_POINTER pMpi2TargetSspTaskBuffer; 221 222 /* mask and shift for HashedSourceSASAddress field */ 223 #define MPI2_TARGET_HASHED_SAS_ADDRESS_MASK (0xFFFFFF00) 224 #define MPI2_TARGET_HASHED_SAS_ADDRESS_SHIFT (8) 225 226 227 /**************************************************************************** 228 * MPI v2.0 Target Assist Request 229 ****************************************************************************/ 230 231 typedef struct _MPI2_TARGET_ASSIST_REQUEST 232 { 233 U8 Reserved1; /* 0x00 */ 234 U8 TargetAssistFlags; /* 0x01 */ 235 U8 ChainOffset; /* 0x02 */ 236 U8 Function; /* 0x03 */ 237 U16 QueueTag; /* 0x04 */ 238 U8 Reserved2; /* 0x06 */ 239 U8 MsgFlags; /* 0x07 */ 240 U8 VP_ID; /* 0x08 */ 241 U8 VF_ID; /* 0x09 */ 242 U16 Reserved3; /* 0x0A */ 243 U16 IoIndex; /* 0x0C */ 244 U16 InitiatorConnectionTag; /* 0x0E */ 245 U16 SGLFlags; /* 0x10 */ 246 U8 SequenceNumber; /* 0x12 */ 247 U8 Reserved4; /* 0x13 */ 248 U8 SGLOffset0; /* 0x14 */ 249 U8 SGLOffset1; /* 0x15 */ 250 U8 SGLOffset2; /* 0x16 */ 251 U8 SGLOffset3; /* 0x17 */ 252 U32 SkipCount; /* 0x18 */ 253 U32 DataLength; /* 0x1C */ 254 U32 BidirectionalDataLength; /* 0x20 */ 255 U16 IoFlags; /* 0x24 */ 256 U16 EEDPFlags; /* 0x26 */ 257 U32 EEDPBlockSize; /* 0x28 */ 258 U32 SecondaryReferenceTag; /* 0x2C */ 259 U16 SecondaryApplicationTag; /* 0x30 */ 260 U16 ApplicationTagTranslationMask; /* 0x32 */ 261 U32 PrimaryReferenceTag; /* 0x34 */ 262 U16 PrimaryApplicationTag; /* 0x38 */ 263 U16 PrimaryApplicationTagMask; /* 0x3A */ 264 U32 RelativeOffset; /* 0x3C */ 265 U32 Reserved5; /* 0x40 */ 266 U32 Reserved6; /* 0x44 */ 267 U32 Reserved7; /* 0x48 */ 268 U32 Reserved8; /* 0x4C */ 269 MPI2_SGE_IO_UNION SGL[1]; /* 0x50 */ 270 } MPI2_TARGET_ASSIST_REQUEST, MPI2_POINTER PTR_MPI2_TARGET_ASSIST_REQUEST, 271 Mpi2TargetAssistRequest_t, MPI2_POINTER pMpi2TargetAssistRequest_t; 272 273 /* Target Assist TargetAssistFlags bits */ 274 275 #define MPI2_TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80) 276 #define MPI2_TARGET_ASSIST_FLAGS_TLR (0x10) 277 #define MPI2_TARGET_ASSIST_FLAGS_RETRANSMIT (0x04) 278 #define MPI2_TARGET_ASSIST_FLAGS_AUTO_STATUS (0x02) 279 #define MPI2_TARGET_ASSIST_FLAGS_DATA_DIRECTION (0x01) 280 281 /* Target Assist SGLFlags bits */ 282 283 /* base values for Data Location Address Space */ 284 #define MPI2_TARGET_ASSIST_SGLFLAGS_ADDR_MASK (0x0C) 285 #define MPI2_TARGET_ASSIST_SGLFLAGS_SYSTEM_ADDR (0x00) 286 #define MPI2_TARGET_ASSIST_SGLFLAGS_IOCDDR_ADDR (0x04) 287 #define MPI2_TARGET_ASSIST_SGLFLAGS_IOCPLB_ADDR (0x08) 288 #define MPI2_TARGET_ASSIST_SGLFLAGS_PLBNTA_ADDR (0x0C) 289 290 /* base values for Type */ 291 #define MPI2_TARGET_ASSIST_SGLFLAGS_TYPE_MASK (0x03) 292 #define MPI2_TARGET_ASSIST_SGLFLAGS_MPI_TYPE (0x00) 293 #define MPI2_TARGET_ASSIST_SGLFLAGS_32IEEE_TYPE (0x01) 294 #define MPI2_TARGET_ASSIST_SGLFLAGS_64IEEE_TYPE (0x02) 295 296 /* shift values for each sub-field */ 297 #define MPI2_TARGET_ASSIST_SGLFLAGS_SGL3_SHIFT (12) 298 #define MPI2_TARGET_ASSIST_SGLFLAGS_SGL2_SHIFT (8) 299 #define MPI2_TARGET_ASSIST_SGLFLAGS_SGL1_SHIFT (4) 300 #define MPI2_TARGET_ASSIST_SGLFLAGS_SGL0_SHIFT (0) 301 302 /* Target Assist IoFlags bits */ 303 304 #define MPI2_TARGET_ASSIST_IOFLAGS_BIDIRECTIONAL (0x0800) 305 #define MPI2_TARGET_ASSIST_IOFLAGS_MULTICAST (0x0400) 306 #define MPI2_TARGET_ASSIST_IOFLAGS_RECEIVE_FIRST (0x0200) 307 308 /* Target Assist EEDPFlags bits */ 309 310 #define MPI2_TA_EEDPFLAGS_INC_PRI_REFTAG (0x8000) 311 #define MPI2_TA_EEDPFLAGS_INC_SEC_REFTAG (0x4000) 312 #define MPI2_TA_EEDPFLAGS_INC_PRI_APPTAG (0x2000) 313 #define MPI2_TA_EEDPFLAGS_INC_SEC_APPTAG (0x1000) 314 315 #define MPI2_TA_EEDPFLAGS_CHECK_REFTAG (0x0400) 316 #define MPI2_TA_EEDPFLAGS_CHECK_APPTAG (0x0200) 317 #define MPI2_TA_EEDPFLAGS_CHECK_GUARD (0x0100) 318 319 #define MPI2_TA_EEDPFLAGS_PASSTHRU_REFTAG (0x0008) 320 321 #define MPI2_TA_EEDPFLAGS_MASK_OP (0x0007) 322 #define MPI2_TA_EEDPFLAGS_NOOP_OP (0x0000) 323 #define MPI2_TA_EEDPFLAGS_CHECK_OP (0x0001) 324 #define MPI2_TA_EEDPFLAGS_STRIP_OP (0x0002) 325 #define MPI2_TA_EEDPFLAGS_CHECK_REMOVE_OP (0x0003) 326 #define MPI2_TA_EEDPFLAGS_INSERT_OP (0x0004) 327 #define MPI2_TA_EEDPFLAGS_REPLACE_OP (0x0006) 328 #define MPI2_TA_EEDPFLAGS_CHECK_REGEN_OP (0x0007) 329 330 331 /**************************************************************************** 332 * MPI v2.5 Target Assist Request 333 ****************************************************************************/ 334 335 typedef struct _MPI25_TARGET_ASSIST_REQUEST 336 { 337 U8 Reserved1; /* 0x00 */ 338 U8 TargetAssistFlags; /* 0x01 */ 339 U8 ChainOffset; /* 0x02 */ 340 U8 Function; /* 0x03 */ 341 U16 QueueTag; /* 0x04 */ 342 U8 Reserved2; /* 0x06 */ 343 U8 MsgFlags; /* 0x07 */ 344 U8 VP_ID; /* 0x08 */ 345 U8 VF_ID; /* 0x09 */ 346 U16 Reserved3; /* 0x0A */ 347 U16 IoIndex; /* 0x0C */ 348 U16 InitiatorConnectionTag; /* 0x0E */ 349 U8 DMAFlags; /* 0x10 */ 350 U8 Reserved9; /* 0x11 */ 351 U8 SequenceNumber; /* 0x12 */ 352 U8 Reserved4; /* 0x13 */ 353 U8 SGLOffset0; /* 0x14 */ 354 U8 SGLOffset1; /* 0x15 */ 355 U8 SGLOffset2; /* 0x16 */ 356 U8 SGLOffset3; /* 0x17 */ 357 U32 SkipCount; /* 0x18 */ 358 U32 DataLength; /* 0x1C */ 359 U32 BidirectionalDataLength; /* 0x20 */ 360 U16 IoFlags; /* 0x24 */ 361 U16 EEDPFlags; /* 0x26 */ 362 U16 EEDPBlockSize; /* 0x28 */ 363 U16 Reserved10; /* 0x2A */ 364 U32 SecondaryReferenceTag; /* 0x2C */ 365 U16 SecondaryApplicationTag; /* 0x30 */ 366 U16 ApplicationTagTranslationMask; /* 0x32 */ 367 U32 PrimaryReferenceTag; /* 0x34 */ 368 U16 PrimaryApplicationTag; /* 0x38 */ 369 U16 PrimaryApplicationTagMask; /* 0x3A */ 370 U32 RelativeOffset; /* 0x3C */ 371 U32 Reserved5; /* 0x40 */ 372 U32 Reserved6; /* 0x44 */ 373 U32 Reserved7; /* 0x48 */ 374 U32 Reserved8; /* 0x4C */ 375 MPI25_SGE_IO_UNION SGL; /* 0x50 */ 376 } MPI25_TARGET_ASSIST_REQUEST, MPI2_POINTER PTR_MPI25_TARGET_ASSIST_REQUEST, 377 Mpi25TargetAssistRequest_t, MPI2_POINTER pMpi25TargetAssistRequest_t; 378 379 /* use MPI2_TARGET_ASSIST_FLAGS_ defines for the Flags field */ 380 381 /* Defines for the DMAFlags field 382 * Each setting affects 4 SGLS, from SGL0 to SGL3. 383 * D = Data 384 * C = Cache DIF 385 * I = Interleaved 386 * H = Host DIF 387 */ 388 #define MPI25_TA_DMAFLAGS_OP_MASK (0x0F) 389 #define MPI25_TA_DMAFLAGS_OP_D_D_D_D (0x00) 390 #define MPI25_TA_DMAFLAGS_OP_D_D_D_C (0x01) 391 #define MPI25_TA_DMAFLAGS_OP_D_D_D_I (0x02) 392 #define MPI25_TA_DMAFLAGS_OP_D_D_C_C (0x03) 393 #define MPI25_TA_DMAFLAGS_OP_D_D_C_I (0x04) 394 #define MPI25_TA_DMAFLAGS_OP_D_D_I_I (0x05) 395 #define MPI25_TA_DMAFLAGS_OP_D_C_C_C (0x06) 396 #define MPI25_TA_DMAFLAGS_OP_D_C_C_I (0x07) 397 #define MPI25_TA_DMAFLAGS_OP_D_C_I_I (0x08) 398 #define MPI25_TA_DMAFLAGS_OP_D_I_I_I (0x09) 399 #define MPI25_TA_DMAFLAGS_OP_D_H_D_D (0x0A) 400 #define MPI25_TA_DMAFLAGS_OP_D_H_D_C (0x0B) 401 #define MPI25_TA_DMAFLAGS_OP_D_H_D_I (0x0C) 402 #define MPI25_TA_DMAFLAGS_OP_D_H_C_C (0x0D) 403 #define MPI25_TA_DMAFLAGS_OP_D_H_C_I (0x0E) 404 #define MPI25_TA_DMAFLAGS_OP_D_H_I_I (0x0F) 405 406 /* defines for the IoFlags field */ 407 #define MPI25_TARGET_ASSIST_IOFLAGS_BIDIRECTIONAL (0x0800) 408 #define MPI25_TARGET_ASSIST_IOFLAGS_RECEIVE_FIRST (0x0200) 409 410 /* defines for the EEDPFlags field */ 411 #define MPI25_TA_EEDPFLAGS_INC_PRI_REFTAG (0x8000) 412 #define MPI25_TA_EEDPFLAGS_INC_SEC_REFTAG (0x4000) 413 #define MPI25_TA_EEDPFLAGS_INC_PRI_APPTAG (0x2000) 414 #define MPI25_TA_EEDPFLAGS_INC_SEC_APPTAG (0x1000) 415 416 #define MPI25_TA_EEDPFLAGS_CHECK_REFTAG (0x0400) 417 #define MPI25_TA_EEDPFLAGS_CHECK_APPTAG (0x0200) 418 #define MPI25_TA_EEDPFLAGS_CHECK_GUARD (0x0100) 419 420 #define MPI25_TA_EEDPFLAGS_ESCAPE_MODE_MASK (0x00C0) 421 #define MPI25_TA_EEDPFLAGS_COMPATIBLE_MODE (0x0000) 422 #define MPI25_TA_EEDPFLAGS_DO_NOT_DISABLE_MODE (0x0040) 423 #define MPI25_TA_EEDPFLAGS_APPTAG_DISABLE_MODE (0x0080) 424 #define MPI25_TA_EEDPFLAGS_APPTAG_REFTAG_DISABLE_MODE (0x00C0) 425 426 #define MPI25_TA_EEDPFLAGS_HOST_GUARD_METHOD_MASK (0x0030) 427 #define MPI25_TA_EEDPFLAGS_T10_CRC_HOST_GUARD (0x0000) 428 #define MPI25_TA_EEDPFLAGS_IP_CHKSUM_HOST_GUARD (0x0010) 429 430 #define MPI25_TA_EEDPFLAGS_PASSTHRU_REFTAG (0x0008) 431 432 #define MPI25_TA_EEDPFLAGS_MASK_OP (0x0007) 433 #define MPI25_TA_EEDPFLAGS_NOOP_OP (0x0000) 434 #define MPI25_TA_EEDPFLAGS_CHECK_OP (0x0001) 435 #define MPI25_TA_EEDPFLAGS_STRIP_OP (0x0002) 436 #define MPI25_TA_EEDPFLAGS_CHECK_REMOVE_OP (0x0003) 437 #define MPI25_TA_EEDPFLAGS_INSERT_OP (0x0004) 438 #define MPI25_TA_EEDPFLAGS_REPLACE_OP (0x0006) 439 #define MPI25_TA_EEDPFLAGS_CHECK_REGEN_OP (0x0007) 440 441 442 /**************************************************************************** 443 * Target Status Send Request 444 ****************************************************************************/ 445 446 typedef struct _MPI2_TARGET_STATUS_SEND_REQUEST 447 { 448 U8 Reserved1; /* 0x00 */ 449 U8 StatusFlags; /* 0x01 */ 450 U8 ChainOffset; /* 0x02 */ 451 U8 Function; /* 0x03 */ 452 U16 QueueTag; /* 0x04 */ 453 U8 Reserved2; /* 0x06 */ 454 U8 MsgFlags; /* 0x07 */ 455 U8 VP_ID; /* 0x08 */ 456 U8 VF_ID; /* 0x09 */ 457 U16 Reserved3; /* 0x0A */ 458 U16 IoIndex; /* 0x0C */ 459 U16 InitiatorConnectionTag; /* 0x0E */ 460 U16 SGLFlags; /* 0x10 */ /* MPI v2.0 only. Reserved on MPI v2.5. */ 461 U16 Reserved4; /* 0x12 */ 462 U8 SGLOffset0; /* 0x14 */ 463 U8 Reserved5; /* 0x15 */ 464 U16 Reserved6; /* 0x16 */ 465 U32 Reserved7; /* 0x18 */ 466 U32 Reserved8; /* 0x1C */ 467 MPI2_SIMPLE_SGE_UNION StatusDataSGE; /* 0x20 */ /* MPI v2.5: This must be an IEEE Simple Element 64. */ 468 } MPI2_TARGET_STATUS_SEND_REQUEST, 469 MPI2_POINTER PTR_MPI2_TARGET_STATUS_SEND_REQUEST, 470 Mpi2TargetStatusSendRequest_t, MPI2_POINTER pMpi2TargetStatusSendRequest_t; 471 472 /* Target Status Send StatusFlags bits */ 473 474 #define MPI2_TSS_FLAGS_REPOST_CMD_BUFFER (0x80) 475 #define MPI2_TSS_FLAGS_RETRANSMIT (0x04) 476 #define MPI2_TSS_FLAGS_AUTO_GOOD_STATUS (0x01) 477 478 /* Target Status Send SGLFlags bits - MPI v2.0 only */ 479 /* Data Location Address Space */ 480 #define MPI2_TSS_SGLFLAGS_ADDR_MASK (0x0C) 481 #define MPI2_TSS_SGLFLAGS_SYSTEM_ADDR (0x00) 482 #define MPI2_TSS_SGLFLAGS_IOCDDR_ADDR (0x04) 483 #define MPI2_TSS_SGLFLAGS_IOCPLB_ADDR (0x08) 484 #define MPI2_TSS_SGLFLAGS_IOCPLBNTA_ADDR (0x0C) 485 /* Type */ 486 #define MPI2_TSS_SGLFLAGS_TYPE_MASK (0x03) 487 #define MPI2_TSS_SGLFLAGS_MPI_TYPE (0x00) 488 #define MPI2_TSS_SGLFLAGS_IEEE32_TYPE (0x01) 489 #define MPI2_TSS_SGLFLAGS_IEEE64_TYPE (0x02) 490 491 492 493 /* 494 * NOTE: The SSP status IU is big-endian. When used on a little-endian system, 495 * this structure properly orders the bytes. 496 */ 497 typedef struct _MPI2_TARGET_SSP_RSP_IU 498 { 499 U32 Reserved0[6]; /* reserved for SSP header */ /* 0x00 */ 500 501 /* start of RESPONSE information unit */ 502 U32 Reserved1; /* 0x18 */ 503 U32 Reserved2; /* 0x1C */ 504 U16 Reserved3; /* 0x20 */ 505 U8 DataPres; /* lower 2 bits */ /* 0x22 */ 506 U8 Status; /* 0x23 */ 507 U32 Reserved4; /* 0x24 */ 508 U32 SenseDataLength; /* 0x28 */ 509 U32 ResponseDataLength; /* 0x2C */ 510 511 /* start of Response or Sense Data (size may vary dynamically) */ 512 U8 ResponseSenseData[4]; /* 0x30 */ 513 } MPI2_TARGET_SSP_RSP_IU, MPI2_POINTER PTR_MPI2_TARGET_SSP_RSP_IU, 514 Mpi2TargetSspRspIu_t, MPI2_POINTER pMpi2TargetSspRspIu_t; 515 516 517 /**************************************************************************** 518 * Target Standard Reply - used with Target Assist or Target Status Send 519 ****************************************************************************/ 520 521 typedef struct _MPI2_TARGET_STANDARD_REPLY 522 { 523 U16 Reserved; /* 0x00 */ 524 U8 MsgLength; /* 0x02 */ 525 U8 Function; /* 0x03 */ 526 U16 Reserved1; /* 0x04 */ 527 U8 Reserved2; /* 0x06 */ 528 U8 MsgFlags; /* 0x07 */ 529 U8 VP_ID; /* 0x08 */ 530 U8 VF_ID; /* 0x09 */ 531 U16 Reserved3; /* 0x0A */ 532 U16 Reserved4; /* 0x0C */ 533 U16 IOCStatus; /* 0x0E */ 534 U32 IOCLogInfo; /* 0x10 */ 535 U16 IoIndex; /* 0x14 */ 536 U16 Reserved5; /* 0x16 */ 537 U32 TransferCount; /* 0x18 */ 538 U32 BidirectionalTransferCount; /* 0x1C */ 539 } MPI2_TARGET_STANDARD_REPLY, MPI2_POINTER PTR_MPI2_TARGET_STANDARD_REPLY, 540 Mpi2TargetErrorReply_t, MPI2_POINTER pMpi2TargetErrorReply_t; 541 542 543 /**************************************************************************** 544 * Target Mode Abort Request 545 ****************************************************************************/ 546 547 typedef struct _MPI2_TARGET_MODE_ABORT_REQUEST 548 { 549 U8 AbortType; /* 0x00 */ 550 U8 Reserved1; /* 0x01 */ 551 U8 ChainOffset; /* 0x02 */ 552 U8 Function; /* 0x03 */ 553 U16 Reserved2; /* 0x04 */ 554 U8 Reserved3; /* 0x06 */ 555 U8 MsgFlags; /* 0x07 */ 556 U8 VP_ID; /* 0x08 */ 557 U8 VF_ID; /* 0x09 */ 558 U16 Reserved4; /* 0x0A */ 559 U16 IoIndexToAbort; /* 0x0C */ 560 U16 InitiatorDevHandle; /* 0x0E */ 561 U32 MidToAbort; /* 0x10 */ 562 } MPI2_TARGET_MODE_ABORT, MPI2_POINTER PTR_MPI2_TARGET_MODE_ABORT, 563 Mpi2TargetModeAbort_t, MPI2_POINTER pMpi2TargetModeAbort_t; 564 565 /* Target Mode Abort AbortType values */ 566 567 #define MPI2_TARGET_MODE_ABORT_ALL_CMD_BUFFERS (0x00) 568 #define MPI2_TARGET_MODE_ABORT_ALL_IO (0x01) 569 #define MPI2_TARGET_MODE_ABORT_EXACT_IO (0x02) 570 #define MPI2_TARGET_MODE_ABORT_EXACT_IO_REQUEST (0x03) 571 #define MPI2_TARGET_MODE_ABORT_IO_REQUEST_AND_IO (0x04) 572 #define MPI2_TARGET_MODE_ABORT_DEVHANDLE (0x05) 573 #define MPI2_TARGET_MODE_ABORT_ALL_COMMANDS (0x06) 574 575 576 /**************************************************************************** 577 * Target Mode Abort Reply 578 ****************************************************************************/ 579 580 typedef struct _MPI2_TARGET_MODE_ABORT_REPLY 581 { 582 U16 Reserved; /* 0x00 */ 583 U8 MsgLength; /* 0x02 */ 584 U8 Function; /* 0x03 */ 585 U16 Reserved1; /* 0x04 */ 586 U8 Reserved2; /* 0x06 */ 587 U8 MsgFlags; /* 0x07 */ 588 U8 VP_ID; /* 0x08 */ 589 U8 VF_ID; /* 0x09 */ 590 U16 Reserved3; /* 0x0A */ 591 U16 Reserved4; /* 0x0C */ 592 U16 IOCStatus; /* 0x0E */ 593 U32 IOCLogInfo; /* 0x10 */ 594 U32 AbortCount; /* 0x14 */ 595 } MPI2_TARGET_MODE_ABORT_REPLY, MPI2_POINTER PTR_MPI2_TARGET_MODE_ABORT_REPLY, 596 Mpi2TargetModeAbortReply_t, MPI2_POINTER pMpi2TargetModeAbortReply_t; 597 598 599 #endif 600 601