xref: /freebsd/sys/dev/mpt/mpilib/mpi_ioc.h (revision 1bf5a6cf3ce807b20dd2e360e2041078d4ace0e5)
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  *
329de3c85cSMatt Jacob  *           Name:  mpi_ioc.h
339b631363SMatt Jacob  *          Title:  MPI IOC, Port, Event, FW Download, and FW Upload messages
349b631363SMatt Jacob  *  Creation Date:  August 11, 2000
359b631363SMatt Jacob  *
36*1bf5a6cfSMarius Strobl  *    mpi_ioc.h Version:  01.05.16
379b631363SMatt Jacob  *
389b631363SMatt Jacob  *  Version History
399b631363SMatt Jacob  *  ---------------
409b631363SMatt Jacob  *
419b631363SMatt Jacob  *  Date      Version   Description
429b631363SMatt Jacob  *  --------  --------  ------------------------------------------------------
439b631363SMatt Jacob  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
449b631363SMatt Jacob  *  05-24-00  00.10.02  Added _MSG_IOC_INIT_REPLY structure.
459b631363SMatt Jacob  *  06-06-00  01.00.01  Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
469b631363SMatt Jacob  *  06-12-00  01.00.02  Added _MSG_PORT_ENABLE_REPLY structure.
479b631363SMatt Jacob  *                      Added _MSG_EVENT_ACK_REPLY structure.
489b631363SMatt Jacob  *                      Added _MSG_FW_DOWNLOAD_REPLY structure.
499b631363SMatt Jacob  *                      Added _MSG_TOOLBOX_REPLY structure.
509b631363SMatt Jacob  *  06-30-00  01.00.03  Added MaxLanBuckets to _PORT_FACT_REPLY structure.
519b631363SMatt Jacob  *  07-27-00  01.00.04  Added _EVENT_DATA structure definitions for _SCSI,
529b631363SMatt Jacob  *                      _LINK_STATUS, _LOOP_STATE and _LOGOUT.
539b631363SMatt Jacob  *  08-11-00  01.00.05  Switched positions of MsgLength and Function fields in
549b631363SMatt Jacob  *                      _MSG_EVENT_ACK_REPLY structure to match specification.
559b631363SMatt Jacob  *  11-02-00  01.01.01  Original release for post 1.0 work.
569b631363SMatt Jacob  *                      Added a value for Manufacturer to WhoInit.
579b631363SMatt Jacob  *  12-04-00  01.01.02  Modified IOCFacts reply, added FWUpload messages, and
589b631363SMatt Jacob  *                      removed toolbox message.
599b631363SMatt Jacob  *  01-09-01  01.01.03  Added event enabled and disabled defines.
609b631363SMatt Jacob  *                      Added structures for FwHeader and DataHeader.
619b631363SMatt Jacob  *                      Added ImageType to FwUpload reply.
629b631363SMatt Jacob  *  02-20-01  01.01.04  Started using MPI_POINTER.
639b631363SMatt Jacob  *  02-27-01  01.01.05  Added event for RAID status change and its event data.
649b631363SMatt Jacob  *                      Added IocNumber field to MSG_IOC_FACTS_REPLY.
659b631363SMatt Jacob  *  03-27-01  01.01.06  Added defines for ProductId field of MPI_FW_HEADER.
669b631363SMatt Jacob  *                      Added structure offset comments.
679b631363SMatt Jacob  *  04-09-01  01.01.07  Added structure EVENT_DATA_EVENT_CHANGE.
689b631363SMatt Jacob  *  08-08-01  01.02.01  Original release for v1.2 work.
699b631363SMatt Jacob  *                      New format for FWVersion and ProductId in
709b631363SMatt Jacob  *                      MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
719b631363SMatt Jacob  *  08-31-01  01.02.02  Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
729b631363SMatt Jacob  *                      related structure and defines.
739b631363SMatt Jacob  *                      Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
749b631363SMatt Jacob  *                      Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
759b631363SMatt Jacob  *                      Replaced a reserved field in MSG_IOC_FACTS_REPLY with
769b631363SMatt Jacob  *                      IOCExceptions and changed DataImageSize to reserved.
779b631363SMatt Jacob  *                      Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
789b631363SMatt Jacob  *                      MPI_FW_UPLOAD_ITYPE_NVDATA.
799b631363SMatt Jacob  *  09-28-01  01.02.03  Modified Event Data for Integrated RAID.
809b631363SMatt Jacob  *  11-01-01  01.02.04  Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
817fed69eeSMatt Jacob  *  03-14-02  01.02.05  Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
827fed69eeSMatt Jacob  *  05-31-02  01.02.06  Added define for
837fed69eeSMatt Jacob  *                      MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
847fed69eeSMatt Jacob  *                      Added AliasIndex to EVENT_DATA_LOGOUT structure.
857fed69eeSMatt Jacob  *  04-01-03  01.02.07  Added defines for MPI_FW_HEADER_SIGNATURE_.
86b0a2fdeeSScott Long  *  06-26-03  01.02.08  Added new values to the product family defines.
879de3c85cSMatt Jacob  *  04-29-04  01.02.09  Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and
889de3c85cSMatt Jacob  *                      added related defines.
899de3c85cSMatt Jacob  *  05-11-04  01.03.01  Original release for MPI v1.3.
909de3c85cSMatt Jacob  *  08-19-04  01.05.01  Added four new fields to MSG_IOC_INIT.
919de3c85cSMatt Jacob  *                      Added three new fields to MSG_IOC_FACTS_REPLY.
929de3c85cSMatt Jacob  *                      Defined four new bits for the IOCCapabilities field of
939de3c85cSMatt Jacob  *                      the IOCFacts reply.
949de3c85cSMatt Jacob  *                      Added two new PortTypes for the PortFacts reply.
959de3c85cSMatt Jacob  *                      Added six new events along with their EventData
969de3c85cSMatt Jacob  *                      structures.
979de3c85cSMatt Jacob  *                      Added a new MsgFlag to the FwDownload request to
989de3c85cSMatt Jacob  *                      indicate last segment.
999de3c85cSMatt Jacob  *                      Defined a new image type of boot loader.
1009de3c85cSMatt Jacob  *                      Added FW family codes for SAS product families.
1019de3c85cSMatt Jacob  *  10-05-04  01.05.02  Added ReplyFifoHostSignalingAddr field to
1029de3c85cSMatt Jacob  *                      MSG_IOC_FACTS_REPLY.
1039de3c85cSMatt Jacob  *  12-07-04  01.05.03  Added more defines for SAS Discovery Error event.
1049de3c85cSMatt Jacob  *  12-09-04  01.05.04  Added Unsupported device to SAS Device event.
1059de3c85cSMatt Jacob  *  01-15-05  01.05.05  Added event data for SAS SES Event.
1069de3c85cSMatt Jacob  *  02-09-05  01.05.06  Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define.
1079de3c85cSMatt Jacob  *  02-22-05  01.05.07  Added Host Page Buffer Persistent flag to IOC Facts
1089de3c85cSMatt Jacob  *                      Reply and IOC Init Request.
1099de3c85cSMatt Jacob  *  03-11-05  01.05.08  Added family code for 1068E family.
1109de3c85cSMatt Jacob  *                      Removed IOCFacts Reply EEDP Capability bit.
1119de3c85cSMatt Jacob  *  06-24-05  01.05.09  Added 5 new IOCFacts Reply IOCCapabilities bits.
1129de3c85cSMatt Jacob  *                      Added Max SATA Targets to SAS Discovery Error event.
1130b80d21bSMatt Jacob  *  08-30-05  01.05.10  Added 4 new events and their event data structures.
1140b80d21bSMatt Jacob  *                      Added new ReasonCode value for SAS Device Status Change
1150b80d21bSMatt Jacob  *                      event.
1160b80d21bSMatt Jacob  *                      Added new family code for FC949E.
11762ae194dSScott Long  *  03-27-06  01.05.11  Added MPI_IOCFACTS_CAPABILITY_TLR.
11862ae194dSScott Long  *                      Added additional Reason Codes and more event data fields
11962ae194dSScott Long  *                      to EVENT_DATA_SAS_DEVICE_STATUS_CHANGE.
12062ae194dSScott Long  *                      Added EVENT_DATA_SAS_BROADCAST_PRIMITIVE structure and
12162ae194dSScott Long  *                      new event.
12262ae194dSScott Long  *                      Added MPI_EVENT_SAS_SMP_ERROR and event data structure.
12362ae194dSScott Long  *                      Added MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE and event
12462ae194dSScott Long  *                      data structure.
12562ae194dSScott Long  *                      Added MPI_EVENT_SAS_INIT_TABLE_OVERFLOW and event
12662ae194dSScott Long  *                      data structure.
12762ae194dSScott Long  *                      Added MPI_EXT_IMAGE_TYPE_INITIALIZATION.
12862ae194dSScott Long  *  10-11-06  01.05.12  Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED.
12962ae194dSScott Long  *                      Added MaxInitiators field to PortFacts reply.
13062ae194dSScott Long  *                      Added SAS Device Status Change ReasonCode for
13162ae194dSScott Long  *                      asynchronous notificaiton.
13262ae194dSScott Long  *                      Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event
13362ae194dSScott Long  *                      data structure.
13462ae194dSScott Long  *                      Added new ImageType values for FWDownload and FWUpload
13562ae194dSScott Long  *                      requests.
13662ae194dSScott Long  *  02-28-07  01.05.13  Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS
13762ae194dSScott Long  *                      Broadcast Event Data (replacing _RESERVED2).
13862ae194dSScott Long  *                      For Discovery Error Event Data DiscoveryStatus field,
13962ae194dSScott Long  *                      replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and
14062ae194dSScott Long  *                      added _MULTI_PORT_DOMAIN.
14162ae194dSScott Long  *  05-24-07  01.05.14  Added Common Boot Block type to FWDownload Request.
14262ae194dSScott Long  *                      Added Common Boot Block type to FWUpload Request.
143*1bf5a6cfSMarius Strobl  *  08-07-07  01.05.15  Added MPI_EVENT_SAS_INIT_RC_REMOVED define.
144*1bf5a6cfSMarius Strobl  *                      Added MPI_EVENT_IR2_RC_DUAL_PORT_ADDED and
145*1bf5a6cfSMarius Strobl  *                      MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED for IR2 event data.
146*1bf5a6cfSMarius Strobl  *                      Added SASAddress field to SAS Initiator Device Table
147*1bf5a6cfSMarius Strobl  *                      Overflow event data structure.
148*1bf5a6cfSMarius Strobl  *  03-28-08  01.05.16  Added two new ReasonCode values to SAS Device Status
149*1bf5a6cfSMarius Strobl  *                      Change Event data to indicate completion of internally
150*1bf5a6cfSMarius Strobl  *                      generated task management.
151*1bf5a6cfSMarius Strobl  *                      Added MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE define.
152*1bf5a6cfSMarius Strobl  *                      Added MPI_EVENT_SAS_INIT_RC_INACCESSIBLE define.
1539b631363SMatt Jacob  *  --------------------------------------------------------------------------
1549b631363SMatt Jacob  */
1559b631363SMatt Jacob 
1569b631363SMatt Jacob #ifndef MPI_IOC_H
1579b631363SMatt Jacob #define MPI_IOC_H
1589b631363SMatt Jacob 
1599b631363SMatt Jacob 
1609b631363SMatt Jacob /*****************************************************************************
1619b631363SMatt Jacob *
1629b631363SMatt Jacob *               I O C    M e s s a g e s
1639b631363SMatt Jacob *
1649b631363SMatt Jacob *****************************************************************************/
1659b631363SMatt Jacob 
1669b631363SMatt Jacob /****************************************************************************/
1679b631363SMatt Jacob /*  IOCInit message                                                         */
1689b631363SMatt Jacob /****************************************************************************/
1699b631363SMatt Jacob 
1709b631363SMatt Jacob typedef struct _MSG_IOC_INIT
1719b631363SMatt Jacob {
1729b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
1739b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
1749b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
1759b631363SMatt Jacob     U8                      Function;                   /* 03h */
1769b631363SMatt Jacob     U8                      Flags;                      /* 04h */
1779b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
1789b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
1799b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
1809b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1819b631363SMatt Jacob     U16                     ReplyFrameSize;             /* 0Ch */
1829b631363SMatt Jacob     U8                      Reserved1[2];               /* 0Eh */
1839b631363SMatt Jacob     U32                     HostMfaHighAddr;            /* 10h */
1849b631363SMatt Jacob     U32                     SenseBufferHighAddr;        /* 14h */
1859de3c85cSMatt Jacob     U32                     ReplyFifoHostSignalingAddr; /* 18h */
1869de3c85cSMatt Jacob     SGE_SIMPLE_UNION        HostPageBufferSGE;          /* 1Ch */
1879de3c85cSMatt Jacob     U16                     MsgVersion;                 /* 28h */
1889de3c85cSMatt Jacob     U16                     HeaderVersion;              /* 2Ah */
1899b631363SMatt Jacob } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
1909b631363SMatt Jacob   IOCInit_t, MPI_POINTER pIOCInit_t;
1919b631363SMatt Jacob 
1929b631363SMatt Jacob /* WhoInit values */
1939b631363SMatt Jacob #define MPI_WHOINIT_NO_ONE                              (0x00)
1949b631363SMatt Jacob #define MPI_WHOINIT_SYSTEM_BIOS                         (0x01)
1959b631363SMatt Jacob #define MPI_WHOINIT_ROM_BIOS                            (0x02)
1969b631363SMatt Jacob #define MPI_WHOINIT_PCI_PEER                            (0x03)
1979b631363SMatt Jacob #define MPI_WHOINIT_HOST_DRIVER                         (0x04)
1989b631363SMatt Jacob #define MPI_WHOINIT_MANUFACTURER                        (0x05)
1999b631363SMatt Jacob 
2009b631363SMatt Jacob /* Flags values */
2019de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT   (0x04)
2029de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL        (0x02)
2039b631363SMatt Jacob #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE              (0x01)
2049b631363SMatt Jacob 
2059de3c85cSMatt Jacob /* MsgVersion */
2069de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_MASK               (0xFF00)
2079de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT              (8)
2089de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_MASK               (0x00FF)
2099de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT              (0)
2109de3c85cSMatt Jacob 
2119de3c85cSMatt Jacob /* HeaderVersion */
2129de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_MASK             (0xFF00)
2139de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT            (8)
2149de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_MASK              (0x00FF)
2159de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT             (0)
2169de3c85cSMatt Jacob 
2179de3c85cSMatt Jacob 
2189b631363SMatt Jacob typedef struct _MSG_IOC_INIT_REPLY
2199b631363SMatt Jacob {
2209b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
2219b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
2229b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
2239b631363SMatt Jacob     U8                      Function;                   /* 03h */
2249b631363SMatt Jacob     U8                      Flags;                      /* 04h */
2259b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
2269b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
2279b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
2289b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2299b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
2309b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
2319b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
2329b631363SMatt Jacob } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
2339b631363SMatt Jacob   IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
2349b631363SMatt Jacob 
2359b631363SMatt Jacob 
2369b631363SMatt Jacob 
2379b631363SMatt Jacob /****************************************************************************/
2389b631363SMatt Jacob /*  IOC Facts message                                                       */
2399b631363SMatt Jacob /****************************************************************************/
2409b631363SMatt Jacob 
2419b631363SMatt Jacob typedef struct _MSG_IOC_FACTS
2429b631363SMatt Jacob {
2439b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
2449b631363SMatt Jacob     U8                      ChainOffset;                /* 01h */
2459b631363SMatt Jacob     U8                      Function;                   /* 02h */
2469b631363SMatt Jacob     U8                      Reserved1[3];               /* 03h */
2479b631363SMatt Jacob     U8                      MsgFlags;                   /* 04h */
2489b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2499b631363SMatt Jacob } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
2509b631363SMatt Jacob   IOCFacts_t, MPI_POINTER pIOCFacts_t;
2519b631363SMatt Jacob 
2529b631363SMatt Jacob typedef struct _MPI_FW_VERSION_STRUCT
2539b631363SMatt Jacob {
2549b631363SMatt Jacob     U8                      Dev;                        /* 00h */
2559b631363SMatt Jacob     U8                      Unit;                       /* 01h */
2569b631363SMatt Jacob     U8                      Minor;                      /* 02h */
2579b631363SMatt Jacob     U8                      Major;                      /* 03h */
2589b631363SMatt Jacob } MPI_FW_VERSION_STRUCT;
2599b631363SMatt Jacob 
2609b631363SMatt Jacob typedef union _MPI_FW_VERSION
2619b631363SMatt Jacob {
2629b631363SMatt Jacob     MPI_FW_VERSION_STRUCT   Struct;
2639b631363SMatt Jacob     U32                     Word;
2649b631363SMatt Jacob } MPI_FW_VERSION;
2659b631363SMatt Jacob 
2669b631363SMatt Jacob /* IOC Facts Reply */
2679b631363SMatt Jacob typedef struct _MSG_IOC_FACTS_REPLY
2689b631363SMatt Jacob {
2699b631363SMatt Jacob     U16                     MsgVersion;                 /* 00h */
2709b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
2719b631363SMatt Jacob     U8                      Function;                   /* 03h */
2727fed69eeSMatt Jacob     U16                     HeaderVersion;              /* 04h */
2739b631363SMatt Jacob     U8                      IOCNumber;                  /* 06h */
2749b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
2759b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2769b631363SMatt Jacob     U16                     IOCExceptions;              /* 0Ch */
2779b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
2789b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
2799b631363SMatt Jacob     U8                      MaxChainDepth;              /* 14h */
2809b631363SMatt Jacob     U8                      WhoInit;                    /* 15h */
2819b631363SMatt Jacob     U8                      BlockSize;                  /* 16h */
2829b631363SMatt Jacob     U8                      Flags;                      /* 17h */
2839b631363SMatt Jacob     U16                     ReplyQueueDepth;            /* 18h */
2849b631363SMatt Jacob     U16                     RequestFrameSize;           /* 1Ah */
2859b631363SMatt Jacob     U16                     Reserved_0101_FWVersion;    /* 1Ch */ /* obsolete 16-bit FWVersion */
2869b631363SMatt Jacob     U16                     ProductID;                  /* 1Eh */
2879b631363SMatt Jacob     U32                     CurrentHostMfaHighAddr;     /* 20h */
2889b631363SMatt Jacob     U16                     GlobalCredits;              /* 24h */
2899b631363SMatt Jacob     U8                      NumberOfPorts;              /* 26h */
2909b631363SMatt Jacob     U8                      EventState;                 /* 27h */
2919b631363SMatt Jacob     U32                     CurrentSenseBufferHighAddr; /* 28h */
2929b631363SMatt Jacob     U16                     CurReplyFrameSize;          /* 2Ch */
2939b631363SMatt Jacob     U8                      MaxDevices;                 /* 2Eh */
2949b631363SMatt Jacob     U8                      MaxBuses;                   /* 2Fh */
2959b631363SMatt Jacob     U32                     FWImageSize;                /* 30h */
2969de3c85cSMatt Jacob     U32                     IOCCapabilities;            /* 34h */
2979b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 38h */
2989de3c85cSMatt Jacob     U16                     HighPriorityQueueDepth;     /* 3Ch */
2999de3c85cSMatt Jacob     U16                     Reserved2;                  /* 3Eh */
3009de3c85cSMatt Jacob     SGE_SIMPLE_UNION        HostPageBufferSGE;          /* 40h */
3019de3c85cSMatt Jacob     U32                     ReplyFifoHostSignalingAddr; /* 4Ch */
3029b631363SMatt Jacob } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
3039b631363SMatt Jacob   IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
3049b631363SMatt Jacob 
3059b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK              (0xFF00)
3069de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT             (8)
3079b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK              (0x00FF)
3089de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT             (0)
3099b631363SMatt Jacob 
3109de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_MASK               (0xFF00)
3119de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT              (8)
3129de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_MASK                (0x00FF)
3139de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT               (0)
3147fed69eeSMatt Jacob 
3159b631363SMatt Jacob #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL        (0x0001)
3167fed69eeSMatt Jacob #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID         (0x0002)
3179de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL            (0x0004)
3189de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL       (0x0008)
31962ae194dSScott Long #define MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED        (0x0010)
3209b631363SMatt Jacob 
3219b631363SMatt Jacob #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT             (0x01)
3229de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL       (0x02)
3239de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT  (0x04)
3249b631363SMatt Jacob 
3259b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_DISABLED                (0x00)
3269b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_ENABLED                 (0x01)
3279b631363SMatt Jacob 
3289de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q              (0x00000001)
3299de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL       (0x00000002)
3309de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING     (0x00000004)
3319de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER       (0x00000008)
3329de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER         (0x00000010)
3339de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER         (0x00000020)
3349de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EEDP                    (0x00000040)
3359de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL           (0x00000080)
3369de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_MULTICAST               (0x00000100)
3379de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SCSIIO32                (0x00000200)
3389de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16             (0x00000400)
33962ae194dSScott Long #define MPI_IOCFACTS_CAPABILITY_TLR                     (0x00000800)
3409b631363SMatt Jacob 
3419b631363SMatt Jacob 
3429b631363SMatt Jacob /*****************************************************************************
3439b631363SMatt Jacob *
3449b631363SMatt Jacob *               P o r t    M e s s a g e s
3459b631363SMatt Jacob *
3469b631363SMatt Jacob *****************************************************************************/
3479b631363SMatt Jacob 
3489b631363SMatt Jacob /****************************************************************************/
3499b631363SMatt Jacob /*  Port Facts message and Reply                                            */
3509b631363SMatt Jacob /****************************************************************************/
3519b631363SMatt Jacob 
3529b631363SMatt Jacob typedef struct _MSG_PORT_FACTS
3539b631363SMatt Jacob {
3549b631363SMatt Jacob      U8                     Reserved[2];                /* 00h */
3559b631363SMatt Jacob      U8                     ChainOffset;                /* 02h */
3569b631363SMatt Jacob      U8                     Function;                   /* 03h */
3579b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
3589b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
3599b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
3609b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
3619b631363SMatt Jacob } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
3629b631363SMatt Jacob   PortFacts_t, MPI_POINTER pPortFacts_t;
3639b631363SMatt Jacob 
3649b631363SMatt Jacob typedef struct _MSG_PORT_FACTS_REPLY
3659b631363SMatt Jacob {
3669b631363SMatt Jacob      U16                    Reserved;                   /* 00h */
3679b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
3689b631363SMatt Jacob      U8                     Function;                   /* 03h */
3699b631363SMatt Jacob      U16                    Reserved1;                  /* 04h */
3709b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
3719b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
3729b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
3739b631363SMatt Jacob      U16                    Reserved2;                  /* 0Ch */
3749b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
3759b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
3769b631363SMatt Jacob      U8                     Reserved3;                  /* 14h */
3779b631363SMatt Jacob      U8                     PortType;                   /* 15h */
3789b631363SMatt Jacob      U16                    MaxDevices;                 /* 16h */
3799b631363SMatt Jacob      U16                    PortSCSIID;                 /* 18h */
3809b631363SMatt Jacob      U16                    ProtocolFlags;              /* 1Ah */
3819b631363SMatt Jacob      U16                    MaxPostedCmdBuffers;        /* 1Ch */
3829b631363SMatt Jacob      U16                    MaxPersistentIDs;           /* 1Eh */
3839b631363SMatt Jacob      U16                    MaxLanBuckets;              /* 20h */
38462ae194dSScott Long      U8                     MaxInitiators;              /* 22h */
38562ae194dSScott Long      U8                     Reserved4;                  /* 23h */
3869b631363SMatt Jacob      U32                    Reserved5;                  /* 24h */
3879b631363SMatt Jacob } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
3889b631363SMatt Jacob   PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
3899b631363SMatt Jacob 
3909b631363SMatt Jacob 
3919b631363SMatt Jacob /* PortTypes values */
3929b631363SMatt Jacob 
3939b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_INACTIVE         (0x00)
3949b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SCSI             (0x01)
3959b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_FC               (0x10)
3969de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_ISCSI            (0x20)
3979de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SAS              (0x30)
3989b631363SMatt Jacob 
3999b631363SMatt Jacob /* ProtocolFlags values */
4009b631363SMatt Jacob 
4019b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR       (0x01)
4029b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LAN              (0x02)
4039b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_TARGET           (0x04)
4049b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_INITIATOR        (0x08)
4059b631363SMatt Jacob 
4069b631363SMatt Jacob 
4079b631363SMatt Jacob /****************************************************************************/
4089b631363SMatt Jacob /*  Port Enable Message                                                     */
4099b631363SMatt Jacob /****************************************************************************/
4109b631363SMatt Jacob 
4119b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE
4129b631363SMatt Jacob {
4139b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4149b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4159b631363SMatt Jacob     U8                      Function;                   /* 03h */
4169b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
4179b631363SMatt Jacob     U8                      PortNumber;                 /* 06h */
4189b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4199b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4209b631363SMatt Jacob } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
4219b631363SMatt Jacob   PortEnable_t, MPI_POINTER pPortEnable_t;
4229b631363SMatt Jacob 
4239b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE_REPLY
4249b631363SMatt Jacob {
4259b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4269b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
4279b631363SMatt Jacob     U8                      Function;                   /* 03h */
4289b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
4299b631363SMatt Jacob     U8                      PortNumber;                 /* 05h */
4309b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4319b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4329b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
4339b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
4349b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
4359b631363SMatt Jacob } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
4369b631363SMatt Jacob   PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
4379b631363SMatt Jacob 
4389b631363SMatt Jacob 
4399b631363SMatt Jacob /*****************************************************************************
4409b631363SMatt Jacob *
4419b631363SMatt Jacob *               E v e n t    M e s s a g e s
4429b631363SMatt Jacob *
4439b631363SMatt Jacob *****************************************************************************/
4449b631363SMatt Jacob 
4459b631363SMatt Jacob /****************************************************************************/
4469b631363SMatt Jacob /*  Event Notification messages                                             */
4479b631363SMatt Jacob /****************************************************************************/
4489b631363SMatt Jacob 
4499b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY
4509b631363SMatt Jacob {
4519b631363SMatt Jacob     U8                      Switch;                     /* 00h */
4529b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
4539b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4549b631363SMatt Jacob     U8                      Function;                   /* 03h */
4559b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
4569b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4579b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4589b631363SMatt Jacob } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
4599b631363SMatt Jacob   EventNotification_t, MPI_POINTER pEventNotification_t;
4609b631363SMatt Jacob 
4619b631363SMatt Jacob /* Event Notification Reply */
4629b631363SMatt Jacob 
4639b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY_REPLY
4649b631363SMatt Jacob {
4659b631363SMatt Jacob      U16                    EventDataLength;            /* 00h */
4669b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
4679b631363SMatt Jacob      U8                     Function;                   /* 03h */
4689b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
4699b631363SMatt Jacob      U8                     AckRequired;                /* 06h */
4709b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
4719b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
4729b631363SMatt Jacob      U8                     Reserved2[2];               /* 0Ch */
4739b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
4749b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
4759b631363SMatt Jacob      U32                    Event;                      /* 14h */
4769b631363SMatt Jacob      U32                    EventContext;               /* 18h */
4779b631363SMatt Jacob      U32                    Data[1];                    /* 1Ch */
4789b631363SMatt Jacob } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
4799b631363SMatt Jacob   EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
4809b631363SMatt Jacob 
4819b631363SMatt Jacob /* Event Acknowledge */
4829b631363SMatt Jacob 
4839b631363SMatt Jacob typedef struct _MSG_EVENT_ACK
4849b631363SMatt Jacob {
4859b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4869b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4879b631363SMatt Jacob     U8                      Function;                   /* 03h */
4889b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
4899b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4909b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4919b631363SMatt Jacob     U32                     Event;                      /* 0Ch */
4929b631363SMatt Jacob     U32                     EventContext;               /* 10h */
4939b631363SMatt Jacob } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
4949b631363SMatt Jacob   EventAck_t, MPI_POINTER pEventAck_t;
4959b631363SMatt Jacob 
4969b631363SMatt Jacob typedef struct _MSG_EVENT_ACK_REPLY
4979b631363SMatt Jacob {
4989b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4999b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
5009b631363SMatt Jacob     U8                      Function;                   /* 03h */
5019b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
5029b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
5039b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
5049b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
5059b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
5069b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
5079b631363SMatt Jacob } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
5089b631363SMatt Jacob   EventAckReply_t, MPI_POINTER pEventAckReply_t;
5099b631363SMatt Jacob 
5109b631363SMatt Jacob /* Switch */
5119b631363SMatt Jacob 
5129b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_OFF   (0x00)
5139b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_ON    (0x01)
5149b631363SMatt Jacob 
5159b631363SMatt Jacob /* Event */
5169b631363SMatt Jacob 
5179b631363SMatt Jacob #define MPI_EVENT_NONE                          (0x00000000)
5189b631363SMatt Jacob #define MPI_EVENT_LOG_DATA                      (0x00000001)
5199b631363SMatt Jacob #define MPI_EVENT_STATE_CHANGE                  (0x00000002)
5209b631363SMatt Jacob #define MPI_EVENT_UNIT_ATTENTION                (0x00000003)
5219b631363SMatt Jacob #define MPI_EVENT_IOC_BUS_RESET                 (0x00000004)
5229b631363SMatt Jacob #define MPI_EVENT_EXT_BUS_RESET                 (0x00000005)
5239b631363SMatt Jacob #define MPI_EVENT_RESCAN                        (0x00000006)
5249b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_CHANGE            (0x00000007)
5259b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE             (0x00000008)
5269b631363SMatt Jacob #define MPI_EVENT_LOGOUT                        (0x00000009)
5279b631363SMatt Jacob #define MPI_EVENT_EVENT_CHANGE                  (0x0000000A)
5289b631363SMatt Jacob #define MPI_EVENT_INTEGRATED_RAID               (0x0000000B)
5299b631363SMatt Jacob #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE     (0x0000000C)
5309b631363SMatt Jacob #define MPI_EVENT_ON_BUS_TIMER_EXPIRED          (0x0000000D)
5319de3c85cSMatt Jacob #define MPI_EVENT_QUEUE_FULL                    (0x0000000E)
5329de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE      (0x0000000F)
5339de3c85cSMatt Jacob #define MPI_EVENT_SAS_SES                       (0x00000010)
5349de3c85cSMatt Jacob #define MPI_EVENT_PERSISTENT_TABLE_FULL         (0x00000011)
5359de3c85cSMatt Jacob #define MPI_EVENT_SAS_PHY_LINK_STATUS           (0x00000012)
5369de3c85cSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY_ERROR           (0x00000013)
5370b80d21bSMatt Jacob #define MPI_EVENT_IR_RESYNC_UPDATE              (0x00000014)
5380b80d21bSMatt Jacob #define MPI_EVENT_IR2                           (0x00000015)
5390b80d21bSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY                 (0x00000016)
54062ae194dSScott Long #define MPI_EVENT_SAS_BROADCAST_PRIMITIVE       (0x00000017)
54162ae194dSScott Long #define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x00000018)
54262ae194dSScott Long #define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW       (0x00000019)
54362ae194dSScott Long #define MPI_EVENT_SAS_SMP_ERROR                 (0x0000001A)
54462ae194dSScott Long #define MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE    (0x0000001B)
5450b80d21bSMatt Jacob #define MPI_EVENT_LOG_ENTRY_ADDED               (0x00000021)
5469b631363SMatt Jacob 
5479b631363SMatt Jacob /* AckRequired field values */
5489b631363SMatt Jacob 
5499b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
5509b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED     (0x01)
5519b631363SMatt Jacob 
5529b631363SMatt Jacob /* EventChange Event data */
5539b631363SMatt Jacob 
5549b631363SMatt Jacob typedef struct _EVENT_DATA_EVENT_CHANGE
5559b631363SMatt Jacob {
5569b631363SMatt Jacob     U8                      EventState;                 /* 00h */
5579b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
5589b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
5599b631363SMatt Jacob } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
5609b631363SMatt Jacob   EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
5619b631363SMatt Jacob 
5620b80d21bSMatt Jacob /* LogEntryAdded Event data */
5630b80d21bSMatt Jacob 
5640b80d21bSMatt Jacob /* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */
5650b80d21bSMatt Jacob #define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH    (0x1C)
5660b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY
5670b80d21bSMatt Jacob {
5680b80d21bSMatt Jacob     U32         TimeStamp;                          /* 00h */
5690b80d21bSMatt Jacob     U32         Reserved1;                          /* 04h */
5700b80d21bSMatt Jacob     U16         LogSequence;                        /* 08h */
5710b80d21bSMatt Jacob     U16         LogEntryQualifier;                  /* 0Ah */
5720b80d21bSMatt Jacob     U8          LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */
5730b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY,
5740b80d21bSMatt Jacob   MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t;
5750b80d21bSMatt Jacob 
5760b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY_ADDED
5770b80d21bSMatt Jacob {
5780b80d21bSMatt Jacob     U16                     LogSequence;            /* 00h */
5790b80d21bSMatt Jacob     U16                     Reserved1;              /* 02h */
5800b80d21bSMatt Jacob     U32                     Reserved2;              /* 04h */
5810b80d21bSMatt Jacob     EVENT_DATA_LOG_ENTRY    LogEntry;               /* 08h */
5820b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED,
5830b80d21bSMatt Jacob   MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t;
5840b80d21bSMatt Jacob 
5859b631363SMatt Jacob /* SCSI Event data for Port, Bus and Device forms */
5869b631363SMatt Jacob 
5879b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI
5889b631363SMatt Jacob {
5899b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
5909b631363SMatt Jacob     U8                      BusPort;                    /* 01h */
5919b631363SMatt Jacob     U16                     Reserved;                   /* 02h */
5929b631363SMatt Jacob } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
5939b631363SMatt Jacob   EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
5949b631363SMatt Jacob 
5959b631363SMatt Jacob /* SCSI Device Status Change Event data */
5969b631363SMatt Jacob 
5979b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
5989b631363SMatt Jacob {
5999b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
6009b631363SMatt Jacob     U8                      Bus;                        /* 01h */
6019b631363SMatt Jacob     U8                      ReasonCode;                 /* 02h */
6029b631363SMatt Jacob     U8                      LUN;                        /* 03h */
6039b631363SMatt Jacob     U8                      ASC;                        /* 04h */
6049b631363SMatt Jacob     U8                      ASCQ;                       /* 05h */
6059b631363SMatt Jacob     U16                     Reserved;                   /* 06h */
6069b631363SMatt Jacob } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
6079b631363SMatt Jacob   MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
6089b631363SMatt Jacob   MpiEventDataScsiDeviceStatusChange_t,
6099b631363SMatt Jacob   MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
6109b631363SMatt Jacob 
6119b631363SMatt Jacob /* MPI SCSI Device Status Change Event data ReasonCode values */
6129b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED                (0x03)
6139b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING       (0x04)
6149b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA           (0x05)
6159b631363SMatt Jacob 
6169de3c85cSMatt Jacob /* SAS Device Status Change Event data */
6179de3c85cSMatt Jacob 
6189de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
6199de3c85cSMatt Jacob {
6209de3c85cSMatt Jacob     U8                      TargetID;                   /* 00h */
6219de3c85cSMatt Jacob     U8                      Bus;                        /* 01h */
6229de3c85cSMatt Jacob     U8                      ReasonCode;                 /* 02h */
6239de3c85cSMatt Jacob     U8                      Reserved;                   /* 03h */
6249de3c85cSMatt Jacob     U8                      ASC;                        /* 04h */
6259de3c85cSMatt Jacob     U8                      ASCQ;                       /* 05h */
6269de3c85cSMatt Jacob     U16                     DevHandle;                  /* 06h */
6279de3c85cSMatt Jacob     U32                     DeviceInfo;                 /* 08h */
6289de3c85cSMatt Jacob     U16                     ParentDevHandle;            /* 0Ch */
6299de3c85cSMatt Jacob     U8                      PhyNum;                     /* 0Eh */
6309de3c85cSMatt Jacob     U8                      Reserved1;                  /* 0Fh */
6319de3c85cSMatt Jacob     U64                     SASAddress;                 /* 10h */
63262ae194dSScott Long     U8                      LUN[8];                     /* 18h */
63362ae194dSScott Long     U16                     TaskTag;                    /* 20h */
63462ae194dSScott Long     U16                     Reserved2;                  /* 22h */
6359de3c85cSMatt Jacob } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
6369de3c85cSMatt Jacob   MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
6379de3c85cSMatt Jacob   MpiEventDataSasDeviceStatusChange_t,
6389de3c85cSMatt Jacob   MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
6399de3c85cSMatt Jacob 
6409de3c85cSMatt Jacob /* MPI SAS Device Status Change Event data ReasonCode values */
6419de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED                     (0x03)
6429de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING            (0x04)
6439de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA                (0x05)
6449de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED          (0x06)
6459de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED               (0x07)
6460b80d21bSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET     (0x08)
64762ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL       (0x09)
64862ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL   (0x0A)
64962ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL   (0x0B)
65062ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL       (0x0C)
65162ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION        (0x0D)
652*1bf5a6cfSMarius Strobl #define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET   (0x0E)
653*1bf5a6cfSMarius Strobl #define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL  (0x0F)
6549de3c85cSMatt Jacob 
6559de3c85cSMatt Jacob 
6569de3c85cSMatt Jacob /* SCSI Event data for Queue Full event */
6579de3c85cSMatt Jacob 
6589de3c85cSMatt Jacob typedef struct _EVENT_DATA_QUEUE_FULL
6599de3c85cSMatt Jacob {
6609de3c85cSMatt Jacob     U8                      TargetID;                   /* 00h */
6619de3c85cSMatt Jacob     U8                      Bus;                        /* 01h */
6629de3c85cSMatt Jacob     U16                     CurrentDepth;               /* 02h */
6639de3c85cSMatt Jacob } EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
6649de3c85cSMatt Jacob   EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
6659de3c85cSMatt Jacob 
6669de3c85cSMatt Jacob /* MPI Integrated RAID Event data */
6679de3c85cSMatt Jacob 
6689de3c85cSMatt Jacob typedef struct _EVENT_DATA_RAID
6699de3c85cSMatt Jacob {
6709de3c85cSMatt Jacob     U8                      VolumeID;                   /* 00h */
6719de3c85cSMatt Jacob     U8                      VolumeBus;                  /* 01h */
6729de3c85cSMatt Jacob     U8                      ReasonCode;                 /* 02h */
6739de3c85cSMatt Jacob     U8                      PhysDiskNum;                /* 03h */
6749de3c85cSMatt Jacob     U8                      ASC;                        /* 04h */
6759de3c85cSMatt Jacob     U8                      ASCQ;                       /* 05h */
6769de3c85cSMatt Jacob     U16                     Reserved;                   /* 06h */
6779de3c85cSMatt Jacob     U32                     SettingsStatus;             /* 08h */
6789de3c85cSMatt Jacob } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
6799de3c85cSMatt Jacob   MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
6809de3c85cSMatt Jacob 
6819de3c85cSMatt Jacob /* MPI Integrated RAID Event data ReasonCode values */
6829de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_CREATED                (0x00)
6839de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_DELETED                (0x01)
6849de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED       (0x02)
6859de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED         (0x03)
6869de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED       (0x04)
6879de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED              (0x05)
6889de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED              (0x06)
6899de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED     (0x07)
6909de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED       (0x08)
6919de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED             (0x09)
6929de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_SMART_DATA                    (0x0A)
6939de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED        (0x0B)
6949de3c85cSMatt Jacob 
6950b80d21bSMatt Jacob 
6960b80d21bSMatt Jacob /* MPI Integrated RAID Resync Update Event data */
6970b80d21bSMatt Jacob 
6980b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE
6990b80d21bSMatt Jacob {
7000b80d21bSMatt Jacob     U8                      VolumeID;                   /* 00h */
7010b80d21bSMatt Jacob     U8                      VolumeBus;                  /* 01h */
7020b80d21bSMatt Jacob     U8                      ResyncComplete;             /* 02h */
7030b80d21bSMatt Jacob     U8                      Reserved1;                  /* 03h */
7040b80d21bSMatt Jacob     U32                     Reserved2;                  /* 04h */
7050b80d21bSMatt Jacob } MPI_EVENT_DATA_IR_RESYNC_UPDATE,
7060b80d21bSMatt Jacob   MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE,
7070b80d21bSMatt Jacob   MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t;
7080b80d21bSMatt Jacob 
7090b80d21bSMatt Jacob /* MPI IR2 Event data */
7100b80d21bSMatt Jacob 
7110b80d21bSMatt Jacob /* MPI_LD_STATE or MPI_PD_STATE */
7120b80d21bSMatt Jacob typedef struct _IR2_STATE_CHANGED
7130b80d21bSMatt Jacob {
7140b80d21bSMatt Jacob     U16                 PreviousState;  /* 00h */
7150b80d21bSMatt Jacob     U16                 NewState;       /* 02h */
7160b80d21bSMatt Jacob } IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED;
7170b80d21bSMatt Jacob 
7180b80d21bSMatt Jacob typedef struct _IR2_PD_INFO
7190b80d21bSMatt Jacob {
7200b80d21bSMatt Jacob     U16                 DeviceHandle;           /* 00h */
7210b80d21bSMatt Jacob     U8                  TruncEnclosureHandle;   /* 02h */
7220b80d21bSMatt Jacob     U8                  TruncatedSlot;          /* 03h */
7230b80d21bSMatt Jacob } IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO;
7240b80d21bSMatt Jacob 
7250b80d21bSMatt Jacob typedef union _MPI_IR2_RC_EVENT_DATA
7260b80d21bSMatt Jacob {
7270b80d21bSMatt Jacob     IR2_STATE_CHANGED   StateChanged;
7280b80d21bSMatt Jacob     U32                 Lba;
7290b80d21bSMatt Jacob     IR2_PD_INFO         PdInfo;
7300b80d21bSMatt Jacob } MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA;
7310b80d21bSMatt Jacob 
7320b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR2
7330b80d21bSMatt Jacob {
7340b80d21bSMatt Jacob     U8                      TargetID;             /* 00h */
7350b80d21bSMatt Jacob     U8                      Bus;                  /* 01h */
7360b80d21bSMatt Jacob     U8                      ReasonCode;           /* 02h */
7370b80d21bSMatt Jacob     U8                      PhysDiskNum;          /* 03h */
7380b80d21bSMatt Jacob     MPI_IR2_RC_EVENT_DATA   IR2EventData;         /* 04h */
7390b80d21bSMatt Jacob } MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2,
7400b80d21bSMatt Jacob   MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t;
7410b80d21bSMatt Jacob 
7420b80d21bSMatt Jacob /* MPI IR2 Event data ReasonCode values */
7430b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_LD_STATE_CHANGED           (0x01)
7440b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_STATE_CHANGED           (0x02)
7450b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL       (0x03)
7460b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_INSERTED                (0x04)
7470b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_REMOVED                 (0x05)
7480b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED       (0x06)
7490b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR       (0x07)
750*1bf5a6cfSMarius Strobl #define MPI_EVENT_IR2_RC_DUAL_PORT_ADDED            (0x08)
751*1bf5a6cfSMarius Strobl #define MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED          (0x09)
7520b80d21bSMatt Jacob 
7530b80d21bSMatt Jacob /* defines for logical disk states */
7540b80d21bSMatt Jacob #define MPI_LD_STATE_OPTIMAL                        (0x00)
7550b80d21bSMatt Jacob #define MPI_LD_STATE_DEGRADED                       (0x01)
7560b80d21bSMatt Jacob #define MPI_LD_STATE_FAILED                         (0x02)
7570b80d21bSMatt Jacob #define MPI_LD_STATE_MISSING                        (0x03)
7580b80d21bSMatt Jacob #define MPI_LD_STATE_OFFLINE                        (0x04)
7590b80d21bSMatt Jacob 
7600b80d21bSMatt Jacob /* defines for physical disk states */
7610b80d21bSMatt Jacob #define MPI_PD_STATE_ONLINE                         (0x00)
7620b80d21bSMatt Jacob #define MPI_PD_STATE_MISSING                        (0x01)
7630b80d21bSMatt Jacob #define MPI_PD_STATE_NOT_COMPATIBLE                 (0x02)
7640b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED                         (0x03)
7650b80d21bSMatt Jacob #define MPI_PD_STATE_INITIALIZING                   (0x04)
7660b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST        (0x05)
7670b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED_AT_HOST_REQUEST         (0x06)
7680b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON     (0xFF)
7690b80d21bSMatt Jacob 
7709b631363SMatt Jacob /* MPI Link Status Change Event data */
7719b631363SMatt Jacob 
7729b631363SMatt Jacob typedef struct _EVENT_DATA_LINK_STATUS
7739b631363SMatt Jacob {
7749b631363SMatt Jacob     U8                      State;                      /* 00h */
7759b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
7769b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
7779b631363SMatt Jacob     U8                      Reserved2;                  /* 04h */
7789b631363SMatt Jacob     U8                      Port;                       /* 05h */
7799b631363SMatt Jacob     U16                     Reserved3;                  /* 06h */
7809b631363SMatt Jacob } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
7819b631363SMatt Jacob   EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
7829b631363SMatt Jacob 
7839b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_FAILURE       (0x00000000)
7849b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_ACTIVE        (0x00000001)
7859b631363SMatt Jacob 
7869b631363SMatt Jacob /* MPI Loop State Change Event data */
7879b631363SMatt Jacob 
7889b631363SMatt Jacob typedef struct _EVENT_DATA_LOOP_STATE
7899b631363SMatt Jacob {
7909b631363SMatt Jacob     U8                      Character4;                 /* 00h */
7919b631363SMatt Jacob     U8                      Character3;                 /* 01h */
7929b631363SMatt Jacob     U8                      Type;                       /* 02h */
7939b631363SMatt Jacob     U8                      Reserved;                   /* 03h */
7949b631363SMatt Jacob     U8                      Reserved1;                  /* 04h */
7959b631363SMatt Jacob     U8                      Port;                       /* 05h */
7969b631363SMatt Jacob     U16                     Reserved2;                  /* 06h */
7979b631363SMatt Jacob } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
7989b631363SMatt Jacob   EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
7999b631363SMatt Jacob 
8009b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LIP     (0x0001)
8019b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPE     (0x0002)
8029b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPB     (0x0003)
8039b631363SMatt Jacob 
8049b631363SMatt Jacob /* MPI LOGOUT Event data */
8059b631363SMatt Jacob 
8069b631363SMatt Jacob typedef struct _EVENT_DATA_LOGOUT
8079b631363SMatt Jacob {
8089b631363SMatt Jacob     U32                     NPortID;                    /* 00h */
8097fed69eeSMatt Jacob     U8                      AliasIndex;                 /* 04h */
8109b631363SMatt Jacob     U8                      Port;                       /* 05h */
8119b631363SMatt Jacob     U16                     Reserved1;                  /* 06h */
8129b631363SMatt Jacob } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
8139b631363SMatt Jacob   EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
8149b631363SMatt Jacob 
8157fed69eeSMatt Jacob #define MPI_EVENT_LOGOUT_ALL_ALIASES        (0xFF)
8167fed69eeSMatt Jacob 
8179de3c85cSMatt Jacob /* SAS SES Event data */
8187fed69eeSMatt Jacob 
8199de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_SES
8209b631363SMatt Jacob {
8219de3c85cSMatt Jacob     U8                      PhyNum;                     /* 00h */
8229de3c85cSMatt Jacob     U8                      Port;                       /* 01h */
8239de3c85cSMatt Jacob     U8                      PortWidth;                  /* 02h */
8249de3c85cSMatt Jacob     U8                      Reserved1;                  /* 04h */
8259de3c85cSMatt Jacob } EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES,
8269de3c85cSMatt Jacob   MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t;
8279b631363SMatt Jacob 
82862ae194dSScott Long /* SAS Broadcast Primitive Event data */
82962ae194dSScott Long 
83062ae194dSScott Long typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE
83162ae194dSScott Long {
83262ae194dSScott Long     U8                      PhyNum;                     /* 00h */
83362ae194dSScott Long     U8                      Port;                       /* 01h */
83462ae194dSScott Long     U8                      PortWidth;                  /* 02h */
83562ae194dSScott Long     U8                      Primitive;                  /* 04h */
83662ae194dSScott Long } EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
83762ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
83862ae194dSScott Long   MpiEventDataSasBroadcastPrimitive_t,
83962ae194dSScott Long   MPI_POINTER pMpiEventDataSasBroadcastPrimitive_t;
84062ae194dSScott Long 
84162ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE              (0x01)
84262ae194dSScott Long #define MPI_EVENT_PRIMITIVE_EXPANDER            (0x03)
84362ae194dSScott Long #define MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT  (0x04)
84462ae194dSScott Long #define MPI_EVENT_PRIMITIVE_RESERVED3           (0x05)
84562ae194dSScott Long #define MPI_EVENT_PRIMITIVE_RESERVED4           (0x06)
84662ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED    (0x07)
84762ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE1_RESERVED    (0x08)
84862ae194dSScott Long 
8499de3c85cSMatt Jacob /* SAS Phy Link Status Event data */
8509de3c85cSMatt Jacob 
8519de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS
8529de3c85cSMatt Jacob {
8539de3c85cSMatt Jacob     U8                      PhyNum;                     /* 00h */
8549de3c85cSMatt Jacob     U8                      LinkRates;                  /* 01h */
8559de3c85cSMatt Jacob     U16                     DevHandle;                  /* 02h */
8569de3c85cSMatt Jacob     U64                     SASAddress;                 /* 04h */
8579de3c85cSMatt Jacob } EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS,
8589de3c85cSMatt Jacob   MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t;
8599de3c85cSMatt Jacob 
8609de3c85cSMatt Jacob /* defines for the LinkRates field of the SAS PHY Link Status event */
8619de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK                   (0xF0)
8629de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT                  (4)
8639de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK                  (0x0F)
8649de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT                 (0)
8659de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN                   (0x00)
8669de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED              (0x01)
8679de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION  (0x02)
8689de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE         (0x03)
8699de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_1_5                       (0x08)
8709de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_3_0                       (0x09)
8719de3c85cSMatt Jacob 
8720b80d21bSMatt Jacob /* SAS Discovery Event data */
8730b80d21bSMatt Jacob 
8740b80d21bSMatt Jacob typedef struct _EVENT_DATA_SAS_DISCOVERY
8750b80d21bSMatt Jacob {
8760b80d21bSMatt Jacob     U32                     DiscoveryStatus;            /* 00h */
8770b80d21bSMatt Jacob     U32                     Reserved1;                  /* 04h */
8780b80d21bSMatt Jacob } EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY,
8790b80d21bSMatt Jacob   EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t;
8800b80d21bSMatt Jacob 
8810b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_COMPLETE                       (0x00000000)
8820b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS                    (0x00000001)
8830b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK                  (0xFFFF0000)
8840b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT                 (16)
8850b80d21bSMatt Jacob 
8869de3c85cSMatt Jacob /* SAS Discovery Errror Event data */
8879de3c85cSMatt Jacob 
8889de3c85cSMatt Jacob typedef struct _EVENT_DATA_DISCOVERY_ERROR
8899de3c85cSMatt Jacob {
8909de3c85cSMatt Jacob     U32                     DiscoveryStatus;            /* 00h */
8919de3c85cSMatt Jacob     U8                      Port;                       /* 04h */
8929de3c85cSMatt Jacob     U8                      Reserved1;                  /* 05h */
8939de3c85cSMatt Jacob     U16                     Reserved2;                  /* 06h */
8949de3c85cSMatt Jacob } EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR,
8959de3c85cSMatt Jacob   EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t;
8969de3c85cSMatt Jacob 
8979de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED               (0x00000001)
8989de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE        (0x00000002)
8999de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS              (0x00000004)
9009de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR                (0x00000008)
9019de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT                 (0x00000010)
9029de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES           (0x00000020)
9039de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST             (0x00000040)
9049de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED         (0x00000080)
9059de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR               (0x00000100)
9069de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE          (0x00000200)
9079de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE              (0x00000400)
90862ae194dSScott Long #define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE          (0x00000800)
9099de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS            (0x00001000)
91062ae194dSScott Long #define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN           (0x00002000)
911*1bf5a6cfSMarius Strobl #define MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE           (0x00004000)
91262ae194dSScott Long 
91362ae194dSScott Long /* SAS SMP Error Event data */
91462ae194dSScott Long 
91562ae194dSScott Long typedef struct _EVENT_DATA_SAS_SMP_ERROR
91662ae194dSScott Long {
91762ae194dSScott Long     U8                      Status;                     /* 00h */
91862ae194dSScott Long     U8                      Port;                       /* 01h */
91962ae194dSScott Long     U8                      SMPFunctionResult;          /* 02h */
92062ae194dSScott Long     U8                      Reserved1;                  /* 03h */
92162ae194dSScott Long     U64                     SASAddress;                 /* 04h */
92262ae194dSScott Long } EVENT_DATA_SAS_SMP_ERROR, MPI_POINTER PTR_EVENT_DATA_SAS_SMP_ERROR,
92362ae194dSScott Long   MpiEventDataSasSmpError_t, MPI_POINTER pMpiEventDataSasSmpError_t;
92462ae194dSScott Long 
92562ae194dSScott Long /* defines for the Status field of the SAS SMP Error event */
92662ae194dSScott Long #define MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID         (0x00)
92762ae194dSScott Long #define MPI_EVENT_SAS_SMP_CRC_ERROR                     (0x01)
92862ae194dSScott Long #define MPI_EVENT_SAS_SMP_TIMEOUT                       (0x02)
92962ae194dSScott Long #define MPI_EVENT_SAS_SMP_NO_DESTINATION                (0x03)
93062ae194dSScott Long #define MPI_EVENT_SAS_SMP_BAD_DESTINATION               (0x04)
93162ae194dSScott Long 
93262ae194dSScott Long /* SAS Initiator Device Status Change Event data */
93362ae194dSScott Long 
93462ae194dSScott Long typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
93562ae194dSScott Long {
93662ae194dSScott Long     U8                      ReasonCode;                 /* 00h */
93762ae194dSScott Long     U8                      Port;                       /* 01h */
93862ae194dSScott Long     U16                     DevHandle;                  /* 02h */
93962ae194dSScott Long     U64                     SASAddress;                 /* 04h */
94062ae194dSScott Long } EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
94162ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
94262ae194dSScott Long   MpiEventDataSasInitDevStatusChange_t,
94362ae194dSScott Long   MPI_POINTER pMpiEventDataSasInitDevStatusChange_t;
94462ae194dSScott Long 
94562ae194dSScott Long /* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
94662ae194dSScott Long #define MPI_EVENT_SAS_INIT_RC_ADDED                 (0x01)
947*1bf5a6cfSMarius Strobl #define MPI_EVENT_SAS_INIT_RC_REMOVED               (0x02)
948*1bf5a6cfSMarius Strobl #define MPI_EVENT_SAS_INIT_RC_INACCESSIBLE          (0x03)
94962ae194dSScott Long 
95062ae194dSScott Long /* SAS Initiator Device Table Overflow Event data */
95162ae194dSScott Long 
95262ae194dSScott Long typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
95362ae194dSScott Long {
95462ae194dSScott Long     U8                      MaxInit;                    /* 00h */
95562ae194dSScott Long     U8                      CurrentInit;                /* 01h */
95662ae194dSScott Long     U16                     Reserved1;                  /* 02h */
957*1bf5a6cfSMarius Strobl     U64                     SASAddress;                 /* 04h */
95862ae194dSScott Long } EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
95962ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
96062ae194dSScott Long   MpiEventDataSasInitTableOverflow_t,
96162ae194dSScott Long   MPI_POINTER pMpiEventDataSasInitTableOverflow_t;
96262ae194dSScott Long 
96362ae194dSScott Long /* SAS Expander Status Change Event data */
96462ae194dSScott Long 
96562ae194dSScott Long typedef struct _EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE
96662ae194dSScott Long {
96762ae194dSScott Long     U8                      ReasonCode;             /* 00h */
96862ae194dSScott Long     U8                      Reserved1;              /* 01h */
96962ae194dSScott Long     U16                     Reserved2;              /* 02h */
97062ae194dSScott Long     U8                      PhysicalPort;           /* 04h */
97162ae194dSScott Long     U8                      Reserved3;              /* 05h */
97262ae194dSScott Long     U16                     EnclosureHandle;        /* 06h */
97362ae194dSScott Long     U64                     SASAddress;             /* 08h */
97462ae194dSScott Long     U32                     DiscoveryStatus;        /* 10h */
97562ae194dSScott Long     U16                     DevHandle;              /* 14h */
97662ae194dSScott Long     U16                     ParentDevHandle;        /* 16h */
97762ae194dSScott Long     U16                     ExpanderChangeCount;    /* 18h */
97862ae194dSScott Long     U16                     ExpanderRouteIndexes;   /* 1Ah */
97962ae194dSScott Long     U8                      NumPhys;                /* 1Ch */
98062ae194dSScott Long     U8                      SASLevel;               /* 1Dh */
98162ae194dSScott Long     U8                      Flags;                  /* 1Eh */
98262ae194dSScott Long     U8                      Reserved4;              /* 1Fh */
98362ae194dSScott Long } EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
98462ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
98562ae194dSScott Long   MpiEventDataSasExpanderStatusChange_t,
98662ae194dSScott Long   MPI_POINTER pMpiEventDataSasExpanderStatusChange_t;
98762ae194dSScott Long 
98862ae194dSScott Long /* values for ReasonCode field of SAS Expander Status Change Event data */
98962ae194dSScott Long #define MPI_EVENT_SAS_EXP_RC_ADDED                      (0x00)
99062ae194dSScott Long #define MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING             (0x01)
99162ae194dSScott Long 
99262ae194dSScott Long /* values for DiscoveryStatus field of SAS Expander Status Change Event data */
99362ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_LOOP_DETECTED              (0x00000001)
99462ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_UNADDRESSABLE_DEVICE       (0x00000002)
99562ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_MULTIPLE_PORTS             (0x00000004)
99662ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_EXPANDER_ERR               (0x00000008)
99762ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_TIMEOUT                (0x00000010)
99862ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_OUT_ROUTE_ENTRIES          (0x00000020)
99962ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_INDEX_NOT_EXIST            (0x00000040)
100062ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_FUNCTION_FAILED        (0x00000080)
100162ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_CRC_ERROR              (0x00000100)
100262ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SUBTRACTIVE_LINK           (0x00000200)
100362ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_TABLE_LINK                 (0x00000400)
100462ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_UNSUPPORTED_DEVICE         (0x00000800)
100562ae194dSScott Long 
100662ae194dSScott Long /* values for Flags field of SAS Expander Status Change Event data */
100762ae194dSScott Long #define MPI_EVENT_SAS_EXP_FLAGS_ROUTE_TABLE_CONFIG      (0x02)
100862ae194dSScott Long #define MPI_EVENT_SAS_EXP_FLAGS_CONFIG_IN_PROGRESS      (0x01)
100962ae194dSScott Long 
10109b631363SMatt Jacob 
10119b631363SMatt Jacob 
10129b631363SMatt Jacob /*****************************************************************************
10139b631363SMatt Jacob *
10149b631363SMatt Jacob *               F i r m w a r e    L o a d    M e s s a g e s
10159b631363SMatt Jacob *
10169b631363SMatt Jacob *****************************************************************************/
10179b631363SMatt Jacob 
10189b631363SMatt Jacob /****************************************************************************/
10199b631363SMatt Jacob /*  Firmware Download message and associated structures                     */
10209b631363SMatt Jacob /****************************************************************************/
10219b631363SMatt Jacob 
10229b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD
10239b631363SMatt Jacob {
10249b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10259b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10269b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
10279b631363SMatt Jacob     U8                      Function;                   /* 03h */
10289b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10299b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10309b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10319b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
10329b631363SMatt Jacob } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
10339b631363SMatt Jacob   FWDownload_t, MPI_POINTER pFWDownload_t;
10349b631363SMatt Jacob 
10359de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT    (0x01)
10369de3c85cSMatt Jacob 
10379b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_RESERVED          (0x00)
10389b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_FW                (0x01)
10399b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BIOS              (0x02)
10409b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_NVDATA            (0x03)
10419de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER        (0x04)
104262ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_MANUFACTURING     (0x06)
104362ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1          (0x07)
104462ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2          (0x08)
104562ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_MEGARAID          (0x09)
104662ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
10479b631363SMatt Jacob 
10489b631363SMatt Jacob 
10499b631363SMatt Jacob typedef struct _FWDownloadTCSGE
10509b631363SMatt Jacob {
10519b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
10529b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
10539b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
10549b631363SMatt Jacob     U8                      Flags;                      /* 03h */
10559b631363SMatt Jacob     U32                     Reserved_0100_Checksum;     /* 04h */ /* obsolete Checksum */
10569b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
10579b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
10589b631363SMatt Jacob } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
10599b631363SMatt Jacob   FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
10609b631363SMatt Jacob 
10619b631363SMatt Jacob /* Firmware Download reply */
10629b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD_REPLY
10639b631363SMatt Jacob {
10649b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10659b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10669b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
10679b631363SMatt Jacob     U8                      Function;                   /* 03h */
10689b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10699b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10709b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10719b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
10729b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
10739b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
10749b631363SMatt Jacob } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
10759b631363SMatt Jacob   FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
10769b631363SMatt Jacob 
10779b631363SMatt Jacob 
10789b631363SMatt Jacob /****************************************************************************/
10799b631363SMatt Jacob /*  Firmware Upload message and associated structures                       */
10809b631363SMatt Jacob /****************************************************************************/
10819b631363SMatt Jacob 
10829b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD
10839b631363SMatt Jacob {
10849b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10859b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10869b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
10879b631363SMatt Jacob     U8                      Function;                   /* 03h */
10889b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10899b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10909b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10919b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
10929b631363SMatt Jacob } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
10939b631363SMatt Jacob   FWUpload_t, MPI_POINTER pFWUpload_t;
10949b631363SMatt Jacob 
10959b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM          (0x00)
10969b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_FLASH            (0x01)
10979b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH          (0x02)
10989b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_NVDATA              (0x03)
10999de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER          (0x04)
11009de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_BACKUP           (0x05)
110162ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_MANUFACTURING       (0x06)
110262ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_CONFIG_1            (0x07)
110362ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_CONFIG_2            (0x08)
110462ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_MEGARAID            (0x09)
110562ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_COMPLETE            (0x0A)
110662ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK   (0x0B)
11079b631363SMatt Jacob 
11089b631363SMatt Jacob typedef struct _FWUploadTCSGE
11099b631363SMatt Jacob {
11109b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
11119b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
11129b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
11139b631363SMatt Jacob     U8                      Flags;                      /* 03h */
11149b631363SMatt Jacob     U32                     Reserved1;                  /* 04h */
11159b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
11169b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
11179b631363SMatt Jacob } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
11189b631363SMatt Jacob   FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
11199b631363SMatt Jacob 
11209b631363SMatt Jacob /* Firmware Upload reply */
11219b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD_REPLY
11229b631363SMatt Jacob {
11239b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
11249b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
11259b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
11269b631363SMatt Jacob     U8                      Function;                   /* 03h */
11279b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
11289b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
11299b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
11309b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
11319b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
11329b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
11339b631363SMatt Jacob     U32                     ActualImageSize;            /* 14h */
11349b631363SMatt Jacob } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
11359b631363SMatt Jacob   FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
11369b631363SMatt Jacob 
11379b631363SMatt Jacob 
11389b631363SMatt Jacob typedef struct _MPI_FW_HEADER
11399b631363SMatt Jacob {
11409b631363SMatt Jacob     U32                     ArmBranchInstruction0;      /* 00h */
11419b631363SMatt Jacob     U32                     Signature0;                 /* 04h */
11429b631363SMatt Jacob     U32                     Signature1;                 /* 08h */
11439b631363SMatt Jacob     U32                     Signature2;                 /* 0Ch */
11449b631363SMatt Jacob     U32                     ArmBranchInstruction1;      /* 10h */
11459b631363SMatt Jacob     U32                     ArmBranchInstruction2;      /* 14h */
11469b631363SMatt Jacob     U32                     Reserved;                   /* 18h */
11479b631363SMatt Jacob     U32                     Checksum;                   /* 1Ch */
11489b631363SMatt Jacob     U16                     VendorId;                   /* 20h */
11499b631363SMatt Jacob     U16                     ProductId;                  /* 22h */
11509b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 24h */
11519b631363SMatt Jacob     U32                     SeqCodeVersion;             /* 28h */
11529b631363SMatt Jacob     U32                     ImageSize;                  /* 2Ch */
11539b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 30h */
11549b631363SMatt Jacob     U32                     LoadStartAddress;           /* 34h */
11559b631363SMatt Jacob     U32                     IopResetVectorValue;        /* 38h */
11569b631363SMatt Jacob     U32                     IopResetRegAddr;            /* 3Ch */
11579b631363SMatt Jacob     U32                     VersionNameWhat;            /* 40h */
11589b631363SMatt Jacob     U8                      VersionName[32];            /* 44h */
11599b631363SMatt Jacob     U32                     VendorNameWhat;             /* 64h */
11609b631363SMatt Jacob     U8                      VendorName[32];             /* 68h */
11619b631363SMatt Jacob } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
11629b631363SMatt Jacob   MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
11639b631363SMatt Jacob 
11649b631363SMatt Jacob #define MPI_FW_HEADER_WHAT_SIGNATURE        (0x29232840)
11659b631363SMatt Jacob 
11669b631363SMatt Jacob /* defines for using the ProductId field */
11679b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_MASK             (0xF000)
11689b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SCSI             (0x0000)
11699b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_FC               (0x1000)
11709de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SAS              (0x2000)
11719b631363SMatt Jacob 
11727fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_0               (0x5AEAA55A)
11737fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_1               (0xA55AEAA5)
11747fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_2               (0x5AA55AEA)
11757fed69eeSMatt Jacob 
11769b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_MASK                     (0x0F00)
11779b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI           (0x0100)
11789b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI    (0x0200)
11799b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI              (0x0300)
11809b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IM_SCSI                  (0x0400)
11819b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IS_SCSI                  (0x0500)
11829b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_CTX_SCSI                 (0x0600)
11839de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_PROD_IR_SCSI                  (0x0700)
11849b631363SMatt Jacob 
11859b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_MASK           (0x00FF)
11869de3c85cSMatt Jacob /* SCSI */
11879b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI    (0x0001)
11889b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI    (0x0002)
11899b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI    (0x0003)
11909b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI    (0x0004)
11919b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI    (0x0005)
11929b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI    (0x0006)
11939b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI    (0x0007)
11949b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI    (0x0008)
11959b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI    (0x0009)
11969b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI    (0x000A)
1197b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI   (0x000B)
1198b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI   (0x000C)
11999de3c85cSMatt Jacob /* Fibre Channel */
12009b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_909_FC         (0x0000)
12019de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919_FC         (0x0001) /* 919 and 929     */
12029de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919X_FC        (0x0002) /* 919X and 929X   */
12039de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919XL_FC       (0x0003) /* 919XL and 929XL */
12049de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_939X_FC        (0x0004) /* 939X and 949X   */
12059de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_959_FC         (0x0005)
12060b80d21bSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_949E_FC        (0x0006)
12079de3c85cSMatt Jacob /* SAS */
12089de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1064_SAS       (0x0001)
12099de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1068_SAS       (0x0002)
12109de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1078_SAS       (0x0003)
12119de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_106xE_SAS      (0x0004) /* 1068E, 1066E, and 1064E */
12129b631363SMatt Jacob 
12139b631363SMatt Jacob typedef struct _MPI_EXT_IMAGE_HEADER
12149b631363SMatt Jacob {
12159b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
12169b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
12179b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
12189b631363SMatt Jacob     U32                     Checksum;                   /* 04h */
12199b631363SMatt Jacob     U32                     ImageSize;                  /* 08h */
12209b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 0Ch */
12219b631363SMatt Jacob     U32                     LoadStartAddress;           /* 10h */
12229b631363SMatt Jacob     U32                     Reserved2;                  /* 14h */
12239b631363SMatt Jacob } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
12249b631363SMatt Jacob   MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
12259b631363SMatt Jacob 
12269b631363SMatt Jacob /* defines for the ImageType field */
12279b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED          (0x00)
12289b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_FW                   (0x01)
12299b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_NVDATA               (0x03)
12309de3c85cSMatt Jacob #define MPI_EXT_IMAGE_TYPE_BOOTLOADER           (0x04)
123162ae194dSScott Long #define MPI_EXT_IMAGE_TYPE_INITIALIZATION       (0x05)
12329b631363SMatt Jacob 
12339b631363SMatt Jacob #endif
1234