19b631363SMatt Jacob /* $FreeBSD$ */ 2098ca2bdSWarner Losh /*- 3*7282444bSPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 4*7282444bSPedro F. Giffuni * 512af29abSMarius Strobl * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors. 6b0a2fdeeSScott Long * All rights reserved. 7d3ecac66SMatt Jacob * 8d3ecac66SMatt Jacob * Redistribution and use in source and binary forms, with or without 9b0a2fdeeSScott Long * modification, are permitted provided that the following conditions are 10b0a2fdeeSScott Long * met: 11d3ecac66SMatt Jacob * 1. Redistributions of source code must retain the above copyright 12b0a2fdeeSScott Long * notice, this list of conditions and the following disclaimer. 13b0a2fdeeSScott Long * 2. Redistributions in binary form must reproduce at minimum a disclaimer 14b0a2fdeeSScott Long * substantially similar to the "NO WARRANTY" disclaimer below 15b0a2fdeeSScott Long * ("Disclaimer") and any redistribution must be conditioned upon including 16b0a2fdeeSScott Long * a substantially similar Disclaimer requirement for further binary 17b0a2fdeeSScott Long * redistribution. 18b0a2fdeeSScott Long * 3. Neither the name of the LSI Logic Corporation nor the names of its 19b0a2fdeeSScott Long * contributors may be used to endorse or promote products derived from 20b0a2fdeeSScott Long * this software without specific prior written permission. 21d3ecac66SMatt Jacob * 22b0a2fdeeSScott Long * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23b0a2fdeeSScott Long * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24d3ecac66SMatt Jacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25b0a2fdeeSScott Long * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26b0a2fdeeSScott Long * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27b0a2fdeeSScott Long * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28b0a2fdeeSScott Long * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29b0a2fdeeSScott Long * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30b0a2fdeeSScott Long * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31b0a2fdeeSScott Long * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT 32b0a2fdeeSScott Long * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 339b631363SMatt Jacob * 349de3c85cSMatt Jacob * Name: mpi_init.h 359b631363SMatt Jacob * Title: MPI initiator mode messages and structures 369b631363SMatt Jacob * Creation Date: June 8, 2000 379b631363SMatt Jacob * 3862ae194dSScott Long * mpi_init.h Version: 01.05.09 399b631363SMatt Jacob * 409b631363SMatt Jacob * Version History 419b631363SMatt Jacob * --------------- 429b631363SMatt Jacob * 439b631363SMatt Jacob * Date Version Description 449b631363SMatt Jacob * -------- -------- ------------------------------------------------------ 459b631363SMatt Jacob * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 469b631363SMatt Jacob * 05-24-00 00.10.02 Added SenseBufferLength to _MSG_SCSI_IO_REPLY. 479b631363SMatt Jacob * 06-06-00 01.00.01 Update version number for 1.0 release. 489b631363SMatt Jacob * 06-08-00 01.00.02 Added MPI_SCSI_RSP_INFO_ definitions. 499b631363SMatt Jacob * 11-02-00 01.01.01 Original release for post 1.0 work. 509b631363SMatt Jacob * 12-04-00 01.01.02 Added MPI_SCSIIO_CONTROL_NO_DISCONNECT. 519b631363SMatt Jacob * 02-20-01 01.01.03 Started using MPI_POINTER. 529b631363SMatt Jacob * 03-27-01 01.01.04 Added structure offset comments. 539b631363SMatt Jacob * 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT. 549b631363SMatt Jacob * 08-08-01 01.02.01 Original release for v1.2 work. 559b631363SMatt Jacob * 08-29-01 01.02.02 Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET. 569b631363SMatt Jacob * Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for 579b631363SMatt Jacob * MSG_SCSI_IO_REPLY. 589b631363SMatt Jacob * 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure 599b631363SMatt Jacob * Processor messages. 609b631363SMatt Jacob * 10-04-01 01.02.04 Added defines for SEP request Action field. 617fed69eeSMatt Jacob * 05-31-02 01.02.05 Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define 627fed69eeSMatt Jacob * for SCSI IO requests. 637fed69eeSMatt Jacob * 11-15-02 01.02.06 Added special extended SCSI Status defines for FCP. 64b0a2fdeeSScott Long * 06-26-03 01.02.07 Added MPI_SCSI_STATUS_FCPEXT_UNASSIGNED define. 659de3c85cSMatt Jacob * 05-11-04 01.03.01 Original release for MPI v1.3. 669de3c85cSMatt Jacob * 08-19-04 01.05.01 Added MsgFlags defines for EEDP to SCSI IO request. 679de3c85cSMatt Jacob * Added new word to MSG_SCSI_IO_REPLY to add TaskTag field 689de3c85cSMatt Jacob * and a reserved U16. 699de3c85cSMatt Jacob * Added new MSG_SCSI_IO32_REQUEST structure. 709de3c85cSMatt Jacob * Added a TaskType of Clear Task Set to SCSI 719de3c85cSMatt Jacob * Task Management request. 729de3c85cSMatt Jacob * 12-07-04 01.05.02 Added support for Task Management Query Task. 739de3c85cSMatt Jacob * 01-15-05 01.05.03 Modified SCSI Enclosure Processor Request to support 749de3c85cSMatt Jacob * WWID addressing. 759de3c85cSMatt Jacob * 03-11-05 01.05.04 Removed EEDP flags from SCSI IO Request. 769de3c85cSMatt Jacob * Removed SCSI IO 32 Request. 779de3c85cSMatt Jacob * Modified SCSI Enclosure Processor Request and Reply to 789de3c85cSMatt Jacob * support Enclosure/Slot addressing rather than WWID 799de3c85cSMatt Jacob * addressing. 809de3c85cSMatt Jacob * 06-24-05 01.05.05 Added SCSI IO 32 structures and defines. 819de3c85cSMatt Jacob * Added four new defines for SEP SlotStatus. 829de3c85cSMatt Jacob * 08-03-05 01.05.06 Fixed some MPI_SCSIIO32_MSGFLGS_ defines to make them 839de3c85cSMatt Jacob * unique in the first 32 characters. 8462ae194dSScott Long * 03-27-06 01.05.07 Added Task Management type of Clear ACA. 8562ae194dSScott Long * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA. 8662ae194dSScott Long * 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management 8762ae194dSScott Long * Request: Do Not Send Task IU and Soft Reset Option. 889b631363SMatt Jacob * -------------------------------------------------------------------------- 899b631363SMatt Jacob */ 909b631363SMatt Jacob 919b631363SMatt Jacob #ifndef MPI_INIT_H 929b631363SMatt Jacob #define MPI_INIT_H 939b631363SMatt Jacob 949b631363SMatt Jacob 959b631363SMatt Jacob /***************************************************************************** 969b631363SMatt Jacob * 979b631363SMatt Jacob * S C S I I n i t i a t o r M e s s a g e s 989b631363SMatt Jacob * 999b631363SMatt Jacob *****************************************************************************/ 1009b631363SMatt Jacob 1019b631363SMatt Jacob /****************************************************************************/ 1029de3c85cSMatt Jacob /* SCSI IO messages and associated structures */ 1039b631363SMatt Jacob /****************************************************************************/ 1049b631363SMatt Jacob 1059b631363SMatt Jacob typedef struct _MSG_SCSI_IO_REQUEST 1069b631363SMatt Jacob { 1079b631363SMatt Jacob U8 TargetID; /* 00h */ 1089b631363SMatt Jacob U8 Bus; /* 01h */ 1099b631363SMatt Jacob U8 ChainOffset; /* 02h */ 1109b631363SMatt Jacob U8 Function; /* 03h */ 1119b631363SMatt Jacob U8 CDBLength; /* 04h */ 1129b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 1139b631363SMatt Jacob U8 Reserved; /* 06h */ 1149b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1159b631363SMatt Jacob U32 MsgContext; /* 08h */ 1169b631363SMatt Jacob U8 LUN[8]; /* 0Ch */ 1179b631363SMatt Jacob U32 Control; /* 14h */ 1189b631363SMatt Jacob U8 CDB[16]; /* 18h */ 1199b631363SMatt Jacob U32 DataLength; /* 28h */ 1209b631363SMatt Jacob U32 SenseBufferLowAddr; /* 2Ch */ 1219b631363SMatt Jacob SGE_IO_UNION SGL; /* 30h */ 1229b631363SMatt Jacob } MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST, 1239b631363SMatt Jacob SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t; 1249b631363SMatt Jacob 1259b631363SMatt Jacob 1267fed69eeSMatt Jacob /* SCSI IO MsgFlags bits */ 1279b631363SMatt Jacob 1289b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01) 1299b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00) 1309b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 (0x01) 1319de3c85cSMatt Jacob 1329b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02) 1339b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00) 1349b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02) 1359de3c85cSMatt Jacob 1367fed69eeSMatt Jacob #define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04) 1379b631363SMatt Jacob 1389b631363SMatt Jacob /* SCSI IO LUN fields */ 1399b631363SMatt Jacob 1409b631363SMatt Jacob #define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF) 1419b631363SMatt Jacob #define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000) 1429b631363SMatt Jacob #define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF) 1439b631363SMatt Jacob #define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000) 1449b631363SMatt Jacob #define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00) 1459b631363SMatt Jacob #define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00) 1469b631363SMatt Jacob 1477fed69eeSMatt Jacob /* SCSI IO Control bits */ 1489b631363SMatt Jacob 1499b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000) 1509b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000) 1519b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_WRITE (0x01000000) 1529b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_READ (0x02000000) 1539b631363SMatt Jacob 1549b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK (0x3C000000) 1559b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT (26) 1569b631363SMatt Jacob 1579b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK (0x00000700) 1589b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_SIMPLEQ (0x00000000) 1599b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_HEADOFQ (0x00000100) 1609b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ORDEREDQ (0x00000200) 1619b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ACAQ (0x00000400) 1629b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_UNTAGGED (0x00000500) 1639b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_NO_DISCONNECT (0x00000700) 1649b631363SMatt Jacob 1659b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TASKMANAGE_MASK (0x00FF0000) 1669b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_OBSOLETE (0x00800000) 1679b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_CLEAR_ACA_RSV (0x00400000) 1689b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TARGET_RESET (0x00200000) 1699b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_LUN_RESET_RSV (0x00100000) 1709b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_RESERVED (0x00080000) 1719b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV (0x00040000) 1729b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ABORT_TASK_SET (0x00020000) 1739b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000) 1749b631363SMatt Jacob 1759b631363SMatt Jacob 1769b631363SMatt Jacob /* SCSI IO reply structure */ 1779b631363SMatt Jacob typedef struct _MSG_SCSI_IO_REPLY 1789b631363SMatt Jacob { 1799b631363SMatt Jacob U8 TargetID; /* 00h */ 1809b631363SMatt Jacob U8 Bus; /* 01h */ 1819b631363SMatt Jacob U8 MsgLength; /* 02h */ 1829b631363SMatt Jacob U8 Function; /* 03h */ 1839b631363SMatt Jacob U8 CDBLength; /* 04h */ 1849b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 1859b631363SMatt Jacob U8 Reserved; /* 06h */ 1869b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1879b631363SMatt Jacob U32 MsgContext; /* 08h */ 1889b631363SMatt Jacob U8 SCSIStatus; /* 0Ch */ 1899b631363SMatt Jacob U8 SCSIState; /* 0Dh */ 1909b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 1919b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 1929b631363SMatt Jacob U32 TransferCount; /* 14h */ 1939b631363SMatt Jacob U32 SenseCount; /* 18h */ 1949b631363SMatt Jacob U32 ResponseInfo; /* 1Ch */ 1959de3c85cSMatt Jacob U16 TaskTag; /* 20h */ 1969de3c85cSMatt Jacob U16 Reserved1; /* 22h */ 1979b631363SMatt Jacob } MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY, 1989b631363SMatt Jacob SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t; 1999b631363SMatt Jacob 2009b631363SMatt Jacob 2019b631363SMatt Jacob /* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */ 2029b631363SMatt Jacob 2039b631363SMatt Jacob #define MPI_SCSI_STATUS_SUCCESS (0x00) 2049b631363SMatt Jacob #define MPI_SCSI_STATUS_CHECK_CONDITION (0x02) 2059b631363SMatt Jacob #define MPI_SCSI_STATUS_CONDITION_MET (0x04) 2069b631363SMatt Jacob #define MPI_SCSI_STATUS_BUSY (0x08) 2079b631363SMatt Jacob #define MPI_SCSI_STATUS_INTERMEDIATE (0x10) 2089b631363SMatt Jacob #define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET (0x14) 2099b631363SMatt Jacob #define MPI_SCSI_STATUS_RESERVATION_CONFLICT (0x18) 2109b631363SMatt Jacob #define MPI_SCSI_STATUS_COMMAND_TERMINATED (0x22) 2119b631363SMatt Jacob #define MPI_SCSI_STATUS_TASK_SET_FULL (0x28) 2129b631363SMatt Jacob #define MPI_SCSI_STATUS_ACA_ACTIVE (0x30) 2139b631363SMatt Jacob 2147fed69eeSMatt Jacob #define MPI_SCSI_STATUS_FCPEXT_DEVICE_LOGGED_OUT (0x80) 2157fed69eeSMatt Jacob #define MPI_SCSI_STATUS_FCPEXT_NO_LINK (0x81) 216b0a2fdeeSScott Long #define MPI_SCSI_STATUS_FCPEXT_UNASSIGNED (0x82) 2177fed69eeSMatt Jacob 2189b631363SMatt Jacob 2199b631363SMatt Jacob /* SCSI IO Reply SCSIState values */ 2209b631363SMatt Jacob 2219b631363SMatt Jacob #define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01) 2229b631363SMatt Jacob #define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02) 2239b631363SMatt Jacob #define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04) 2249b631363SMatt Jacob #define MPI_SCSI_STATE_TERMINATED (0x08) 2259b631363SMatt Jacob #define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10) 2269b631363SMatt Jacob #define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20) 2279b631363SMatt Jacob 2289b631363SMatt Jacob /* SCSI IO Reply ResponseInfo values */ 2299b631363SMatt Jacob /* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */ 2309b631363SMatt Jacob 2319b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000) 2329b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR (0x01000000) 2339b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID (0x02000000) 2349b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR (0x03000000) 2359b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000) 2369b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED (0x05000000) 2379b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_SPI_LQ_INVALID_TYPE (0x06000000) 2389b631363SMatt Jacob 2399de3c85cSMatt Jacob #define MPI_SCSI_TASKTAG_UNKNOWN (0xFFFF) 2409de3c85cSMatt Jacob 2419de3c85cSMatt Jacob 2429de3c85cSMatt Jacob /****************************************************************************/ 2439de3c85cSMatt Jacob /* SCSI IO 32 messages and associated structures */ 2449de3c85cSMatt Jacob /****************************************************************************/ 2459de3c85cSMatt Jacob 2469de3c85cSMatt Jacob typedef struct 2479de3c85cSMatt Jacob { 2489de3c85cSMatt Jacob U8 CDB[20]; /* 00h */ 2499de3c85cSMatt Jacob U32 PrimaryReferenceTag; /* 14h */ 2509de3c85cSMatt Jacob U16 PrimaryApplicationTag; /* 18h */ 2519de3c85cSMatt Jacob U16 PrimaryApplicationTagMask; /* 1Ah */ 2529de3c85cSMatt Jacob U32 TransferLength; /* 1Ch */ 2539de3c85cSMatt Jacob } MPI_SCSI_IO32_CDB_EEDP32, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP32, 2549de3c85cSMatt Jacob MpiScsiIo32CdbEedp32_t, MPI_POINTER pMpiScsiIo32CdbEedp32_t; 2559de3c85cSMatt Jacob 2569de3c85cSMatt Jacob typedef struct 2579de3c85cSMatt Jacob { 2589de3c85cSMatt Jacob U8 CDB[16]; /* 00h */ 2599de3c85cSMatt Jacob U32 DataLength; /* 10h */ 2609de3c85cSMatt Jacob U32 PrimaryReferenceTag; /* 14h */ 2619de3c85cSMatt Jacob U16 PrimaryApplicationTag; /* 18h */ 2629de3c85cSMatt Jacob U16 PrimaryApplicationTagMask; /* 1Ah */ 2639de3c85cSMatt Jacob U32 TransferLength; /* 1Ch */ 2649de3c85cSMatt Jacob } MPI_SCSI_IO32_CDB_EEDP16, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP16, 2659de3c85cSMatt Jacob MpiScsiIo32CdbEedp16_t, MPI_POINTER pMpiScsiIo32CdbEedp16_t; 2669de3c85cSMatt Jacob 2679de3c85cSMatt Jacob typedef union 2689de3c85cSMatt Jacob { 2699de3c85cSMatt Jacob U8 CDB32[32]; 2709de3c85cSMatt Jacob MPI_SCSI_IO32_CDB_EEDP32 EEDP32; 2719de3c85cSMatt Jacob MPI_SCSI_IO32_CDB_EEDP16 EEDP16; 2729de3c85cSMatt Jacob SGE_SIMPLE_UNION SGE; 2739de3c85cSMatt Jacob } MPI_SCSI_IO32_CDB_UNION, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_UNION, 2749de3c85cSMatt Jacob MpiScsiIo32Cdb_t, MPI_POINTER pMpiScsiIo32Cdb_t; 2759de3c85cSMatt Jacob 2769de3c85cSMatt Jacob typedef struct 2779de3c85cSMatt Jacob { 2789de3c85cSMatt Jacob U8 TargetID; /* 00h */ 2799de3c85cSMatt Jacob U8 Bus; /* 01h */ 2809de3c85cSMatt Jacob U16 Reserved1; /* 02h */ 2819de3c85cSMatt Jacob U32 Reserved2; /* 04h */ 2829de3c85cSMatt Jacob } MPI_SCSI_IO32_BUS_TARGET_ID_FORM, MPI_POINTER PTR_MPI_SCSI_IO32_BUS_TARGET_ID_FORM, 2839de3c85cSMatt Jacob MpiScsiIo32BusTargetIdForm_t, MPI_POINTER pMpiScsiIo32BusTargetIdForm_t; 2849de3c85cSMatt Jacob 2859de3c85cSMatt Jacob typedef union 2869de3c85cSMatt Jacob { 2879de3c85cSMatt Jacob MPI_SCSI_IO32_BUS_TARGET_ID_FORM SCSIID; 2889de3c85cSMatt Jacob U64 WWID; 2899de3c85cSMatt Jacob } MPI_SCSI_IO32_ADDRESS, MPI_POINTER PTR_MPI_SCSI_IO32_ADDRESS, 2909de3c85cSMatt Jacob MpiScsiIo32Address_t, MPI_POINTER pMpiScsiIo32Address_t; 2919de3c85cSMatt Jacob 2929de3c85cSMatt Jacob typedef struct _MSG_SCSI_IO32_REQUEST 2939de3c85cSMatt Jacob { 2949de3c85cSMatt Jacob U8 Port; /* 00h */ 2959de3c85cSMatt Jacob U8 Reserved1; /* 01h */ 2969de3c85cSMatt Jacob U8 ChainOffset; /* 02h */ 2979de3c85cSMatt Jacob U8 Function; /* 03h */ 2989de3c85cSMatt Jacob U8 CDBLength; /* 04h */ 2999de3c85cSMatt Jacob U8 SenseBufferLength; /* 05h */ 3009de3c85cSMatt Jacob U8 Flags; /* 06h */ 3019de3c85cSMatt Jacob U8 MsgFlags; /* 07h */ 3029de3c85cSMatt Jacob U32 MsgContext; /* 08h */ 3039de3c85cSMatt Jacob U8 LUN[8]; /* 0Ch */ 3049de3c85cSMatt Jacob U32 Control; /* 14h */ 3059de3c85cSMatt Jacob MPI_SCSI_IO32_CDB_UNION CDB; /* 18h */ 3069de3c85cSMatt Jacob U32 DataLength; /* 38h */ 3079de3c85cSMatt Jacob U32 BidirectionalDataLength; /* 3Ch */ 3089de3c85cSMatt Jacob U32 SecondaryReferenceTag; /* 40h */ 3099de3c85cSMatt Jacob U16 SecondaryApplicationTag; /* 44h */ 3109de3c85cSMatt Jacob U16 Reserved2; /* 46h */ 3119de3c85cSMatt Jacob U16 EEDPFlags; /* 48h */ 3129de3c85cSMatt Jacob U16 ApplicationTagTranslationMask; /* 4Ah */ 3139de3c85cSMatt Jacob U32 EEDPBlockSize; /* 4Ch */ 3149de3c85cSMatt Jacob MPI_SCSI_IO32_ADDRESS DeviceAddress; /* 50h */ 3159de3c85cSMatt Jacob U8 SGLOffset0; /* 58h */ 3169de3c85cSMatt Jacob U8 SGLOffset1; /* 59h */ 3179de3c85cSMatt Jacob U8 SGLOffset2; /* 5Ah */ 3189de3c85cSMatt Jacob U8 SGLOffset3; /* 5Bh */ 3199de3c85cSMatt Jacob U32 Reserved3; /* 5Ch */ 3209de3c85cSMatt Jacob U32 Reserved4; /* 60h */ 3219de3c85cSMatt Jacob U32 SenseBufferLowAddr; /* 64h */ 3229de3c85cSMatt Jacob SGE_IO_UNION SGL; /* 68h */ 3239de3c85cSMatt Jacob } MSG_SCSI_IO32_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO32_REQUEST, 3249de3c85cSMatt Jacob SCSIIO32Request_t, MPI_POINTER pSCSIIO32Request_t; 3259de3c85cSMatt Jacob 3269de3c85cSMatt Jacob /* SCSI IO 32 MsgFlags bits */ 3279de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_SENSE_WIDTH (0x01) 3289de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_32_SENSE_WIDTH (0x00) 3299de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_64_SENSE_WIDTH (0x01) 3309de3c85cSMatt Jacob 3319de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_SENSE_LOCATION (0x02) 3329de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_HOST (0x00) 3339de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_IOC (0x02) 3349de3c85cSMatt Jacob 3359de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04) 3369de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_SGL_OFFSETS_CHAINS (0x08) 3379de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_MULTICAST (0x10) 3389de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_BIDIRECTIONAL (0x20) 3399de3c85cSMatt Jacob #define MPI_SCSIIO32_MSGFLGS_LARGE_CDB (0x40) 3409de3c85cSMatt Jacob 3419de3c85cSMatt Jacob /* SCSI IO 32 Flags bits */ 3429de3c85cSMatt Jacob #define MPI_SCSIIO32_FLAGS_FORM_MASK (0x03) 3439de3c85cSMatt Jacob #define MPI_SCSIIO32_FLAGS_FORM_SCSIID (0x00) 3449de3c85cSMatt Jacob #define MPI_SCSIIO32_FLAGS_FORM_WWID (0x01) 3459de3c85cSMatt Jacob 3469de3c85cSMatt Jacob /* SCSI IO 32 LUN fields */ 3479de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF) 3489de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000) 3499de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF) 3509de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000) 3519de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_LEVEL_1_WORD (0xFF00) 3529de3c85cSMatt Jacob #define MPI_SCSIIO32_LUN_LEVEL_1_DWORD (0x0000FF00) 3539de3c85cSMatt Jacob 3549de3c85cSMatt Jacob /* SCSI IO 32 Control bits */ 3559de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_DATADIRECTION_MASK (0x03000000) 3569de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_NODATATRANSFER (0x00000000) 3579de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_WRITE (0x01000000) 3589de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_READ (0x02000000) 3599de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_BIDIRECTIONAL (0x03000000) 3609de3c85cSMatt Jacob 3619de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_ADDCDBLEN_MASK (0xFC000000) 3629de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_ADDCDBLEN_SHIFT (26) 3639de3c85cSMatt Jacob 3649de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_TASKATTRIBUTE_MASK (0x00000700) 3659de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_SIMPLEQ (0x00000000) 3669de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_HEADOFQ (0x00000100) 3679de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_ORDEREDQ (0x00000200) 3689de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_ACAQ (0x00000400) 3699de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_UNTAGGED (0x00000500) 3709de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_NO_DISCONNECT (0x00000700) 3719de3c85cSMatt Jacob 3729de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_TASKMANAGE_MASK (0x00FF0000) 3739de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_OBSOLETE (0x00800000) 3749de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_CLEAR_ACA_RSV (0x00400000) 3759de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_TARGET_RESET (0x00200000) 3769de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_LUN_RESET_RSV (0x00100000) 3779de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_RESERVED (0x00080000) 3789de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_CLR_TASK_SET_RSV (0x00040000) 3799de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_ABORT_TASK_SET (0x00020000) 3809de3c85cSMatt Jacob #define MPI_SCSIIO32_CONTROL_RESERVED2 (0x00010000) 3819de3c85cSMatt Jacob 3829de3c85cSMatt Jacob /* SCSI IO 32 EEDPFlags */ 3839de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_MASK_OP (0x0007) 3849de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_NOOP_OP (0x0000) 3859de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_CHK_OP (0x0001) 3869de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_STRIP_OP (0x0002) 3879de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_CHKRM_OP (0x0003) 3889de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_INSERT_OP (0x0004) 3899de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_REPLACE_OP (0x0006) 3909de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_CHKREGEN_OP (0x0007) 3919de3c85cSMatt Jacob 3929de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_PASS_REF_TAG (0x0008) 3939de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_8_9THS_MODE (0x0010) 3949de3c85cSMatt Jacob 3959de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_MASK (0x0700) 3969de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_GUARD (0x0100) 3979de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_REFTAG (0x0200) 3989de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_LBATAG (0x0400) 3999de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_SHIFT (8) 4009de3c85cSMatt Jacob 4019de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_APPTAG (0x1000) 4029de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_APPTAG (0x2000) 4039de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_REFTAG (0x4000) 4049de3c85cSMatt Jacob #define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_REFTAG (0x8000) 4059de3c85cSMatt Jacob 4069de3c85cSMatt Jacob 4079de3c85cSMatt Jacob /* SCSIIO32 IO reply structure */ 4089de3c85cSMatt Jacob typedef struct _MSG_SCSIIO32_IO_REPLY 4099de3c85cSMatt Jacob { 4109de3c85cSMatt Jacob U8 Port; /* 00h */ 4119de3c85cSMatt Jacob U8 Reserved1; /* 01h */ 4129de3c85cSMatt Jacob U8 MsgLength; /* 02h */ 4139de3c85cSMatt Jacob U8 Function; /* 03h */ 4149de3c85cSMatt Jacob U8 CDBLength; /* 04h */ 4159de3c85cSMatt Jacob U8 SenseBufferLength; /* 05h */ 4169de3c85cSMatt Jacob U8 Flags; /* 06h */ 4179de3c85cSMatt Jacob U8 MsgFlags; /* 07h */ 4189de3c85cSMatt Jacob U32 MsgContext; /* 08h */ 4199de3c85cSMatt Jacob U8 SCSIStatus; /* 0Ch */ 4209de3c85cSMatt Jacob U8 SCSIState; /* 0Dh */ 4219de3c85cSMatt Jacob U16 IOCStatus; /* 0Eh */ 4229de3c85cSMatt Jacob U32 IOCLogInfo; /* 10h */ 4239de3c85cSMatt Jacob U32 TransferCount; /* 14h */ 4249de3c85cSMatt Jacob U32 SenseCount; /* 18h */ 4259de3c85cSMatt Jacob U32 ResponseInfo; /* 1Ch */ 4269de3c85cSMatt Jacob U16 TaskTag; /* 20h */ 4279de3c85cSMatt Jacob U16 Reserved2; /* 22h */ 4289de3c85cSMatt Jacob U32 BidirectionalTransferCount; /* 24h */ 4299de3c85cSMatt Jacob } MSG_SCSIIO32_IO_REPLY, MPI_POINTER PTR_MSG_SCSIIO32_IO_REPLY, 4309de3c85cSMatt Jacob SCSIIO32Reply_t, MPI_POINTER pSCSIIO32Reply_t; 4319de3c85cSMatt Jacob 4329b631363SMatt Jacob 4339b631363SMatt Jacob /****************************************************************************/ 4349b631363SMatt Jacob /* SCSI Task Management messages */ 4359b631363SMatt Jacob /****************************************************************************/ 4369b631363SMatt Jacob 4379b631363SMatt Jacob typedef struct _MSG_SCSI_TASK_MGMT 4389b631363SMatt Jacob { 4399b631363SMatt Jacob U8 TargetID; /* 00h */ 4409b631363SMatt Jacob U8 Bus; /* 01h */ 4419b631363SMatt Jacob U8 ChainOffset; /* 02h */ 4429b631363SMatt Jacob U8 Function; /* 03h */ 4439b631363SMatt Jacob U8 Reserved; /* 04h */ 4449b631363SMatt Jacob U8 TaskType; /* 05h */ 4459b631363SMatt Jacob U8 Reserved1; /* 06h */ 4469b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4479b631363SMatt Jacob U32 MsgContext; /* 08h */ 4489b631363SMatt Jacob U8 LUN[8]; /* 0Ch */ 4499b631363SMatt Jacob U32 Reserved2[7]; /* 14h */ 4509b631363SMatt Jacob U32 TaskMsgContext; /* 30h */ 4519b631363SMatt Jacob } MSG_SCSI_TASK_MGMT, MPI_POINTER PTR_SCSI_TASK_MGMT, 4529b631363SMatt Jacob SCSITaskMgmt_t, MPI_POINTER pSCSITaskMgmt_t; 4539b631363SMatt Jacob 4549b631363SMatt Jacob /* TaskType values */ 4559b631363SMatt Jacob 4569b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK (0x01) 4579b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02) 4589b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03) 4599b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS (0x04) 4609b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05) 4619de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06) 4629de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07) 46362ae194dSScott Long #define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08) 4649b631363SMatt Jacob 4659b631363SMatt Jacob /* MsgFlags bits */ 46662ae194dSScott Long #define MPI_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU (0x01) 46762ae194dSScott Long 4689b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00) 4699b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION (0x02) 4709b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04) 4719b631363SMatt Jacob 47262ae194dSScott Long #define MPI_SCSITASKMGMT_MSGFLAGS_SOFT_RESET_OPTION (0x08) 47362ae194dSScott Long 4749b631363SMatt Jacob /* SCSI Task Management Reply */ 4759b631363SMatt Jacob typedef struct _MSG_SCSI_TASK_MGMT_REPLY 4769b631363SMatt Jacob { 4779b631363SMatt Jacob U8 TargetID; /* 00h */ 4789b631363SMatt Jacob U8 Bus; /* 01h */ 4799b631363SMatt Jacob U8 MsgLength; /* 02h */ 4809b631363SMatt Jacob U8 Function; /* 03h */ 4819de3c85cSMatt Jacob U8 ResponseCode; /* 04h */ 4829b631363SMatt Jacob U8 TaskType; /* 05h */ 4839b631363SMatt Jacob U8 Reserved1; /* 06h */ 4849b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4859b631363SMatt Jacob U32 MsgContext; /* 08h */ 4869b631363SMatt Jacob U8 Reserved2[2]; /* 0Ch */ 4879b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 4889b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 4899b631363SMatt Jacob U32 TerminationCount; /* 14h */ 4909b631363SMatt Jacob } MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY, 4919b631363SMatt Jacob SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t; 4929b631363SMatt Jacob 4939de3c85cSMatt Jacob /* ResponseCode values */ 4949de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_TM_COMPLETE (0x00) 4959de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_INVALID_FRAME (0x02) 4969de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED (0x04) 4979de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_TM_FAILED (0x05) 4989de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08) 4999de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09) 5009de3c85cSMatt Jacob #define MPI_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80) 5019de3c85cSMatt Jacob 5029b631363SMatt Jacob 5039b631363SMatt Jacob /****************************************************************************/ 5049b631363SMatt Jacob /* SCSI Enclosure Processor messages */ 5059b631363SMatt Jacob /****************************************************************************/ 5069b631363SMatt Jacob 5079b631363SMatt Jacob typedef struct _MSG_SEP_REQUEST 5089b631363SMatt Jacob { 5099b631363SMatt Jacob U8 TargetID; /* 00h */ 5109b631363SMatt Jacob U8 Bus; /* 01h */ 5119b631363SMatt Jacob U8 ChainOffset; /* 02h */ 5129b631363SMatt Jacob U8 Function; /* 03h */ 5139b631363SMatt Jacob U8 Action; /* 04h */ 5149de3c85cSMatt Jacob U8 Flags; /* 05h */ 5159de3c85cSMatt Jacob U8 Reserved1; /* 06h */ 5169b631363SMatt Jacob U8 MsgFlags; /* 07h */ 5179b631363SMatt Jacob U32 MsgContext; /* 08h */ 5189b631363SMatt Jacob U32 SlotStatus; /* 0Ch */ 5199de3c85cSMatt Jacob U32 Reserved2; /* 10h */ 5209de3c85cSMatt Jacob U32 Reserved3; /* 14h */ 5219de3c85cSMatt Jacob U32 Reserved4; /* 18h */ 5229de3c85cSMatt Jacob U16 Slot; /* 1Ch */ 5239de3c85cSMatt Jacob U16 EnclosureHandle; /* 1Eh */ 5249b631363SMatt Jacob } MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST, 5259b631363SMatt Jacob SEPRequest_t, MPI_POINTER pSEPRequest_t; 5269b631363SMatt Jacob 5279b631363SMatt Jacob /* Action defines */ 5289b631363SMatt Jacob #define MPI_SEP_REQ_ACTION_WRITE_STATUS (0x00) 5299b631363SMatt Jacob #define MPI_SEP_REQ_ACTION_READ_STATUS (0x01) 5309b631363SMatt Jacob 5319de3c85cSMatt Jacob /* Flags defines */ 5329de3c85cSMatt Jacob #define MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS (0x01) 5339de3c85cSMatt Jacob #define MPI_SEP_REQ_FLAGS_BUS_TARGETID_ADDRESS (0x00) 5349de3c85cSMatt Jacob 5359b631363SMatt Jacob /* SlotStatus bits for MSG_SEP_REQUEST */ 5369b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR (0x00000001) 5379b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY (0x00000002) 5389b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING (0x00000004) 5399b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008) 5409b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) 5419b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK (0x00000020) 5429b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT (0x00000040) 5439b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED (0x00000080) 5449b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE (0x00000100) 5459b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED (0x00000200) 5469de3c85cSMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQ_CONSISTENCY_CHECK (0x00001000) 5479de3c85cSMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DISABLE (0x00002000) 5489de3c85cSMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQ_RESERVED_DEVICE (0x00004000) 5499b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000) 5509b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE (0x00040000) 5519b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT (0x00080000) 5529b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE (0x00400000) 5539de3c85cSMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_ACTIVE (0x00800000) 5549b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000) 5559b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000) 5569b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF (0x10000000) 5579b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET (0x80000000) 5589b631363SMatt Jacob 5599b631363SMatt Jacob 5609b631363SMatt Jacob typedef struct _MSG_SEP_REPLY 5619b631363SMatt Jacob { 5629b631363SMatt Jacob U8 TargetID; /* 00h */ 5639b631363SMatt Jacob U8 Bus; /* 01h */ 5649b631363SMatt Jacob U8 MsgLength; /* 02h */ 5659b631363SMatt Jacob U8 Function; /* 03h */ 5669b631363SMatt Jacob U8 Action; /* 04h */ 5679b631363SMatt Jacob U8 Reserved1; /* 05h */ 5689b631363SMatt Jacob U8 Reserved2; /* 06h */ 5699b631363SMatt Jacob U8 MsgFlags; /* 07h */ 5709b631363SMatt Jacob U32 MsgContext; /* 08h */ 5719b631363SMatt Jacob U16 Reserved3; /* 0Ch */ 5729b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 5739b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 5749b631363SMatt Jacob U32 SlotStatus; /* 14h */ 5759de3c85cSMatt Jacob U32 Reserved4; /* 18h */ 5769de3c85cSMatt Jacob U16 Slot; /* 1Ch */ 5779de3c85cSMatt Jacob U16 EnclosureHandle; /* 1Eh */ 5789b631363SMatt Jacob } MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY, 5799b631363SMatt Jacob SEPReply_t, MPI_POINTER pSEPReply_t; 5809b631363SMatt Jacob 5819b631363SMatt Jacob /* SlotStatus bits for MSG_SEP_REPLY */ 5829b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR (0x00000001) 5839b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY (0x00000002) 5849b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING (0x00000004) 5859b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008) 5869b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) 5879b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK (0x00000020) 5889b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT (0x00000040) 5899b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED (0x00000080) 5909b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE (0x00000100) 5919b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED (0x00000200) 5929de3c85cSMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_CONSISTENCY_CHECK (0x00001000) 5939de3c85cSMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DISABLE (0x00002000) 5949de3c85cSMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_RESERVED_DEVICE (0x00004000) 5959b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REPORT (0x00010000) 5969b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000) 5979b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY (0x00040000) 5989b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY (0x00080000) 5999b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE (0x00400000) 6009de3c85cSMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_ACTIVE (0x00800000) 6019b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED (0x01000000) 6029b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED (0x02000000) 6039b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000) 6049b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000) 6059b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF (0x10000000) 6069b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED (0x40000000) 6079b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED (0x80000000) 6089b631363SMatt Jacob 6099b631363SMatt Jacob #endif 610