18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2000-2008 LSI Corporation. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Name: mpi_targ.h 78c2ecf20Sopenharmony_ci * Title: MPI Target mode messages and structures 88c2ecf20Sopenharmony_ci * Creation Date: June 22, 2000 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * mpi_targ.h Version: 01.05.06 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Version History 138c2ecf20Sopenharmony_ci * --------------- 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * Date Version Description 168c2ecf20Sopenharmony_ci * -------- -------- ------------------------------------------------------ 178c2ecf20Sopenharmony_ci * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 188c2ecf20Sopenharmony_ci * 06-06-00 01.00.01 Update version number for 1.0 release. 198c2ecf20Sopenharmony_ci * 06-22-00 01.00.02 Added _MSG_TARGET_CMD_BUFFER_POST_REPLY structure. 208c2ecf20Sopenharmony_ci * Corrected DECSRIPTOR typo to DESCRIPTOR. 218c2ecf20Sopenharmony_ci * 11-02-00 01.01.01 Original release for post 1.0 work 228c2ecf20Sopenharmony_ci * Modified target mode to use IoIndex instead of 238c2ecf20Sopenharmony_ci * HostIndex and IocIndex. Added Alias. 248c2ecf20Sopenharmony_ci * 01-09-01 01.01.02 Added defines for TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER 258c2ecf20Sopenharmony_ci * and TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER. 268c2ecf20Sopenharmony_ci * 02-20-01 01.01.03 Started using MPI_POINTER. 278c2ecf20Sopenharmony_ci * Added structures for MPI_TARGET_SCSI_SPI_CMD_BUFFER and 288c2ecf20Sopenharmony_ci * MPI_TARGET_FCP_CMD_BUFFER. 298c2ecf20Sopenharmony_ci * 03-27-01 01.01.04 Added structure offset comments. 308c2ecf20Sopenharmony_ci * 08-08-01 01.02.01 Original release for v1.2 work. 318c2ecf20Sopenharmony_ci * 09-28-01 01.02.02 Added structure for MPI_TARGET_SCSI_SPI_STATUS_IU. 328c2ecf20Sopenharmony_ci * Added PriorityReason field to some replies and 338c2ecf20Sopenharmony_ci * defined more PriorityReason codes. 348c2ecf20Sopenharmony_ci * Added some defines for to support previous version 358c2ecf20Sopenharmony_ci * of MPI. 368c2ecf20Sopenharmony_ci * 10-04-01 01.02.03 Added PriorityReason to MSG_TARGET_ERROR_REPLY. 378c2ecf20Sopenharmony_ci * 11-01-01 01.02.04 Added define for TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY. 388c2ecf20Sopenharmony_ci * 03-14-02 01.02.05 Modified MPI_TARGET_FCP_RSP_BUFFER to get the proper 398c2ecf20Sopenharmony_ci * byte ordering. 408c2ecf20Sopenharmony_ci * 05-31-02 01.02.06 Modified TARGET_MODE_REPLY_ALIAS_MASK to only include 418c2ecf20Sopenharmony_ci * one bit. 428c2ecf20Sopenharmony_ci * Added AliasIndex field to MPI_TARGET_FCP_CMD_BUFFER. 438c2ecf20Sopenharmony_ci * 09-16-02 01.02.07 Added flags for confirmed completion. 448c2ecf20Sopenharmony_ci * Added PRIORITY_REASON_TARGET_BUSY. 458c2ecf20Sopenharmony_ci * 11-15-02 01.02.08 Added AliasID field to MPI_TARGET_SCSI_SPI_CMD_BUFFER. 468c2ecf20Sopenharmony_ci * 04-01-03 01.02.09 Added OptionalOxid field to MPI_TARGET_FCP_CMD_BUFFER. 478c2ecf20Sopenharmony_ci * 05-11-04 01.03.01 Original release for MPI v1.3. 488c2ecf20Sopenharmony_ci * 08-19-04 01.05.01 Added new request message structures for 498c2ecf20Sopenharmony_ci * MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, 508c2ecf20Sopenharmony_ci * MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, and 518c2ecf20Sopenharmony_ci * MSG_TARGET_ASSIST_EXT_REQUEST. 528c2ecf20Sopenharmony_ci * Added new structures for SAS SSP Command buffer, SSP 538c2ecf20Sopenharmony_ci * Task buffer, and SSP Status IU. 548c2ecf20Sopenharmony_ci * 10-05-04 01.05.02 MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY added. 558c2ecf20Sopenharmony_ci * 02-22-05 01.05.03 Changed a comment. 568c2ecf20Sopenharmony_ci * 03-11-05 01.05.04 Removed TargetAssistExtended Request. 578c2ecf20Sopenharmony_ci * 06-24-05 01.05.05 Added TargetAssistExtended structures and defines. 588c2ecf20Sopenharmony_ci * 03-27-06 01.05.06 Added a comment. 598c2ecf20Sopenharmony_ci * -------------------------------------------------------------------------- 608c2ecf20Sopenharmony_ci */ 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#ifndef MPI_TARG_H 638c2ecf20Sopenharmony_ci#define MPI_TARG_H 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci/****************************************************************************** 678c2ecf20Sopenharmony_ci* 688c2ecf20Sopenharmony_ci* S C S I T a r g e t M e s s a g e s 698c2ecf20Sopenharmony_ci* 708c2ecf20Sopenharmony_ci*******************************************************************************/ 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_citypedef struct _CMD_BUFFER_DESCRIPTOR 738c2ecf20Sopenharmony_ci{ 748c2ecf20Sopenharmony_ci U16 IoIndex; /* 00h */ 758c2ecf20Sopenharmony_ci U16 Reserved; /* 02h */ 768c2ecf20Sopenharmony_ci union /* 04h */ 778c2ecf20Sopenharmony_ci { 788c2ecf20Sopenharmony_ci U32 PhysicalAddress32; 798c2ecf20Sopenharmony_ci U64 PhysicalAddress64; 808c2ecf20Sopenharmony_ci } u; 818c2ecf20Sopenharmony_ci} CMD_BUFFER_DESCRIPTOR, MPI_POINTER PTR_CMD_BUFFER_DESCRIPTOR, 828c2ecf20Sopenharmony_ci CmdBufferDescriptor_t, MPI_POINTER pCmdBufferDescriptor_t; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci/****************************************************************************/ 868c2ecf20Sopenharmony_ci/* Target Command Buffer Post Request */ 878c2ecf20Sopenharmony_ci/****************************************************************************/ 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUFFER_POST_REQUEST 908c2ecf20Sopenharmony_ci{ 918c2ecf20Sopenharmony_ci U8 BufferPostFlags; /* 00h */ 928c2ecf20Sopenharmony_ci U8 BufferCount; /* 01h */ 938c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 948c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 958c2ecf20Sopenharmony_ci U8 BufferLength; /* 04h */ 968c2ecf20Sopenharmony_ci U8 Reserved; /* 05h */ 978c2ecf20Sopenharmony_ci U8 Reserved1; /* 06h */ 988c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 998c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1008c2ecf20Sopenharmony_ci CMD_BUFFER_DESCRIPTOR Buffer[1]; /* 0Ch */ 1018c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REQUEST, 1028c2ecf20Sopenharmony_ci TargetCmdBufferPostRequest_t, MPI_POINTER pTargetCmdBufferPostRequest_t; 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_FLAGS_PORT_MASK (0x01) 1058c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_FLAGS_ADDR_MODE_MASK (0x80) 1068c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_FLAGS_ADDR_MODE_32 (0) 1078c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_FLAGS_ADDR_MODE_64 (1) 1088c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_FLAGS_64_BIT_ADDR (0x80) 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_IO_INDEX_MASK (0x00003FFF) 1118c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_IO_INDEX_MASK_0100 (0x000003FF) /* obsolete */ 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY 1158c2ecf20Sopenharmony_ci{ 1168c2ecf20Sopenharmony_ci U8 BufferPostFlags; /* 00h */ 1178c2ecf20Sopenharmony_ci U8 BufferCount; /* 01h */ 1188c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 1198c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1208c2ecf20Sopenharmony_ci U8 BufferLength; /* 04h */ 1218c2ecf20Sopenharmony_ci U8 Reserved; /* 05h */ 1228c2ecf20Sopenharmony_ci U8 Reserved1; /* 06h */ 1238c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 1248c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1258c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 1268c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 1278c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 1288c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REPLY, 1298c2ecf20Sopenharmony_ci TargetCmdBufferPostReply_t, MPI_POINTER pTargetCmdBufferPostReply_t; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* the following structure is obsolete as of MPI v1.2 */ 1328c2ecf20Sopenharmony_citypedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY 1338c2ecf20Sopenharmony_ci{ 1348c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 1358c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 1368c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1378c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 1388c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 1398c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 1408c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1418c2ecf20Sopenharmony_ci U8 PriorityReason; /* 0Ch */ 1428c2ecf20Sopenharmony_ci U8 Reserved3; /* 0Dh */ 1438c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 1448c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 1458c2ecf20Sopenharmony_ci U32 ReplyWord; /* 14h */ 1468c2ecf20Sopenharmony_ci} MSG_PRIORITY_CMD_RECEIVED_REPLY, MPI_POINTER PTR_MSG_PRIORITY_CMD_RECEIVED_REPLY, 1478c2ecf20Sopenharmony_ci PriorityCommandReceivedReply_t, MPI_POINTER pPriorityCommandReceivedReply_t; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY 1518c2ecf20Sopenharmony_ci{ 1528c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 1538c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 1548c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1558c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 1568c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 1578c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 1588c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1598c2ecf20Sopenharmony_ci U8 PriorityReason; /* 0Ch */ 1608c2ecf20Sopenharmony_ci U8 Reserved3; /* 0Dh */ 1618c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 1628c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 1638c2ecf20Sopenharmony_ci U32 ReplyWord; /* 14h */ 1648c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, 1658c2ecf20Sopenharmony_ci MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY, 1668c2ecf20Sopenharmony_ci TargetCmdBufferPostErrorReply_t, MPI_POINTER pTargetCmdBufferPostErrorReply_t; 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci#define PRIORITY_REASON_NO_DISCONNECT (0x00) 1698c2ecf20Sopenharmony_ci#define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01) 1708c2ecf20Sopenharmony_ci#define PRIORITY_REASON_CMD_PARITY_ERR (0x02) 1718c2ecf20Sopenharmony_ci#define PRIORITY_REASON_MSG_OUT_PARITY_ERR (0x03) 1728c2ecf20Sopenharmony_ci#define PRIORITY_REASON_LQ_CRC_ERR (0x04) 1738c2ecf20Sopenharmony_ci#define PRIORITY_REASON_CMD_CRC_ERR (0x05) 1748c2ecf20Sopenharmony_ci#define PRIORITY_REASON_PROTOCOL_ERR (0x06) 1758c2ecf20Sopenharmony_ci#define PRIORITY_REASON_DATA_OUT_PARITY_ERR (0x07) 1768c2ecf20Sopenharmony_ci#define PRIORITY_REASON_DATA_OUT_CRC_ERR (0x08) 1778c2ecf20Sopenharmony_ci#define PRIORITY_REASON_TARGET_BUSY (0x09) 1788c2ecf20Sopenharmony_ci#define PRIORITY_REASON_UNKNOWN (0xFF) 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci/****************************************************************************/ 1828c2ecf20Sopenharmony_ci/* Target Command Buffer Post Base Request */ 1838c2ecf20Sopenharmony_ci/****************************************************************************/ 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUF_POST_BASE_REQUEST 1868c2ecf20Sopenharmony_ci{ 1878c2ecf20Sopenharmony_ci U8 BufferPostFlags; /* 00h */ 1888c2ecf20Sopenharmony_ci U8 PortNumber; /* 01h */ 1898c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 1908c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1918c2ecf20Sopenharmony_ci U16 TotalCmdBuffers; /* 04h */ 1928c2ecf20Sopenharmony_ci U8 Reserved; /* 06h */ 1938c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 1948c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1958c2ecf20Sopenharmony_ci U32 Reserved1; /* 0Ch */ 1968c2ecf20Sopenharmony_ci U16 CmdBufferLength; /* 10h */ 1978c2ecf20Sopenharmony_ci U16 NextCmdBufferOffset; /* 12h */ 1988c2ecf20Sopenharmony_ci U32 BaseAddressLow; /* 14h */ 1998c2ecf20Sopenharmony_ci U32 BaseAddressHigh; /* 18h */ 2008c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, 2018c2ecf20Sopenharmony_ci MPI_POINTER PTR__MSG_TARGET_CMD_BUF_POST_BASE_REQUEST, 2028c2ecf20Sopenharmony_ci TargetCmdBufferPostBaseRequest_t, 2038c2ecf20Sopenharmony_ci MPI_POINTER pTargetCmdBufferPostBaseRequest_t; 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci#define CMD_BUFFER_POST_BASE_FLAGS_AUTO_POST_ALL (0x01) 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY 2098c2ecf20Sopenharmony_ci{ 2108c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 2118c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 2128c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 2138c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 2148c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 2158c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 2168c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 2178c2ecf20Sopenharmony_ci U16 Reserved3; /* 0Ch */ 2188c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 2198c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 2208c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY, 2218c2ecf20Sopenharmony_ci MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY, 2228c2ecf20Sopenharmony_ci TargetCmdBufferPostBaseListReply_t, 2238c2ecf20Sopenharmony_ci MPI_POINTER pTargetCmdBufferPostBaseListReply_t; 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci/****************************************************************************/ 2278c2ecf20Sopenharmony_ci/* Target Command Buffer Post List Request */ 2288c2ecf20Sopenharmony_ci/****************************************************************************/ 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_CMD_BUF_POST_LIST_REQUEST 2318c2ecf20Sopenharmony_ci{ 2328c2ecf20Sopenharmony_ci U8 Reserved; /* 00h */ 2338c2ecf20Sopenharmony_ci U8 PortNumber; /* 01h */ 2348c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 2358c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 2368c2ecf20Sopenharmony_ci U16 CmdBufferCount; /* 04h */ 2378c2ecf20Sopenharmony_ci U8 Reserved1; /* 06h */ 2388c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 2398c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 2408c2ecf20Sopenharmony_ci U32 Reserved2; /* 0Ch */ 2418c2ecf20Sopenharmony_ci U16 IoIndex[2]; /* 10h */ 2428c2ecf20Sopenharmony_ci} MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, 2438c2ecf20Sopenharmony_ci MPI_POINTER PTR_MSG_TARGET_CMD_BUF_POST_LIST_REQUEST, 2448c2ecf20Sopenharmony_ci TargetCmdBufferPostListRequest_t, 2458c2ecf20Sopenharmony_ci MPI_POINTER pTargetCmdBufferPostListRequest_t; 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ci/****************************************************************************/ 2498c2ecf20Sopenharmony_ci/* Command Buffer Formats (with 16 byte CDB) */ 2508c2ecf20Sopenharmony_ci/****************************************************************************/ 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_FCP_CMD_BUFFER 2538c2ecf20Sopenharmony_ci{ 2548c2ecf20Sopenharmony_ci U8 FcpLun[8]; /* 00h */ 2558c2ecf20Sopenharmony_ci U8 FcpCntl[4]; /* 08h */ 2568c2ecf20Sopenharmony_ci U8 FcpCdb[16]; /* 0Ch */ 2578c2ecf20Sopenharmony_ci U32 FcpDl; /* 1Ch */ 2588c2ecf20Sopenharmony_ci U8 AliasIndex; /* 20h */ 2598c2ecf20Sopenharmony_ci U8 Reserved1; /* 21h */ 2608c2ecf20Sopenharmony_ci U16 OptionalOxid; /* 22h */ 2618c2ecf20Sopenharmony_ci} MPI_TARGET_FCP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_CMD_BUFFER, 2628c2ecf20Sopenharmony_ci MpiTargetFcpCmdBuffer, MPI_POINTER pMpiTargetFcpCmdBuffer; 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_SCSI_SPI_CMD_BUFFER 2668c2ecf20Sopenharmony_ci{ 2678c2ecf20Sopenharmony_ci /* SPI L_Q information unit */ 2688c2ecf20Sopenharmony_ci U8 L_QType; /* 00h */ 2698c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 2708c2ecf20Sopenharmony_ci U16 Tag; /* 02h */ 2718c2ecf20Sopenharmony_ci U8 LogicalUnitNumber[8]; /* 04h */ 2728c2ecf20Sopenharmony_ci U32 DataLength; /* 0Ch */ 2738c2ecf20Sopenharmony_ci /* SPI command information unit */ 2748c2ecf20Sopenharmony_ci U8 ReservedFirstByteOfCommandIU; /* 10h */ 2758c2ecf20Sopenharmony_ci U8 TaskAttribute; /* 11h */ 2768c2ecf20Sopenharmony_ci U8 TaskManagementFlags; /* 12h */ 2778c2ecf20Sopenharmony_ci U8 AdditionalCDBLength; /* 13h */ 2788c2ecf20Sopenharmony_ci U8 CDB[16]; /* 14h */ 2798c2ecf20Sopenharmony_ci /* Alias ID */ 2808c2ecf20Sopenharmony_ci U8 AliasID; /* 24h */ 2818c2ecf20Sopenharmony_ci U8 Reserved1; /* 25h */ 2828c2ecf20Sopenharmony_ci U16 Reserved2; /* 26h */ 2838c2ecf20Sopenharmony_ci} MPI_TARGET_SCSI_SPI_CMD_BUFFER, 2848c2ecf20Sopenharmony_ci MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_CMD_BUFFER, 2858c2ecf20Sopenharmony_ci MpiTargetScsiSpiCmdBuffer, MPI_POINTER pMpiTargetScsiSpiCmdBuffer; 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_SSP_CMD_BUFFER 2898c2ecf20Sopenharmony_ci{ 2908c2ecf20Sopenharmony_ci U8 FrameType; /* 00h */ 2918c2ecf20Sopenharmony_ci U8 Reserved1; /* 01h */ 2928c2ecf20Sopenharmony_ci U16 Reserved2; /* 02h */ 2938c2ecf20Sopenharmony_ci U16 InitiatorTag; /* 04h */ 2948c2ecf20Sopenharmony_ci U16 DevHandle; /* 06h */ 2958c2ecf20Sopenharmony_ci /* COMMAND information unit starts here */ 2968c2ecf20Sopenharmony_ci U8 LogicalUnitNumber[8]; /* 08h */ 2978c2ecf20Sopenharmony_ci U8 Reserved3; /* 10h */ 2988c2ecf20Sopenharmony_ci U8 TaskAttribute; /* lower 3 bits */ /* 11h */ 2998c2ecf20Sopenharmony_ci U8 Reserved4; /* 12h */ 3008c2ecf20Sopenharmony_ci U8 AdditionalCDBLength; /* upper 5 bits */ /* 13h */ 3018c2ecf20Sopenharmony_ci U8 CDB[16]; /* 14h */ 3028c2ecf20Sopenharmony_ci /* Additional CDB bytes extend past the CDB field */ 3038c2ecf20Sopenharmony_ci} MPI_TARGET_SSP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_CMD_BUFFER, 3048c2ecf20Sopenharmony_ci MpiTargetSspCmdBuffer, MPI_POINTER pMpiTargetSspCmdBuffer; 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_SSP_TASK_BUFFER 3078c2ecf20Sopenharmony_ci{ 3088c2ecf20Sopenharmony_ci U8 FrameType; /* 00h */ 3098c2ecf20Sopenharmony_ci U8 Reserved1; /* 01h */ 3108c2ecf20Sopenharmony_ci U16 Reserved2; /* 02h */ 3118c2ecf20Sopenharmony_ci U16 InitiatorTag; /* 04h */ 3128c2ecf20Sopenharmony_ci U16 DevHandle; /* 06h */ 3138c2ecf20Sopenharmony_ci /* TASK information unit starts here */ 3148c2ecf20Sopenharmony_ci U8 LogicalUnitNumber[8]; /* 08h */ 3158c2ecf20Sopenharmony_ci U8 Reserved3; /* 10h */ 3168c2ecf20Sopenharmony_ci U8 Reserved4; /* 11h */ 3178c2ecf20Sopenharmony_ci U8 TaskManagementFunction; /* 12h */ 3188c2ecf20Sopenharmony_ci U8 Reserved5; /* 13h */ 3198c2ecf20Sopenharmony_ci U16 ManagedTaskTag; /* 14h */ 3208c2ecf20Sopenharmony_ci U16 Reserved6; /* 16h */ 3218c2ecf20Sopenharmony_ci U32 Reserved7; /* 18h */ 3228c2ecf20Sopenharmony_ci U32 Reserved8; /* 1Ch */ 3238c2ecf20Sopenharmony_ci U32 Reserved9; /* 20h */ 3248c2ecf20Sopenharmony_ci} MPI_TARGET_SSP_TASK_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_TASK_BUFFER, 3258c2ecf20Sopenharmony_ci MpiTargetSspTaskBuffer, MPI_POINTER pMpiTargetSspTaskBuffer; 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci/****************************************************************************/ 3298c2ecf20Sopenharmony_ci/* Target Assist Request */ 3308c2ecf20Sopenharmony_ci/****************************************************************************/ 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_ASSIST_REQUEST 3338c2ecf20Sopenharmony_ci{ 3348c2ecf20Sopenharmony_ci U8 StatusCode; /* 00h */ 3358c2ecf20Sopenharmony_ci U8 TargetAssistFlags; /* 01h */ 3368c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 3378c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3388c2ecf20Sopenharmony_ci U16 QueueTag; /* 04h */ 3398c2ecf20Sopenharmony_ci U8 Reserved; /* 06h */ 3408c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3418c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3428c2ecf20Sopenharmony_ci U32 ReplyWord; /* 0Ch */ 3438c2ecf20Sopenharmony_ci U8 LUN[8]; /* 10h */ 3448c2ecf20Sopenharmony_ci U32 RelativeOffset; /* 18h */ 3458c2ecf20Sopenharmony_ci U32 DataLength; /* 1Ch */ 3468c2ecf20Sopenharmony_ci SGE_IO_UNION SGL[1]; /* 20h */ 3478c2ecf20Sopenharmony_ci} MSG_TARGET_ASSIST_REQUEST, MPI_POINTER PTR_MSG_TARGET_ASSIST_REQUEST, 3488c2ecf20Sopenharmony_ci TargetAssistRequest_t, MPI_POINTER pTargetAssistRequest_t; 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci#define TARGET_ASSIST_FLAGS_DATA_DIRECTION (0x01) 3518c2ecf20Sopenharmony_ci#define TARGET_ASSIST_FLAGS_AUTO_STATUS (0x02) 3528c2ecf20Sopenharmony_ci#define TARGET_ASSIST_FLAGS_HIGH_PRIORITY (0x04) 3538c2ecf20Sopenharmony_ci#define TARGET_ASSIST_FLAGS_CONFIRMED (0x08) 3548c2ecf20Sopenharmony_ci#define TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80) 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci/* Standard Target Mode Reply message */ 3578c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_ERROR_REPLY 3588c2ecf20Sopenharmony_ci{ 3598c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 3608c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 3618c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3628c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 3638c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 3648c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3658c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3668c2ecf20Sopenharmony_ci U8 PriorityReason; /* 0Ch */ 3678c2ecf20Sopenharmony_ci U8 Reserved3; /* 0Dh */ 3688c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 3698c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 3708c2ecf20Sopenharmony_ci U32 ReplyWord; /* 14h */ 3718c2ecf20Sopenharmony_ci U32 TransferCount; /* 18h */ 3728c2ecf20Sopenharmony_ci} MSG_TARGET_ERROR_REPLY, MPI_POINTER PTR_MSG_TARGET_ERROR_REPLY, 3738c2ecf20Sopenharmony_ci TargetErrorReply_t, MPI_POINTER pTargetErrorReply_t; 3748c2ecf20Sopenharmony_ci 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci/****************************************************************************/ 3778c2ecf20Sopenharmony_ci/* Target Assist Extended Request */ 3788c2ecf20Sopenharmony_ci/****************************************************************************/ 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_ASSIST_EXT_REQUEST 3818c2ecf20Sopenharmony_ci{ 3828c2ecf20Sopenharmony_ci U8 StatusCode; /* 00h */ 3838c2ecf20Sopenharmony_ci U8 TargetAssistFlags; /* 01h */ 3848c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 3858c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3868c2ecf20Sopenharmony_ci U16 QueueTag; /* 04h */ 3878c2ecf20Sopenharmony_ci U8 Reserved1; /* 06h */ 3888c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3898c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3908c2ecf20Sopenharmony_ci U32 ReplyWord; /* 0Ch */ 3918c2ecf20Sopenharmony_ci U8 LUN[8]; /* 10h */ 3928c2ecf20Sopenharmony_ci U32 RelativeOffset; /* 18h */ 3938c2ecf20Sopenharmony_ci U32 Reserved2; /* 1Ch */ 3948c2ecf20Sopenharmony_ci U32 Reserved3; /* 20h */ 3958c2ecf20Sopenharmony_ci U32 PrimaryReferenceTag; /* 24h */ 3968c2ecf20Sopenharmony_ci U16 PrimaryApplicationTag; /* 28h */ 3978c2ecf20Sopenharmony_ci U16 PrimaryApplicationTagMask; /* 2Ah */ 3988c2ecf20Sopenharmony_ci U32 Reserved4; /* 2Ch */ 3998c2ecf20Sopenharmony_ci U32 DataLength; /* 30h */ 4008c2ecf20Sopenharmony_ci U32 BidirectionalDataLength; /* 34h */ 4018c2ecf20Sopenharmony_ci U32 SecondaryReferenceTag; /* 38h */ 4028c2ecf20Sopenharmony_ci U16 SecondaryApplicationTag; /* 3Ch */ 4038c2ecf20Sopenharmony_ci U16 Reserved5; /* 3Eh */ 4048c2ecf20Sopenharmony_ci U16 EEDPFlags; /* 40h */ 4058c2ecf20Sopenharmony_ci U16 ApplicationTagTranslationMask; /* 42h */ 4068c2ecf20Sopenharmony_ci U32 EEDPBlockSize; /* 44h */ 4078c2ecf20Sopenharmony_ci U8 SGLOffset0; /* 48h */ 4088c2ecf20Sopenharmony_ci U8 SGLOffset1; /* 49h */ 4098c2ecf20Sopenharmony_ci U8 SGLOffset2; /* 4Ah */ 4108c2ecf20Sopenharmony_ci U8 SGLOffset3; /* 4Bh */ 4118c2ecf20Sopenharmony_ci U32 Reserved6; /* 4Ch */ 4128c2ecf20Sopenharmony_ci SGE_IO_UNION SGL[1]; /* 50h */ 4138c2ecf20Sopenharmony_ci} MSG_TARGET_ASSIST_EXT_REQUEST, MPI_POINTER PTR_MSG_TARGET_ASSIST_EXT_REQUEST, 4148c2ecf20Sopenharmony_ci TargetAssistExtRequest_t, MPI_POINTER pTargetAssistExtRequest_t; 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_ci/* see the defines after MSG_TARGET_ASSIST_REQUEST for TargetAssistFlags */ 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ci/* defines for the MsgFlags field */ 4198c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_MSGFLAGS_BIDIRECTIONAL (0x20) 4208c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_MSGFLAGS_MULTICAST (0x10) 4218c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_MSGFLAGS_SGL_OFFSET_CHAINS (0x08) 4228c2ecf20Sopenharmony_ci 4238c2ecf20Sopenharmony_ci/* defines for the EEDPFlags field */ 4248c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_MASK_OP (0x0007) 4258c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_NOOP_OP (0x0000) 4268c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_CHK_OP (0x0001) 4278c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_STRIP_OP (0x0002) 4288c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_CHKRM_OP (0x0003) 4298c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_INSERT_OP (0x0004) 4308c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_REPLACE_OP (0x0006) 4318c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_CHKREGEN_OP (0x0007) 4328c2ecf20Sopenharmony_ci 4338c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_PASS_REF_TAG (0x0008) 4348c2ecf20Sopenharmony_ci 4358c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_T10_CHK_MASK (0x0700) 4368c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_T10_CHK_GUARD (0x0100) 4378c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_T10_CHK_APPTAG (0x0200) 4388c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_T10_CHK_REFTAG (0x0400) 4398c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_T10_CHK_SHIFT (8) 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_INC_SEC_APPTAG (0x1000) 4428c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_INC_PRI_APPTAG (0x2000) 4438c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_INC_SEC_REFTAG (0x4000) 4448c2ecf20Sopenharmony_ci#define TARGET_ASSIST_EXT_EEDP_INC_PRI_REFTAG (0x8000) 4458c2ecf20Sopenharmony_ci 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ci/****************************************************************************/ 4488c2ecf20Sopenharmony_ci/* Target Status Send Request */ 4498c2ecf20Sopenharmony_ci/****************************************************************************/ 4508c2ecf20Sopenharmony_ci 4518c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_STATUS_SEND_REQUEST 4528c2ecf20Sopenharmony_ci{ 4538c2ecf20Sopenharmony_ci U8 StatusCode; /* 00h */ 4548c2ecf20Sopenharmony_ci U8 StatusFlags; /* 01h */ 4558c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 4568c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4578c2ecf20Sopenharmony_ci U16 QueueTag; /* 04h */ 4588c2ecf20Sopenharmony_ci U8 Reserved; /* 06h */ 4598c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4608c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4618c2ecf20Sopenharmony_ci U32 ReplyWord; /* 0Ch */ 4628c2ecf20Sopenharmony_ci U8 LUN[8]; /* 10h */ 4638c2ecf20Sopenharmony_ci SGE_SIMPLE_UNION StatusDataSGE; /* 18h */ 4648c2ecf20Sopenharmony_ci} MSG_TARGET_STATUS_SEND_REQUEST, MPI_POINTER PTR_MSG_TARGET_STATUS_SEND_REQUEST, 4658c2ecf20Sopenharmony_ci TargetStatusSendRequest_t, MPI_POINTER pTargetStatusSendRequest_t; 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_ci#define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01) 4688c2ecf20Sopenharmony_ci#define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04) 4698c2ecf20Sopenharmony_ci#define TARGET_STATUS_SEND_FLAGS_CONFIRMED (0x08) 4708c2ecf20Sopenharmony_ci#define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80) 4718c2ecf20Sopenharmony_ci 4728c2ecf20Sopenharmony_ci/* 4738c2ecf20Sopenharmony_ci * NOTE: FCP_RSP data is big-endian. When used on a little-endian system, this 4748c2ecf20Sopenharmony_ci * structure properly orders the bytes. 4758c2ecf20Sopenharmony_ci */ 4768c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_FCP_RSP_BUFFER 4778c2ecf20Sopenharmony_ci{ 4788c2ecf20Sopenharmony_ci U8 Reserved0[8]; /* 00h */ 4798c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 08h */ 4808c2ecf20Sopenharmony_ci U8 FcpFlags; /* 0Ah */ 4818c2ecf20Sopenharmony_ci U8 FcpStatus; /* 0Bh */ 4828c2ecf20Sopenharmony_ci U32 FcpResid; /* 0Ch */ 4838c2ecf20Sopenharmony_ci U32 FcpSenseLength; /* 10h */ 4848c2ecf20Sopenharmony_ci U32 FcpResponseLength; /* 14h */ 4858c2ecf20Sopenharmony_ci U8 FcpResponseData[8]; /* 18h */ 4868c2ecf20Sopenharmony_ci U8 FcpSenseData[32]; /* Pad to 64 bytes */ /* 20h */ 4878c2ecf20Sopenharmony_ci} MPI_TARGET_FCP_RSP_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_RSP_BUFFER, 4888c2ecf20Sopenharmony_ci MpiTargetFcpRspBuffer, MPI_POINTER pMpiTargetFcpRspBuffer; 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci/* 4918c2ecf20Sopenharmony_ci * NOTE: The SPI status IU is big-endian. When used on a little-endian system, 4928c2ecf20Sopenharmony_ci * this structure properly orders the bytes. 4938c2ecf20Sopenharmony_ci */ 4948c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU 4958c2ecf20Sopenharmony_ci{ 4968c2ecf20Sopenharmony_ci U8 Reserved0; /* 00h */ 4978c2ecf20Sopenharmony_ci U8 Reserved1; /* 01h */ 4988c2ecf20Sopenharmony_ci U8 Valid; /* 02h */ 4998c2ecf20Sopenharmony_ci U8 Status; /* 03h */ 5008c2ecf20Sopenharmony_ci U32 SenseDataListLength; /* 04h */ 5018c2ecf20Sopenharmony_ci U32 PktFailuresListLength; /* 08h */ 5028c2ecf20Sopenharmony_ci U8 SenseData[52]; /* Pad the IU to 64 bytes */ /* 0Ch */ 5038c2ecf20Sopenharmony_ci} MPI_TARGET_SCSI_SPI_STATUS_IU, MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_STATUS_IU, 5048c2ecf20Sopenharmony_ci TargetScsiSpiStatusIU_t, MPI_POINTER pTargetScsiSpiStatusIU_t; 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci/* 5078c2ecf20Sopenharmony_ci * NOTE: The SSP status IU is big-endian. When used on a little-endian system, 5088c2ecf20Sopenharmony_ci * this structure properly orders the bytes. 5098c2ecf20Sopenharmony_ci */ 5108c2ecf20Sopenharmony_citypedef struct _MPI_TARGET_SSP_RSP_IU 5118c2ecf20Sopenharmony_ci{ 5128c2ecf20Sopenharmony_ci U32 Reserved0[6]; /* reserved for SSP header */ /* 00h */ 5138c2ecf20Sopenharmony_ci /* start of RESPONSE information unit */ 5148c2ecf20Sopenharmony_ci U32 Reserved1; /* 18h */ 5158c2ecf20Sopenharmony_ci U32 Reserved2; /* 1Ch */ 5168c2ecf20Sopenharmony_ci U16 Reserved3; /* 20h */ 5178c2ecf20Sopenharmony_ci U8 DataPres; /* lower 2 bits */ /* 22h */ 5188c2ecf20Sopenharmony_ci U8 Status; /* 23h */ 5198c2ecf20Sopenharmony_ci U32 Reserved4; /* 24h */ 5208c2ecf20Sopenharmony_ci U32 SenseDataLength; /* 28h */ 5218c2ecf20Sopenharmony_ci U32 ResponseDataLength; /* 2Ch */ 5228c2ecf20Sopenharmony_ci U8 ResponseSenseData[4]; /* 30h */ 5238c2ecf20Sopenharmony_ci} MPI_TARGET_SSP_RSP_IU, MPI_POINTER PTR_MPI_TARGET_SSP_RSP_IU, 5248c2ecf20Sopenharmony_ci MpiTargetSspRspIu_t, MPI_POINTER pMpiTargetSspRspIu_t; 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_ci/****************************************************************************/ 5288c2ecf20Sopenharmony_ci/* Target Mode Abort Request */ 5298c2ecf20Sopenharmony_ci/****************************************************************************/ 5308c2ecf20Sopenharmony_ci 5318c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_MODE_ABORT_REQUEST 5328c2ecf20Sopenharmony_ci{ 5338c2ecf20Sopenharmony_ci U8 AbortType; /* 00h */ 5348c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 5358c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 5368c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 5378c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 5388c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 5398c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 5408c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 5418c2ecf20Sopenharmony_ci U32 ReplyWord; /* 0Ch */ 5428c2ecf20Sopenharmony_ci U32 MsgContextToAbort; /* 10h */ 5438c2ecf20Sopenharmony_ci} MSG_TARGET_MODE_ABORT, MPI_POINTER PTR_MSG_TARGET_MODE_ABORT, 5448c2ecf20Sopenharmony_ci TargetModeAbort_t, MPI_POINTER pTargetModeAbort_t; 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ci#define TARGET_MODE_ABORT_TYPE_ALL_CMD_BUFFERS (0x00) 5478c2ecf20Sopenharmony_ci#define TARGET_MODE_ABORT_TYPE_ALL_IO (0x01) 5488c2ecf20Sopenharmony_ci#define TARGET_MODE_ABORT_TYPE_EXACT_IO (0x02) 5498c2ecf20Sopenharmony_ci#define TARGET_MODE_ABORT_TYPE_EXACT_IO_REQUEST (0x03) 5508c2ecf20Sopenharmony_ci 5518c2ecf20Sopenharmony_ci/* Target Mode Abort Reply */ 5528c2ecf20Sopenharmony_ci 5538c2ecf20Sopenharmony_citypedef struct _MSG_TARGET_MODE_ABORT_REPLY 5548c2ecf20Sopenharmony_ci{ 5558c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 5568c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 5578c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 5588c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 5598c2ecf20Sopenharmony_ci U8 Reserved2; /* 06h */ 5608c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 5618c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 5628c2ecf20Sopenharmony_ci U16 Reserved3; /* 0Ch */ 5638c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 5648c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 5658c2ecf20Sopenharmony_ci U32 AbortCount; /* 14h */ 5668c2ecf20Sopenharmony_ci} MSG_TARGET_MODE_ABORT_REPLY, MPI_POINTER PTR_MSG_TARGET_MODE_ABORT_REPLY, 5678c2ecf20Sopenharmony_ci TargetModeAbortReply_t, MPI_POINTER pTargetModeAbortReply_t; 5688c2ecf20Sopenharmony_ci 5698c2ecf20Sopenharmony_ci 5708c2ecf20Sopenharmony_ci/****************************************************************************/ 5718c2ecf20Sopenharmony_ci/* Target Mode Context Reply */ 5728c2ecf20Sopenharmony_ci/****************************************************************************/ 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_IO_INDEX_MASK (0x00003FFF) 5758c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_IO_INDEX_SHIFT (0) 5768c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_INITIATOR_INDEX_MASK (0x03FFC000) 5778c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT (14) 5788c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_ALIAS_MASK (0x04000000) 5798c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_ALIAS_SHIFT (26) 5808c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_PORT_MASK (0x10000000) 5818c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_PORT_SHIFT (28) 5828c2ecf20Sopenharmony_ci 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_ci#define GET_IO_INDEX(x) (((x) & TARGET_MODE_REPLY_IO_INDEX_MASK) \ 5858c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_IO_INDEX_SHIFT) 5868c2ecf20Sopenharmony_ci 5878c2ecf20Sopenharmony_ci#define SET_IO_INDEX(t, i) \ 5888c2ecf20Sopenharmony_ci ((t) = ((t) & ~TARGET_MODE_REPLY_IO_INDEX_MASK) | \ 5898c2ecf20Sopenharmony_ci (((i) << TARGET_MODE_REPLY_IO_INDEX_SHIFT) & \ 5908c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_IO_INDEX_MASK)) 5918c2ecf20Sopenharmony_ci 5928c2ecf20Sopenharmony_ci#define GET_INITIATOR_INDEX(x) (((x) & TARGET_MODE_REPLY_INITIATOR_INDEX_MASK) \ 5938c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT) 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci#define SET_INITIATOR_INDEX(t, ii) \ 5968c2ecf20Sopenharmony_ci ((t) = ((t) & ~TARGET_MODE_REPLY_INITIATOR_INDEX_MASK) | \ 5978c2ecf20Sopenharmony_ci (((ii) << TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT) & \ 5988c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_INITIATOR_INDEX_MASK)) 5998c2ecf20Sopenharmony_ci 6008c2ecf20Sopenharmony_ci#define GET_ALIAS(x) (((x) & TARGET_MODE_REPLY_ALIAS_MASK) \ 6018c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_ALIAS_SHIFT) 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci#define SET_ALIAS(t, a) ((t) = ((t) & ~TARGET_MODE_REPLY_ALIAS_MASK) | \ 6048c2ecf20Sopenharmony_ci (((a) << TARGET_MODE_REPLY_ALIAS_SHIFT) & \ 6058c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_ALIAS_MASK)) 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_ci#define GET_PORT(x) (((x) & TARGET_MODE_REPLY_PORT_MASK) \ 6088c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_PORT_SHIFT) 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci#define SET_PORT(t, p) ((t) = ((t) & ~TARGET_MODE_REPLY_PORT_MASK) | \ 6118c2ecf20Sopenharmony_ci (((p) << TARGET_MODE_REPLY_PORT_SHIFT) & \ 6128c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_PORT_MASK)) 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci/* the following obsolete values are for MPI v1.0 support */ 6158c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_MASK_HOST_INDEX (0x000003FF) 6168c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX (0) 6178c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_MASK_IOC_INDEX (0x001FF800) 6188c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX (11) 6198c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_PORT_MASK (0x00400000) 6208c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_PORT_SHIFT (22) 6218c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX (0x1F800000) 6228c2ecf20Sopenharmony_ci#define TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX (23) 6238c2ecf20Sopenharmony_ci 6248c2ecf20Sopenharmony_ci#define GET_HOST_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) \ 6258c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX) 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci#define SET_HOST_INDEX_0100(t, hi) \ 6288c2ecf20Sopenharmony_ci ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) | \ 6298c2ecf20Sopenharmony_ci (((hi) << TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX) & \ 6308c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_0100_MASK_HOST_INDEX)) 6318c2ecf20Sopenharmony_ci 6328c2ecf20Sopenharmony_ci#define GET_IOC_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) \ 6338c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX) 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_ci#define SET_IOC_INDEX_0100(t, ii) \ 6368c2ecf20Sopenharmony_ci ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) | \ 6378c2ecf20Sopenharmony_ci (((ii) << TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX) & \ 6388c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_0100_MASK_IOC_INDEX)) 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ci#define GET_INITIATOR_INDEX_0100(x) \ 6418c2ecf20Sopenharmony_ci (((x) & TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) \ 6428c2ecf20Sopenharmony_ci >> TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX) 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci#define SET_INITIATOR_INDEX_0100(t, ii) \ 6458c2ecf20Sopenharmony_ci ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) | \ 6468c2ecf20Sopenharmony_ci (((ii) << TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX) & \ 6478c2ecf20Sopenharmony_ci TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX)) 6488c2ecf20Sopenharmony_ci 6498c2ecf20Sopenharmony_ci 6508c2ecf20Sopenharmony_ci#endif 6518c2ecf20Sopenharmony_ci 652