19b631363SMatt Jacob /* $FreeBSD$ */ 2098ca2bdSWarner Losh /*- 3b0a2fdeeSScott Long * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors. 4b0a2fdeeSScott Long * All rights reserved. 5d3ecac66SMatt Jacob * 6d3ecac66SMatt Jacob * Redistribution and use in source and binary forms, with or without 7b0a2fdeeSScott Long * modification, are permitted provided that the following conditions are 8b0a2fdeeSScott Long * met: 9d3ecac66SMatt Jacob * 1. Redistributions of source code must retain the above copyright 10b0a2fdeeSScott Long * notice, this list of conditions and the following disclaimer. 11b0a2fdeeSScott Long * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12b0a2fdeeSScott Long * substantially similar to the "NO WARRANTY" disclaimer below 13b0a2fdeeSScott Long * ("Disclaimer") and any redistribution must be conditioned upon including 14b0a2fdeeSScott Long * a substantially similar Disclaimer requirement for further binary 15b0a2fdeeSScott Long * redistribution. 16b0a2fdeeSScott Long * 3. Neither the name of the LSI Logic Corporation nor the names of its 17b0a2fdeeSScott Long * contributors may be used to endorse or promote products derived from 18b0a2fdeeSScott Long * this software without specific prior written permission. 19d3ecac66SMatt Jacob * 20b0a2fdeeSScott Long * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21b0a2fdeeSScott Long * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22d3ecac66SMatt Jacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23b0a2fdeeSScott Long * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24b0a2fdeeSScott Long * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25b0a2fdeeSScott Long * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26b0a2fdeeSScott Long * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27b0a2fdeeSScott Long * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28b0a2fdeeSScott Long * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29b0a2fdeeSScott Long * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT 30b0a2fdeeSScott Long * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 319b631363SMatt Jacob * 329b631363SMatt Jacob * 339de3c85cSMatt Jacob * Name: mpi_ioc.h 349b631363SMatt Jacob * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 359b631363SMatt Jacob * Creation Date: August 11, 2000 369b631363SMatt Jacob * 370b80d21bSMatt Jacob * mpi_ioc.h Version: 01.05.10 389b631363SMatt Jacob * 399b631363SMatt Jacob * Version History 409b631363SMatt Jacob * --------------- 419b631363SMatt Jacob * 429b631363SMatt Jacob * Date Version Description 439b631363SMatt Jacob * -------- -------- ------------------------------------------------------ 449b631363SMatt Jacob * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 459b631363SMatt Jacob * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure. 469b631363SMatt Jacob * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY. 479b631363SMatt Jacob * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure. 489b631363SMatt Jacob * Added _MSG_EVENT_ACK_REPLY structure. 499b631363SMatt Jacob * Added _MSG_FW_DOWNLOAD_REPLY structure. 509b631363SMatt Jacob * Added _MSG_TOOLBOX_REPLY structure. 519b631363SMatt Jacob * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure. 529b631363SMatt Jacob * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI, 539b631363SMatt Jacob * _LINK_STATUS, _LOOP_STATE and _LOGOUT. 549b631363SMatt Jacob * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in 559b631363SMatt Jacob * _MSG_EVENT_ACK_REPLY structure to match specification. 569b631363SMatt Jacob * 11-02-00 01.01.01 Original release for post 1.0 work. 579b631363SMatt Jacob * Added a value for Manufacturer to WhoInit. 589b631363SMatt Jacob * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and 599b631363SMatt Jacob * removed toolbox message. 609b631363SMatt Jacob * 01-09-01 01.01.03 Added event enabled and disabled defines. 619b631363SMatt Jacob * Added structures for FwHeader and DataHeader. 629b631363SMatt Jacob * Added ImageType to FwUpload reply. 639b631363SMatt Jacob * 02-20-01 01.01.04 Started using MPI_POINTER. 649b631363SMatt Jacob * 02-27-01 01.01.05 Added event for RAID status change and its event data. 659b631363SMatt Jacob * Added IocNumber field to MSG_IOC_FACTS_REPLY. 669b631363SMatt Jacob * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER. 679b631363SMatt Jacob * Added structure offset comments. 689b631363SMatt Jacob * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE. 699b631363SMatt Jacob * 08-08-01 01.02.01 Original release for v1.2 work. 709b631363SMatt Jacob * New format for FWVersion and ProductId in 719b631363SMatt Jacob * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. 729b631363SMatt Jacob * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and 739b631363SMatt Jacob * related structure and defines. 749b631363SMatt Jacob * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. 759b631363SMatt Jacob * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. 769b631363SMatt Jacob * Replaced a reserved field in MSG_IOC_FACTS_REPLY with 779b631363SMatt Jacob * IOCExceptions and changed DataImageSize to reserved. 789b631363SMatt Jacob * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and 799b631363SMatt Jacob * MPI_FW_UPLOAD_ITYPE_NVDATA. 809b631363SMatt Jacob * 09-28-01 01.02.03 Modified Event Data for Integrated RAID. 819b631363SMatt Jacob * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. 827fed69eeSMatt Jacob * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY. 837fed69eeSMatt Jacob * 05-31-02 01.02.06 Added define for 847fed69eeSMatt Jacob * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID. 857fed69eeSMatt Jacob * Added AliasIndex to EVENT_DATA_LOGOUT structure. 867fed69eeSMatt Jacob * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_. 87b0a2fdeeSScott Long * 06-26-03 01.02.08 Added new values to the product family defines. 889de3c85cSMatt Jacob * 04-29-04 01.02.09 Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and 899de3c85cSMatt Jacob * added related defines. 909de3c85cSMatt Jacob * 05-11-04 01.03.01 Original release for MPI v1.3. 919de3c85cSMatt Jacob * 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT. 929de3c85cSMatt Jacob * Added three new fields to MSG_IOC_FACTS_REPLY. 939de3c85cSMatt Jacob * Defined four new bits for the IOCCapabilities field of 949de3c85cSMatt Jacob * the IOCFacts reply. 959de3c85cSMatt Jacob * Added two new PortTypes for the PortFacts reply. 969de3c85cSMatt Jacob * Added six new events along with their EventData 979de3c85cSMatt Jacob * structures. 989de3c85cSMatt Jacob * Added a new MsgFlag to the FwDownload request to 999de3c85cSMatt Jacob * indicate last segment. 1009de3c85cSMatt Jacob * Defined a new image type of boot loader. 1019de3c85cSMatt Jacob * Added FW family codes for SAS product families. 1029de3c85cSMatt Jacob * 10-05-04 01.05.02 Added ReplyFifoHostSignalingAddr field to 1039de3c85cSMatt Jacob * MSG_IOC_FACTS_REPLY. 1049de3c85cSMatt Jacob * 12-07-04 01.05.03 Added more defines for SAS Discovery Error event. 1059de3c85cSMatt Jacob * 12-09-04 01.05.04 Added Unsupported device to SAS Device event. 1069de3c85cSMatt Jacob * 01-15-05 01.05.05 Added event data for SAS SES Event. 1079de3c85cSMatt Jacob * 02-09-05 01.05.06 Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define. 1089de3c85cSMatt Jacob * 02-22-05 01.05.07 Added Host Page Buffer Persistent flag to IOC Facts 1099de3c85cSMatt Jacob * Reply and IOC Init Request. 1109de3c85cSMatt Jacob * 03-11-05 01.05.08 Added family code for 1068E family. 1119de3c85cSMatt Jacob * Removed IOCFacts Reply EEDP Capability bit. 1129de3c85cSMatt Jacob * 06-24-05 01.05.09 Added 5 new IOCFacts Reply IOCCapabilities bits. 1139de3c85cSMatt Jacob * Added Max SATA Targets to SAS Discovery Error event. 1140b80d21bSMatt Jacob * 08-30-05 01.05.10 Added 4 new events and their event data structures. 1150b80d21bSMatt Jacob * Added new ReasonCode value for SAS Device Status Change 1160b80d21bSMatt Jacob * event. 1170b80d21bSMatt Jacob * Added new family code for FC949E. 1189b631363SMatt Jacob * -------------------------------------------------------------------------- 1199b631363SMatt Jacob */ 1209b631363SMatt Jacob 1219b631363SMatt Jacob #ifndef MPI_IOC_H 1229b631363SMatt Jacob #define MPI_IOC_H 1239b631363SMatt Jacob 1249b631363SMatt Jacob 1259b631363SMatt Jacob /***************************************************************************** 1269b631363SMatt Jacob * 1279b631363SMatt Jacob * I O C M e s s a g e s 1289b631363SMatt Jacob * 1299b631363SMatt Jacob *****************************************************************************/ 1309b631363SMatt Jacob 1319b631363SMatt Jacob /****************************************************************************/ 1329b631363SMatt Jacob /* IOCInit message */ 1339b631363SMatt Jacob /****************************************************************************/ 1349b631363SMatt Jacob 1359b631363SMatt Jacob typedef struct _MSG_IOC_INIT 1369b631363SMatt Jacob { 1379b631363SMatt Jacob U8 WhoInit; /* 00h */ 1389b631363SMatt Jacob U8 Reserved; /* 01h */ 1399b631363SMatt Jacob U8 ChainOffset; /* 02h */ 1409b631363SMatt Jacob U8 Function; /* 03h */ 1419b631363SMatt Jacob U8 Flags; /* 04h */ 1429b631363SMatt Jacob U8 MaxDevices; /* 05h */ 1439b631363SMatt Jacob U8 MaxBuses; /* 06h */ 1449b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1459b631363SMatt Jacob U32 MsgContext; /* 08h */ 1469b631363SMatt Jacob U16 ReplyFrameSize; /* 0Ch */ 1479b631363SMatt Jacob U8 Reserved1[2]; /* 0Eh */ 1489b631363SMatt Jacob U32 HostMfaHighAddr; /* 10h */ 1499b631363SMatt Jacob U32 SenseBufferHighAddr; /* 14h */ 1509de3c85cSMatt Jacob U32 ReplyFifoHostSignalingAddr; /* 18h */ 1519de3c85cSMatt Jacob SGE_SIMPLE_UNION HostPageBufferSGE; /* 1Ch */ 1529de3c85cSMatt Jacob U16 MsgVersion; /* 28h */ 1539de3c85cSMatt Jacob U16 HeaderVersion; /* 2Ah */ 1549b631363SMatt Jacob } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT, 1559b631363SMatt Jacob IOCInit_t, MPI_POINTER pIOCInit_t; 1569b631363SMatt Jacob 1579b631363SMatt Jacob /* WhoInit values */ 1589b631363SMatt Jacob #define MPI_WHOINIT_NO_ONE (0x00) 1599b631363SMatt Jacob #define MPI_WHOINIT_SYSTEM_BIOS (0x01) 1609b631363SMatt Jacob #define MPI_WHOINIT_ROM_BIOS (0x02) 1619b631363SMatt Jacob #define MPI_WHOINIT_PCI_PEER (0x03) 1629b631363SMatt Jacob #define MPI_WHOINIT_HOST_DRIVER (0x04) 1639b631363SMatt Jacob #define MPI_WHOINIT_MANUFACTURER (0x05) 1649b631363SMatt Jacob 1659b631363SMatt Jacob /* Flags values */ 1669de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04) 1679de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02) 1689b631363SMatt Jacob #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01) 1699b631363SMatt Jacob 1709de3c85cSMatt Jacob /* MsgVersion */ 1719de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00) 1729de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8) 1739de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF) 1749de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0) 1759de3c85cSMatt Jacob 1769de3c85cSMatt Jacob /* HeaderVersion */ 1779de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00) 1789de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8) 1799de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF) 1809de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0) 1819de3c85cSMatt Jacob 1829de3c85cSMatt Jacob 1839b631363SMatt Jacob typedef struct _MSG_IOC_INIT_REPLY 1849b631363SMatt Jacob { 1859b631363SMatt Jacob U8 WhoInit; /* 00h */ 1869b631363SMatt Jacob U8 Reserved; /* 01h */ 1879b631363SMatt Jacob U8 MsgLength; /* 02h */ 1889b631363SMatt Jacob U8 Function; /* 03h */ 1899b631363SMatt Jacob U8 Flags; /* 04h */ 1909b631363SMatt Jacob U8 MaxDevices; /* 05h */ 1919b631363SMatt Jacob U8 MaxBuses; /* 06h */ 1929b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1939b631363SMatt Jacob U32 MsgContext; /* 08h */ 1949b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 1959b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 1969b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 1979b631363SMatt Jacob } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY, 1989b631363SMatt Jacob IOCInitReply_t, MPI_POINTER pIOCInitReply_t; 1999b631363SMatt Jacob 2009b631363SMatt Jacob 2019b631363SMatt Jacob 2029b631363SMatt Jacob /****************************************************************************/ 2039b631363SMatt Jacob /* IOC Facts message */ 2049b631363SMatt Jacob /****************************************************************************/ 2059b631363SMatt Jacob 2069b631363SMatt Jacob typedef struct _MSG_IOC_FACTS 2079b631363SMatt Jacob { 2089b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 2099b631363SMatt Jacob U8 ChainOffset; /* 01h */ 2109b631363SMatt Jacob U8 Function; /* 02h */ 2119b631363SMatt Jacob U8 Reserved1[3]; /* 03h */ 2129b631363SMatt Jacob U8 MsgFlags; /* 04h */ 2139b631363SMatt Jacob U32 MsgContext; /* 08h */ 2149b631363SMatt Jacob } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS, 2159b631363SMatt Jacob IOCFacts_t, MPI_POINTER pIOCFacts_t; 2169b631363SMatt Jacob 2179b631363SMatt Jacob typedef struct _MPI_FW_VERSION_STRUCT 2189b631363SMatt Jacob { 2199b631363SMatt Jacob U8 Dev; /* 00h */ 2209b631363SMatt Jacob U8 Unit; /* 01h */ 2219b631363SMatt Jacob U8 Minor; /* 02h */ 2229b631363SMatt Jacob U8 Major; /* 03h */ 2239b631363SMatt Jacob } MPI_FW_VERSION_STRUCT; 2249b631363SMatt Jacob 2259b631363SMatt Jacob typedef union _MPI_FW_VERSION 2269b631363SMatt Jacob { 2279b631363SMatt Jacob MPI_FW_VERSION_STRUCT Struct; 2289b631363SMatt Jacob U32 Word; 2299b631363SMatt Jacob } MPI_FW_VERSION; 2309b631363SMatt Jacob 2319b631363SMatt Jacob /* IOC Facts Reply */ 2329b631363SMatt Jacob typedef struct _MSG_IOC_FACTS_REPLY 2339b631363SMatt Jacob { 2349b631363SMatt Jacob U16 MsgVersion; /* 00h */ 2359b631363SMatt Jacob U8 MsgLength; /* 02h */ 2369b631363SMatt Jacob U8 Function; /* 03h */ 2377fed69eeSMatt Jacob U16 HeaderVersion; /* 04h */ 2389b631363SMatt Jacob U8 IOCNumber; /* 06h */ 2399b631363SMatt Jacob U8 MsgFlags; /* 07h */ 2409b631363SMatt Jacob U32 MsgContext; /* 08h */ 2419b631363SMatt Jacob U16 IOCExceptions; /* 0Ch */ 2429b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 2439b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 2449b631363SMatt Jacob U8 MaxChainDepth; /* 14h */ 2459b631363SMatt Jacob U8 WhoInit; /* 15h */ 2469b631363SMatt Jacob U8 BlockSize; /* 16h */ 2479b631363SMatt Jacob U8 Flags; /* 17h */ 2489b631363SMatt Jacob U16 ReplyQueueDepth; /* 18h */ 2499b631363SMatt Jacob U16 RequestFrameSize; /* 1Ah */ 2509b631363SMatt Jacob U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */ 2519b631363SMatt Jacob U16 ProductID; /* 1Eh */ 2529b631363SMatt Jacob U32 CurrentHostMfaHighAddr; /* 20h */ 2539b631363SMatt Jacob U16 GlobalCredits; /* 24h */ 2549b631363SMatt Jacob U8 NumberOfPorts; /* 26h */ 2559b631363SMatt Jacob U8 EventState; /* 27h */ 2569b631363SMatt Jacob U32 CurrentSenseBufferHighAddr; /* 28h */ 2579b631363SMatt Jacob U16 CurReplyFrameSize; /* 2Ch */ 2589b631363SMatt Jacob U8 MaxDevices; /* 2Eh */ 2599b631363SMatt Jacob U8 MaxBuses; /* 2Fh */ 2609b631363SMatt Jacob U32 FWImageSize; /* 30h */ 2619de3c85cSMatt Jacob U32 IOCCapabilities; /* 34h */ 2629b631363SMatt Jacob MPI_FW_VERSION FWVersion; /* 38h */ 2639de3c85cSMatt Jacob U16 HighPriorityQueueDepth; /* 3Ch */ 2649de3c85cSMatt Jacob U16 Reserved2; /* 3Eh */ 2659de3c85cSMatt Jacob SGE_SIMPLE_UNION HostPageBufferSGE; /* 40h */ 2669de3c85cSMatt Jacob U32 ReplyFifoHostSignalingAddr; /* 4Ch */ 2679b631363SMatt Jacob } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY, 2689b631363SMatt Jacob IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t; 2699b631363SMatt Jacob 2709b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) 2719de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8) 2729b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) 2739de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT (0) 2749b631363SMatt Jacob 2759de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00) 2769de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT (8) 2779de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF) 2789de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT (0) 2797fed69eeSMatt Jacob 2809b631363SMatt Jacob #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) 2817fed69eeSMatt Jacob #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002) 2829de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004) 2839de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008) 2849b631363SMatt Jacob 2859b631363SMatt Jacob #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) 2869de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02) 2879de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04) 2889b631363SMatt Jacob 2899b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00) 2909b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01) 2919b631363SMatt Jacob 2929de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001) 2939de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002) 2949de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004) 2959de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008) 2969de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010) 2979de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020) 2989de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040) 2999de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL (0x00000080) 3009de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100) 3019de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200) 3029de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400) 3039b631363SMatt Jacob 3049b631363SMatt Jacob 3059b631363SMatt Jacob /***************************************************************************** 3069b631363SMatt Jacob * 3079b631363SMatt Jacob * P o r t M e s s a g e s 3089b631363SMatt Jacob * 3099b631363SMatt Jacob *****************************************************************************/ 3109b631363SMatt Jacob 3119b631363SMatt Jacob /****************************************************************************/ 3129b631363SMatt Jacob /* Port Facts message and Reply */ 3139b631363SMatt Jacob /****************************************************************************/ 3149b631363SMatt Jacob 3159b631363SMatt Jacob typedef struct _MSG_PORT_FACTS 3169b631363SMatt Jacob { 3179b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 3189b631363SMatt Jacob U8 ChainOffset; /* 02h */ 3199b631363SMatt Jacob U8 Function; /* 03h */ 3209b631363SMatt Jacob U8 Reserved1[2]; /* 04h */ 3219b631363SMatt Jacob U8 PortNumber; /* 06h */ 3229b631363SMatt Jacob U8 MsgFlags; /* 07h */ 3239b631363SMatt Jacob U32 MsgContext; /* 08h */ 3249b631363SMatt Jacob } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS, 3259b631363SMatt Jacob PortFacts_t, MPI_POINTER pPortFacts_t; 3269b631363SMatt Jacob 3279b631363SMatt Jacob typedef struct _MSG_PORT_FACTS_REPLY 3289b631363SMatt Jacob { 3299b631363SMatt Jacob U16 Reserved; /* 00h */ 3309b631363SMatt Jacob U8 MsgLength; /* 02h */ 3319b631363SMatt Jacob U8 Function; /* 03h */ 3329b631363SMatt Jacob U16 Reserved1; /* 04h */ 3339b631363SMatt Jacob U8 PortNumber; /* 06h */ 3349b631363SMatt Jacob U8 MsgFlags; /* 07h */ 3359b631363SMatt Jacob U32 MsgContext; /* 08h */ 3369b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 3379b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 3389b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 3399b631363SMatt Jacob U8 Reserved3; /* 14h */ 3409b631363SMatt Jacob U8 PortType; /* 15h */ 3419b631363SMatt Jacob U16 MaxDevices; /* 16h */ 3429b631363SMatt Jacob U16 PortSCSIID; /* 18h */ 3439b631363SMatt Jacob U16 ProtocolFlags; /* 1Ah */ 3449b631363SMatt Jacob U16 MaxPostedCmdBuffers; /* 1Ch */ 3459b631363SMatt Jacob U16 MaxPersistentIDs; /* 1Eh */ 3469b631363SMatt Jacob U16 MaxLanBuckets; /* 20h */ 3479b631363SMatt Jacob U16 Reserved4; /* 22h */ 3489b631363SMatt Jacob U32 Reserved5; /* 24h */ 3499b631363SMatt Jacob } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY, 3509b631363SMatt Jacob PortFactsReply_t, MPI_POINTER pPortFactsReply_t; 3519b631363SMatt Jacob 3529b631363SMatt Jacob 3539b631363SMatt Jacob /* PortTypes values */ 3549b631363SMatt Jacob 3559b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00) 3569b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SCSI (0x01) 3579b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_FC (0x10) 3589de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20) 3599de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SAS (0x30) 3609b631363SMatt Jacob 3619b631363SMatt Jacob /* ProtocolFlags values */ 3629b631363SMatt Jacob 3639b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01) 3649b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LAN (0x02) 3659b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_TARGET (0x04) 3669b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08) 3679b631363SMatt Jacob 3689b631363SMatt Jacob 3699b631363SMatt Jacob /****************************************************************************/ 3709b631363SMatt Jacob /* Port Enable Message */ 3719b631363SMatt Jacob /****************************************************************************/ 3729b631363SMatt Jacob 3739b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE 3749b631363SMatt Jacob { 3759b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 3769b631363SMatt Jacob U8 ChainOffset; /* 02h */ 3779b631363SMatt Jacob U8 Function; /* 03h */ 3789b631363SMatt Jacob U8 Reserved1[2]; /* 04h */ 3799b631363SMatt Jacob U8 PortNumber; /* 06h */ 3809b631363SMatt Jacob U8 MsgFlags; /* 07h */ 3819b631363SMatt Jacob U32 MsgContext; /* 08h */ 3829b631363SMatt Jacob } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE, 3839b631363SMatt Jacob PortEnable_t, MPI_POINTER pPortEnable_t; 3849b631363SMatt Jacob 3859b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE_REPLY 3869b631363SMatt Jacob { 3879b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 3889b631363SMatt Jacob U8 MsgLength; /* 02h */ 3899b631363SMatt Jacob U8 Function; /* 03h */ 3909b631363SMatt Jacob U8 Reserved1[2]; /* 04h */ 3919b631363SMatt Jacob U8 PortNumber; /* 05h */ 3929b631363SMatt Jacob U8 MsgFlags; /* 07h */ 3939b631363SMatt Jacob U32 MsgContext; /* 08h */ 3949b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 3959b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 3969b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 3979b631363SMatt Jacob } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY, 3989b631363SMatt Jacob PortEnableReply_t, MPI_POINTER pPortEnableReply_t; 3999b631363SMatt Jacob 4009b631363SMatt Jacob 4019b631363SMatt Jacob /***************************************************************************** 4029b631363SMatt Jacob * 4039b631363SMatt Jacob * E v e n t M e s s a g e s 4049b631363SMatt Jacob * 4059b631363SMatt Jacob *****************************************************************************/ 4069b631363SMatt Jacob 4079b631363SMatt Jacob /****************************************************************************/ 4089b631363SMatt Jacob /* Event Notification messages */ 4099b631363SMatt Jacob /****************************************************************************/ 4109b631363SMatt Jacob 4119b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY 4129b631363SMatt Jacob { 4139b631363SMatt Jacob U8 Switch; /* 00h */ 4149b631363SMatt Jacob U8 Reserved; /* 01h */ 4159b631363SMatt Jacob U8 ChainOffset; /* 02h */ 4169b631363SMatt Jacob U8 Function; /* 03h */ 4179b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 4189b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4199b631363SMatt Jacob U32 MsgContext; /* 08h */ 4209b631363SMatt Jacob } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY, 4219b631363SMatt Jacob EventNotification_t, MPI_POINTER pEventNotification_t; 4229b631363SMatt Jacob 4239b631363SMatt Jacob /* Event Notification Reply */ 4249b631363SMatt Jacob 4259b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY_REPLY 4269b631363SMatt Jacob { 4279b631363SMatt Jacob U16 EventDataLength; /* 00h */ 4289b631363SMatt Jacob U8 MsgLength; /* 02h */ 4299b631363SMatt Jacob U8 Function; /* 03h */ 4309b631363SMatt Jacob U8 Reserved1[2]; /* 04h */ 4319b631363SMatt Jacob U8 AckRequired; /* 06h */ 4329b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4339b631363SMatt Jacob U32 MsgContext; /* 08h */ 4349b631363SMatt Jacob U8 Reserved2[2]; /* 0Ch */ 4359b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 4369b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 4379b631363SMatt Jacob U32 Event; /* 14h */ 4389b631363SMatt Jacob U32 EventContext; /* 18h */ 4399b631363SMatt Jacob U32 Data[1]; /* 1Ch */ 4409b631363SMatt Jacob } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY, 4419b631363SMatt Jacob EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t; 4429b631363SMatt Jacob 4439b631363SMatt Jacob /* Event Acknowledge */ 4449b631363SMatt Jacob 4459b631363SMatt Jacob typedef struct _MSG_EVENT_ACK 4469b631363SMatt Jacob { 4479b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 4489b631363SMatt Jacob U8 ChainOffset; /* 02h */ 4499b631363SMatt Jacob U8 Function; /* 03h */ 4509b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 4519b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4529b631363SMatt Jacob U32 MsgContext; /* 08h */ 4539b631363SMatt Jacob U32 Event; /* 0Ch */ 4549b631363SMatt Jacob U32 EventContext; /* 10h */ 4559b631363SMatt Jacob } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK, 4569b631363SMatt Jacob EventAck_t, MPI_POINTER pEventAck_t; 4579b631363SMatt Jacob 4589b631363SMatt Jacob typedef struct _MSG_EVENT_ACK_REPLY 4599b631363SMatt Jacob { 4609b631363SMatt Jacob U8 Reserved[2]; /* 00h */ 4619b631363SMatt Jacob U8 MsgLength; /* 02h */ 4629b631363SMatt Jacob U8 Function; /* 03h */ 4639b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 4649b631363SMatt Jacob U8 MsgFlags; /* 07h */ 4659b631363SMatt Jacob U32 MsgContext; /* 08h */ 4669b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 4679b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 4689b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 4699b631363SMatt Jacob } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY, 4709b631363SMatt Jacob EventAckReply_t, MPI_POINTER pEventAckReply_t; 4719b631363SMatt Jacob 4729b631363SMatt Jacob /* Switch */ 4739b631363SMatt Jacob 4749b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00) 4759b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01) 4769b631363SMatt Jacob 4779b631363SMatt Jacob /* Event */ 4789b631363SMatt Jacob 4799b631363SMatt Jacob #define MPI_EVENT_NONE (0x00000000) 4809b631363SMatt Jacob #define MPI_EVENT_LOG_DATA (0x00000001) 4819b631363SMatt Jacob #define MPI_EVENT_STATE_CHANGE (0x00000002) 4829b631363SMatt Jacob #define MPI_EVENT_UNIT_ATTENTION (0x00000003) 4839b631363SMatt Jacob #define MPI_EVENT_IOC_BUS_RESET (0x00000004) 4849b631363SMatt Jacob #define MPI_EVENT_EXT_BUS_RESET (0x00000005) 4859b631363SMatt Jacob #define MPI_EVENT_RESCAN (0x00000006) 4869b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) 4879b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) 4889b631363SMatt Jacob #define MPI_EVENT_LOGOUT (0x00000009) 4899b631363SMatt Jacob #define MPI_EVENT_EVENT_CHANGE (0x0000000A) 4909b631363SMatt Jacob #define MPI_EVENT_INTEGRATED_RAID (0x0000000B) 4919b631363SMatt Jacob #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) 4929b631363SMatt Jacob #define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) 4939de3c85cSMatt Jacob #define MPI_EVENT_QUEUE_FULL (0x0000000E) 4949de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F) 4959de3c85cSMatt Jacob #define MPI_EVENT_SAS_SES (0x00000010) 4969de3c85cSMatt Jacob #define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011) 4979de3c85cSMatt Jacob #define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012) 4989de3c85cSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013) 4990b80d21bSMatt Jacob #define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014) 5000b80d21bSMatt Jacob #define MPI_EVENT_IR2 (0x00000015) 5010b80d21bSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY (0x00000016) 5020b80d21bSMatt Jacob #define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021) 5039b631363SMatt Jacob 5049b631363SMatt Jacob /* AckRequired field values */ 5059b631363SMatt Jacob 5069b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00) 5079b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01) 5089b631363SMatt Jacob 5099b631363SMatt Jacob /* EventChange Event data */ 5109b631363SMatt Jacob 5119b631363SMatt Jacob typedef struct _EVENT_DATA_EVENT_CHANGE 5129b631363SMatt Jacob { 5139b631363SMatt Jacob U8 EventState; /* 00h */ 5149b631363SMatt Jacob U8 Reserved; /* 01h */ 5159b631363SMatt Jacob U16 Reserved1; /* 02h */ 5169b631363SMatt Jacob } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE, 5179b631363SMatt Jacob EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t; 5189b631363SMatt Jacob 5190b80d21bSMatt Jacob /* LogEntryAdded Event data */ 5200b80d21bSMatt Jacob 5210b80d21bSMatt Jacob /* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */ 5220b80d21bSMatt Jacob #define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH (0x1C) 5230b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY 5240b80d21bSMatt Jacob { 5250b80d21bSMatt Jacob U32 TimeStamp; /* 00h */ 5260b80d21bSMatt Jacob U32 Reserved1; /* 04h */ 5270b80d21bSMatt Jacob U16 LogSequence; /* 08h */ 5280b80d21bSMatt Jacob U16 LogEntryQualifier; /* 0Ah */ 5290b80d21bSMatt Jacob U8 LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */ 5300b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY, 5310b80d21bSMatt Jacob MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t; 5320b80d21bSMatt Jacob 5330b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY_ADDED 5340b80d21bSMatt Jacob { 5350b80d21bSMatt Jacob U16 LogSequence; /* 00h */ 5360b80d21bSMatt Jacob U16 Reserved1; /* 02h */ 5370b80d21bSMatt Jacob U32 Reserved2; /* 04h */ 5380b80d21bSMatt Jacob EVENT_DATA_LOG_ENTRY LogEntry; /* 08h */ 5390b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED, 5400b80d21bSMatt Jacob MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t; 5410b80d21bSMatt Jacob 5429b631363SMatt Jacob /* SCSI Event data for Port, Bus and Device forms */ 5439b631363SMatt Jacob 5449b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI 5459b631363SMatt Jacob { 5469b631363SMatt Jacob U8 TargetID; /* 00h */ 5479b631363SMatt Jacob U8 BusPort; /* 01h */ 5489b631363SMatt Jacob U16 Reserved; /* 02h */ 5499b631363SMatt Jacob } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI, 5509b631363SMatt Jacob EventDataScsi_t, MPI_POINTER pEventDataScsi_t; 5519b631363SMatt Jacob 5529b631363SMatt Jacob /* SCSI Device Status Change Event data */ 5539b631363SMatt Jacob 5549b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE 5559b631363SMatt Jacob { 5569b631363SMatt Jacob U8 TargetID; /* 00h */ 5579b631363SMatt Jacob U8 Bus; /* 01h */ 5589b631363SMatt Jacob U8 ReasonCode; /* 02h */ 5599b631363SMatt Jacob U8 LUN; /* 03h */ 5609b631363SMatt Jacob U8 ASC; /* 04h */ 5619b631363SMatt Jacob U8 ASCQ; /* 05h */ 5629b631363SMatt Jacob U16 Reserved; /* 06h */ 5639b631363SMatt Jacob } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 5649b631363SMatt Jacob MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 5659b631363SMatt Jacob MpiEventDataScsiDeviceStatusChange_t, 5669b631363SMatt Jacob MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t; 5679b631363SMatt Jacob 5689b631363SMatt Jacob /* MPI SCSI Device Status Change Event data ReasonCode values */ 5699b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03) 5709b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04) 5719b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05) 5729b631363SMatt Jacob 5739de3c85cSMatt Jacob /* SAS Device Status Change Event data */ 5749de3c85cSMatt Jacob 5759de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE 5769de3c85cSMatt Jacob { 5779de3c85cSMatt Jacob U8 TargetID; /* 00h */ 5789de3c85cSMatt Jacob U8 Bus; /* 01h */ 5799de3c85cSMatt Jacob U8 ReasonCode; /* 02h */ 5809de3c85cSMatt Jacob U8 Reserved; /* 03h */ 5819de3c85cSMatt Jacob U8 ASC; /* 04h */ 5829de3c85cSMatt Jacob U8 ASCQ; /* 05h */ 5839de3c85cSMatt Jacob U16 DevHandle; /* 06h */ 5849de3c85cSMatt Jacob U32 DeviceInfo; /* 08h */ 5859de3c85cSMatt Jacob U16 ParentDevHandle; /* 0Ch */ 5869de3c85cSMatt Jacob U8 PhyNum; /* 0Eh */ 5879de3c85cSMatt Jacob U8 Reserved1; /* 0Fh */ 5889de3c85cSMatt Jacob U64 SASAddress; /* 10h */ 5899de3c85cSMatt Jacob } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, 5909de3c85cSMatt Jacob MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, 5919de3c85cSMatt Jacob MpiEventDataSasDeviceStatusChange_t, 5929de3c85cSMatt Jacob MPI_POINTER pMpiEventDataSasDeviceStatusChange_t; 5939de3c85cSMatt Jacob 5949de3c85cSMatt Jacob /* MPI SAS Device Status Change Event data ReasonCode values */ 5959de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03) 5969de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04) 5979de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05) 5989de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06) 5999de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07) 6000b80d21bSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08) 6019de3c85cSMatt Jacob 6029de3c85cSMatt Jacob 6039de3c85cSMatt Jacob /* SCSI Event data for Queue Full event */ 6049de3c85cSMatt Jacob 6059de3c85cSMatt Jacob typedef struct _EVENT_DATA_QUEUE_FULL 6069de3c85cSMatt Jacob { 6079de3c85cSMatt Jacob U8 TargetID; /* 00h */ 6089de3c85cSMatt Jacob U8 Bus; /* 01h */ 6099de3c85cSMatt Jacob U16 CurrentDepth; /* 02h */ 6109de3c85cSMatt Jacob } EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL, 6119de3c85cSMatt Jacob EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t; 6129de3c85cSMatt Jacob 6139de3c85cSMatt Jacob /* MPI Integrated RAID Event data */ 6149de3c85cSMatt Jacob 6159de3c85cSMatt Jacob typedef struct _EVENT_DATA_RAID 6169de3c85cSMatt Jacob { 6179de3c85cSMatt Jacob U8 VolumeID; /* 00h */ 6189de3c85cSMatt Jacob U8 VolumeBus; /* 01h */ 6199de3c85cSMatt Jacob U8 ReasonCode; /* 02h */ 6209de3c85cSMatt Jacob U8 PhysDiskNum; /* 03h */ 6219de3c85cSMatt Jacob U8 ASC; /* 04h */ 6229de3c85cSMatt Jacob U8 ASCQ; /* 05h */ 6239de3c85cSMatt Jacob U16 Reserved; /* 06h */ 6249de3c85cSMatt Jacob U32 SettingsStatus; /* 08h */ 6259de3c85cSMatt Jacob } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID, 6269de3c85cSMatt Jacob MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t; 6279de3c85cSMatt Jacob 6289de3c85cSMatt Jacob /* MPI Integrated RAID Event data ReasonCode values */ 6299de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00) 6309de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01) 6319de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02) 6329de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03) 6339de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04) 6349de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05) 6359de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06) 6369de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07) 6379de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08) 6389de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09) 6399de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_SMART_DATA (0x0A) 6409de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B) 6419de3c85cSMatt Jacob 6420b80d21bSMatt Jacob 6430b80d21bSMatt Jacob /* MPI Integrated RAID Resync Update Event data */ 6440b80d21bSMatt Jacob 6450b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE 6460b80d21bSMatt Jacob { 6470b80d21bSMatt Jacob U8 VolumeID; /* 00h */ 6480b80d21bSMatt Jacob U8 VolumeBus; /* 01h */ 6490b80d21bSMatt Jacob U8 ResyncComplete; /* 02h */ 6500b80d21bSMatt Jacob U8 Reserved1; /* 03h */ 6510b80d21bSMatt Jacob U32 Reserved2; /* 04h */ 6520b80d21bSMatt Jacob } MPI_EVENT_DATA_IR_RESYNC_UPDATE, 6530b80d21bSMatt Jacob MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE, 6540b80d21bSMatt Jacob MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t; 6550b80d21bSMatt Jacob 6560b80d21bSMatt Jacob /* MPI IR2 Event data */ 6570b80d21bSMatt Jacob 6580b80d21bSMatt Jacob /* MPI_LD_STATE or MPI_PD_STATE */ 6590b80d21bSMatt Jacob typedef struct _IR2_STATE_CHANGED 6600b80d21bSMatt Jacob { 6610b80d21bSMatt Jacob U16 PreviousState; /* 00h */ 6620b80d21bSMatt Jacob U16 NewState; /* 02h */ 6630b80d21bSMatt Jacob } IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED; 6640b80d21bSMatt Jacob 6650b80d21bSMatt Jacob typedef struct _IR2_PD_INFO 6660b80d21bSMatt Jacob { 6670b80d21bSMatt Jacob U16 DeviceHandle; /* 00h */ 6680b80d21bSMatt Jacob U8 TruncEnclosureHandle; /* 02h */ 6690b80d21bSMatt Jacob U8 TruncatedSlot; /* 03h */ 6700b80d21bSMatt Jacob } IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO; 6710b80d21bSMatt Jacob 6720b80d21bSMatt Jacob typedef union _MPI_IR2_RC_EVENT_DATA 6730b80d21bSMatt Jacob { 6740b80d21bSMatt Jacob IR2_STATE_CHANGED StateChanged; 6750b80d21bSMatt Jacob U32 Lba; 6760b80d21bSMatt Jacob IR2_PD_INFO PdInfo; 6770b80d21bSMatt Jacob } MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA; 6780b80d21bSMatt Jacob 6790b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR2 6800b80d21bSMatt Jacob { 6810b80d21bSMatt Jacob U8 TargetID; /* 00h */ 6820b80d21bSMatt Jacob U8 Bus; /* 01h */ 6830b80d21bSMatt Jacob U8 ReasonCode; /* 02h */ 6840b80d21bSMatt Jacob U8 PhysDiskNum; /* 03h */ 6850b80d21bSMatt Jacob MPI_IR2_RC_EVENT_DATA IR2EventData; /* 04h */ 6860b80d21bSMatt Jacob } MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2, 6870b80d21bSMatt Jacob MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t; 6880b80d21bSMatt Jacob 6890b80d21bSMatt Jacob /* MPI IR2 Event data ReasonCode values */ 6900b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_LD_STATE_CHANGED (0x01) 6910b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_STATE_CHANGED (0x02) 6920b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL (0x03) 6930b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_INSERTED (0x04) 6940b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_REMOVED (0x05) 6950b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06) 6960b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07) 6970b80d21bSMatt Jacob 6980b80d21bSMatt Jacob /* defines for logical disk states */ 6990b80d21bSMatt Jacob #define MPI_LD_STATE_OPTIMAL (0x00) 7000b80d21bSMatt Jacob #define MPI_LD_STATE_DEGRADED (0x01) 7010b80d21bSMatt Jacob #define MPI_LD_STATE_FAILED (0x02) 7020b80d21bSMatt Jacob #define MPI_LD_STATE_MISSING (0x03) 7030b80d21bSMatt Jacob #define MPI_LD_STATE_OFFLINE (0x04) 7040b80d21bSMatt Jacob 7050b80d21bSMatt Jacob /* defines for physical disk states */ 7060b80d21bSMatt Jacob #define MPI_PD_STATE_ONLINE (0x00) 7070b80d21bSMatt Jacob #define MPI_PD_STATE_MISSING (0x01) 7080b80d21bSMatt Jacob #define MPI_PD_STATE_NOT_COMPATIBLE (0x02) 7090b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED (0x03) 7100b80d21bSMatt Jacob #define MPI_PD_STATE_INITIALIZING (0x04) 7110b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST (0x05) 7120b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED_AT_HOST_REQUEST (0x06) 7130b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON (0xFF) 7140b80d21bSMatt Jacob 7159b631363SMatt Jacob /* MPI Link Status Change Event data */ 7169b631363SMatt Jacob 7179b631363SMatt Jacob typedef struct _EVENT_DATA_LINK_STATUS 7189b631363SMatt Jacob { 7199b631363SMatt Jacob U8 State; /* 00h */ 7209b631363SMatt Jacob U8 Reserved; /* 01h */ 7219b631363SMatt Jacob U16 Reserved1; /* 02h */ 7229b631363SMatt Jacob U8 Reserved2; /* 04h */ 7239b631363SMatt Jacob U8 Port; /* 05h */ 7249b631363SMatt Jacob U16 Reserved3; /* 06h */ 7259b631363SMatt Jacob } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS, 7269b631363SMatt Jacob EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t; 7279b631363SMatt Jacob 7289b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000) 7299b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001) 7309b631363SMatt Jacob 7319b631363SMatt Jacob /* MPI Loop State Change Event data */ 7329b631363SMatt Jacob 7339b631363SMatt Jacob typedef struct _EVENT_DATA_LOOP_STATE 7349b631363SMatt Jacob { 7359b631363SMatt Jacob U8 Character4; /* 00h */ 7369b631363SMatt Jacob U8 Character3; /* 01h */ 7379b631363SMatt Jacob U8 Type; /* 02h */ 7389b631363SMatt Jacob U8 Reserved; /* 03h */ 7399b631363SMatt Jacob U8 Reserved1; /* 04h */ 7409b631363SMatt Jacob U8 Port; /* 05h */ 7419b631363SMatt Jacob U16 Reserved2; /* 06h */ 7429b631363SMatt Jacob } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE, 7439b631363SMatt Jacob EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t; 7449b631363SMatt Jacob 7459b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001) 7469b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002) 7479b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003) 7489b631363SMatt Jacob 7499b631363SMatt Jacob /* MPI LOGOUT Event data */ 7509b631363SMatt Jacob 7519b631363SMatt Jacob typedef struct _EVENT_DATA_LOGOUT 7529b631363SMatt Jacob { 7539b631363SMatt Jacob U32 NPortID; /* 00h */ 7547fed69eeSMatt Jacob U8 AliasIndex; /* 04h */ 7559b631363SMatt Jacob U8 Port; /* 05h */ 7569b631363SMatt Jacob U16 Reserved1; /* 06h */ 7579b631363SMatt Jacob } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT, 7589b631363SMatt Jacob EventDataLogout_t, MPI_POINTER pEventDataLogout_t; 7599b631363SMatt Jacob 7607fed69eeSMatt Jacob #define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF) 7617fed69eeSMatt Jacob 7629de3c85cSMatt Jacob /* SAS SES Event data */ 7637fed69eeSMatt Jacob 7649de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_SES 7659b631363SMatt Jacob { 7669de3c85cSMatt Jacob U8 PhyNum; /* 00h */ 7679de3c85cSMatt Jacob U8 Port; /* 01h */ 7689de3c85cSMatt Jacob U8 PortWidth; /* 02h */ 7699de3c85cSMatt Jacob U8 Reserved1; /* 04h */ 7709de3c85cSMatt Jacob } EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES, 7719de3c85cSMatt Jacob MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t; 7729b631363SMatt Jacob 7739de3c85cSMatt Jacob /* SAS Phy Link Status Event data */ 7749de3c85cSMatt Jacob 7759de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS 7769de3c85cSMatt Jacob { 7779de3c85cSMatt Jacob U8 PhyNum; /* 00h */ 7789de3c85cSMatt Jacob U8 LinkRates; /* 01h */ 7799de3c85cSMatt Jacob U16 DevHandle; /* 02h */ 7809de3c85cSMatt Jacob U64 SASAddress; /* 04h */ 7819de3c85cSMatt Jacob } EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS, 7829de3c85cSMatt Jacob MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t; 7839de3c85cSMatt Jacob 7849de3c85cSMatt Jacob /* defines for the LinkRates field of the SAS PHY Link Status event */ 7859de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK (0xF0) 7869de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT (4) 7879de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK (0x0F) 7889de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT (0) 7899de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN (0x00) 7909de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED (0x01) 7919de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION (0x02) 7929de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03) 7939de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08) 7949de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09) 7959de3c85cSMatt Jacob 7960b80d21bSMatt Jacob /* SAS Discovery Event data */ 7970b80d21bSMatt Jacob 7980b80d21bSMatt Jacob typedef struct _EVENT_DATA_SAS_DISCOVERY 7990b80d21bSMatt Jacob { 8000b80d21bSMatt Jacob U32 DiscoveryStatus; /* 00h */ 8010b80d21bSMatt Jacob U32 Reserved1; /* 04h */ 8020b80d21bSMatt Jacob } EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY, 8030b80d21bSMatt Jacob EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t; 8040b80d21bSMatt Jacob 8050b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_COMPLETE (0x00000000) 8060b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS (0x00000001) 8070b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK (0xFFFF0000) 8080b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT (16) 8090b80d21bSMatt Jacob 8109de3c85cSMatt Jacob /* SAS Discovery Errror Event data */ 8119de3c85cSMatt Jacob 8129de3c85cSMatt Jacob typedef struct _EVENT_DATA_DISCOVERY_ERROR 8139de3c85cSMatt Jacob { 8149de3c85cSMatt Jacob U32 DiscoveryStatus; /* 00h */ 8159de3c85cSMatt Jacob U8 Port; /* 04h */ 8169de3c85cSMatt Jacob U8 Reserved1; /* 05h */ 8179de3c85cSMatt Jacob U16 Reserved2; /* 06h */ 8189de3c85cSMatt Jacob } EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR, 8199de3c85cSMatt Jacob EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t; 8209de3c85cSMatt Jacob 8219de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED (0x00000001) 8229de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE (0x00000002) 8239de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS (0x00000004) 8249de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR (0x00000008) 8259de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT (0x00000010) 8269de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES (0x00000020) 8279de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST (0x00000040) 8289de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED (0x00000080) 8299de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100) 8309de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200) 8319de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400) 8329de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800) 8339de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000) 8349b631363SMatt Jacob 8359b631363SMatt Jacob 8369b631363SMatt Jacob /***************************************************************************** 8379b631363SMatt Jacob * 8389b631363SMatt Jacob * F i r m w a r e L o a d M e s s a g e s 8399b631363SMatt Jacob * 8409b631363SMatt Jacob *****************************************************************************/ 8419b631363SMatt Jacob 8429b631363SMatt Jacob /****************************************************************************/ 8439b631363SMatt Jacob /* Firmware Download message and associated structures */ 8449b631363SMatt Jacob /****************************************************************************/ 8459b631363SMatt Jacob 8469b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD 8479b631363SMatt Jacob { 8489b631363SMatt Jacob U8 ImageType; /* 00h */ 8499b631363SMatt Jacob U8 Reserved; /* 01h */ 8509b631363SMatt Jacob U8 ChainOffset; /* 02h */ 8519b631363SMatt Jacob U8 Function; /* 03h */ 8529b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 8539b631363SMatt Jacob U8 MsgFlags; /* 07h */ 8549b631363SMatt Jacob U32 MsgContext; /* 08h */ 8559b631363SMatt Jacob SGE_MPI_UNION SGL; /* 0Ch */ 8569b631363SMatt Jacob } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD, 8579b631363SMatt Jacob FWDownload_t, MPI_POINTER pFWDownload_t; 8589b631363SMatt Jacob 8599de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01) 8609de3c85cSMatt Jacob 8619b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00) 8629b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_FW (0x01) 8639b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02) 8649b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03) 8659de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04) 8669b631363SMatt Jacob 8679b631363SMatt Jacob 8689b631363SMatt Jacob typedef struct _FWDownloadTCSGE 8699b631363SMatt Jacob { 8709b631363SMatt Jacob U8 Reserved; /* 00h */ 8719b631363SMatt Jacob U8 ContextSize; /* 01h */ 8729b631363SMatt Jacob U8 DetailsLength; /* 02h */ 8739b631363SMatt Jacob U8 Flags; /* 03h */ 8749b631363SMatt Jacob U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */ 8759b631363SMatt Jacob U32 ImageOffset; /* 08h */ 8769b631363SMatt Jacob U32 ImageSize; /* 0Ch */ 8779b631363SMatt Jacob } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE, 8789b631363SMatt Jacob FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t; 8799b631363SMatt Jacob 8809b631363SMatt Jacob /* Firmware Download reply */ 8819b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD_REPLY 8829b631363SMatt Jacob { 8839b631363SMatt Jacob U8 ImageType; /* 00h */ 8849b631363SMatt Jacob U8 Reserved; /* 01h */ 8859b631363SMatt Jacob U8 MsgLength; /* 02h */ 8869b631363SMatt Jacob U8 Function; /* 03h */ 8879b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 8889b631363SMatt Jacob U8 MsgFlags; /* 07h */ 8899b631363SMatt Jacob U32 MsgContext; /* 08h */ 8909b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 8919b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 8929b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 8939b631363SMatt Jacob } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY, 8949b631363SMatt Jacob FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t; 8959b631363SMatt Jacob 8969b631363SMatt Jacob 8979b631363SMatt Jacob /****************************************************************************/ 8989b631363SMatt Jacob /* Firmware Upload message and associated structures */ 8999b631363SMatt Jacob /****************************************************************************/ 9009b631363SMatt Jacob 9019b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD 9029b631363SMatt Jacob { 9039b631363SMatt Jacob U8 ImageType; /* 00h */ 9049b631363SMatt Jacob U8 Reserved; /* 01h */ 9059b631363SMatt Jacob U8 ChainOffset; /* 02h */ 9069b631363SMatt Jacob U8 Function; /* 03h */ 9079b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 9089b631363SMatt Jacob U8 MsgFlags; /* 07h */ 9099b631363SMatt Jacob U32 MsgContext; /* 08h */ 9109b631363SMatt Jacob SGE_MPI_UNION SGL; /* 0Ch */ 9119b631363SMatt Jacob } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD, 9129b631363SMatt Jacob FWUpload_t, MPI_POINTER pFWUpload_t; 9139b631363SMatt Jacob 9149b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00) 9159b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01) 9169b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02) 9179b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03) 9189de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04) 9199de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05) 9209b631363SMatt Jacob 9219b631363SMatt Jacob typedef struct _FWUploadTCSGE 9229b631363SMatt Jacob { 9239b631363SMatt Jacob U8 Reserved; /* 00h */ 9249b631363SMatt Jacob U8 ContextSize; /* 01h */ 9259b631363SMatt Jacob U8 DetailsLength; /* 02h */ 9269b631363SMatt Jacob U8 Flags; /* 03h */ 9279b631363SMatt Jacob U32 Reserved1; /* 04h */ 9289b631363SMatt Jacob U32 ImageOffset; /* 08h */ 9299b631363SMatt Jacob U32 ImageSize; /* 0Ch */ 9309b631363SMatt Jacob } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE, 9319b631363SMatt Jacob FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t; 9329b631363SMatt Jacob 9339b631363SMatt Jacob /* Firmware Upload reply */ 9349b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD_REPLY 9359b631363SMatt Jacob { 9369b631363SMatt Jacob U8 ImageType; /* 00h */ 9379b631363SMatt Jacob U8 Reserved; /* 01h */ 9389b631363SMatt Jacob U8 MsgLength; /* 02h */ 9399b631363SMatt Jacob U8 Function; /* 03h */ 9409b631363SMatt Jacob U8 Reserved1[3]; /* 04h */ 9419b631363SMatt Jacob U8 MsgFlags; /* 07h */ 9429b631363SMatt Jacob U32 MsgContext; /* 08h */ 9439b631363SMatt Jacob U16 Reserved2; /* 0Ch */ 9449b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 9459b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 9469b631363SMatt Jacob U32 ActualImageSize; /* 14h */ 9479b631363SMatt Jacob } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY, 9489b631363SMatt Jacob FWUploadReply_t, MPI_POINTER pFWUploadReply_t; 9499b631363SMatt Jacob 9509b631363SMatt Jacob 9519b631363SMatt Jacob typedef struct _MPI_FW_HEADER 9529b631363SMatt Jacob { 9539b631363SMatt Jacob U32 ArmBranchInstruction0; /* 00h */ 9549b631363SMatt Jacob U32 Signature0; /* 04h */ 9559b631363SMatt Jacob U32 Signature1; /* 08h */ 9569b631363SMatt Jacob U32 Signature2; /* 0Ch */ 9579b631363SMatt Jacob U32 ArmBranchInstruction1; /* 10h */ 9589b631363SMatt Jacob U32 ArmBranchInstruction2; /* 14h */ 9599b631363SMatt Jacob U32 Reserved; /* 18h */ 9609b631363SMatt Jacob U32 Checksum; /* 1Ch */ 9619b631363SMatt Jacob U16 VendorId; /* 20h */ 9629b631363SMatt Jacob U16 ProductId; /* 22h */ 9639b631363SMatt Jacob MPI_FW_VERSION FWVersion; /* 24h */ 9649b631363SMatt Jacob U32 SeqCodeVersion; /* 28h */ 9659b631363SMatt Jacob U32 ImageSize; /* 2Ch */ 9669b631363SMatt Jacob U32 NextImageHeaderOffset; /* 30h */ 9679b631363SMatt Jacob U32 LoadStartAddress; /* 34h */ 9689b631363SMatt Jacob U32 IopResetVectorValue; /* 38h */ 9699b631363SMatt Jacob U32 IopResetRegAddr; /* 3Ch */ 9709b631363SMatt Jacob U32 VersionNameWhat; /* 40h */ 9719b631363SMatt Jacob U8 VersionName[32]; /* 44h */ 9729b631363SMatt Jacob U32 VendorNameWhat; /* 64h */ 9739b631363SMatt Jacob U8 VendorName[32]; /* 68h */ 9749b631363SMatt Jacob } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER, 9759b631363SMatt Jacob MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t; 9769b631363SMatt Jacob 9779b631363SMatt Jacob #define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840) 9789b631363SMatt Jacob 9799b631363SMatt Jacob /* defines for using the ProductId field */ 9809b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_MASK (0xF000) 9819b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000) 9829b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_FC (0x1000) 9839de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SAS (0x2000) 9849b631363SMatt Jacob 9857fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A) 9867fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5) 9877fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA) 9887fed69eeSMatt Jacob 9899b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_MASK (0x0F00) 9909b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100) 9919b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200) 9929b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300) 9939b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400) 9949b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500) 9959b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600) 9969de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_PROD_IR_SCSI (0x0700) 9979b631363SMatt Jacob 9989b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF) 9999de3c85cSMatt Jacob /* SCSI */ 10009b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001) 10019b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002) 10029b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003) 10039b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004) 10049b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005) 10059b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006) 10069b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007) 10079b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008) 10089b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009) 10099b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A) 1010b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B) 1011b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C) 10129de3c85cSMatt Jacob /* Fibre Channel */ 10139b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000) 10149de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) /* 919 and 929 */ 10159de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) /* 919X and 929X */ 10169de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003) /* 919XL and 929XL */ 10179de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_939X_FC (0x0004) /* 939X and 949X */ 10189de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005) 10190b80d21bSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_949E_FC (0x0006) 10209de3c85cSMatt Jacob /* SAS */ 10219de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001) 10229de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1068_SAS (0x0002) 10239de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1078_SAS (0x0003) 10249de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_106xE_SAS (0x0004) /* 1068E, 1066E, and 1064E */ 10259b631363SMatt Jacob 10269b631363SMatt Jacob typedef struct _MPI_EXT_IMAGE_HEADER 10279b631363SMatt Jacob { 10289b631363SMatt Jacob U8 ImageType; /* 00h */ 10299b631363SMatt Jacob U8 Reserved; /* 01h */ 10309b631363SMatt Jacob U16 Reserved1; /* 02h */ 10319b631363SMatt Jacob U32 Checksum; /* 04h */ 10329b631363SMatt Jacob U32 ImageSize; /* 08h */ 10339b631363SMatt Jacob U32 NextImageHeaderOffset; /* 0Ch */ 10349b631363SMatt Jacob U32 LoadStartAddress; /* 10h */ 10359b631363SMatt Jacob U32 Reserved2; /* 14h */ 10369b631363SMatt Jacob } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER, 10379b631363SMatt Jacob MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t; 10389b631363SMatt Jacob 10399b631363SMatt Jacob /* defines for the ImageType field */ 10409b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00) 10419b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_FW (0x01) 10429b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_NVDATA (0x03) 10439de3c85cSMatt Jacob #define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04) 10449b631363SMatt Jacob 10459b631363SMatt Jacob #endif 1046