xref: /freebsd/sys/dev/mpt/mpilib/mpi_ioc.h (revision 62ae194db25fe9743d03cb8a6c86634af4f95dd9)
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  *
3662ae194dSScott Long  *    mpi_ioc.h Version:  01.05.14
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.
1439b631363SMatt Jacob  *  --------------------------------------------------------------------------
1449b631363SMatt Jacob  */
1459b631363SMatt Jacob 
1469b631363SMatt Jacob #ifndef MPI_IOC_H
1479b631363SMatt Jacob #define MPI_IOC_H
1489b631363SMatt Jacob 
1499b631363SMatt Jacob 
1509b631363SMatt Jacob /*****************************************************************************
1519b631363SMatt Jacob *
1529b631363SMatt Jacob *               I O C    M e s s a g e s
1539b631363SMatt Jacob *
1549b631363SMatt Jacob *****************************************************************************/
1559b631363SMatt Jacob 
1569b631363SMatt Jacob /****************************************************************************/
1579b631363SMatt Jacob /*  IOCInit message                                                         */
1589b631363SMatt Jacob /****************************************************************************/
1599b631363SMatt Jacob 
1609b631363SMatt Jacob typedef struct _MSG_IOC_INIT
1619b631363SMatt Jacob {
1629b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
1639b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
1649b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
1659b631363SMatt Jacob     U8                      Function;                   /* 03h */
1669b631363SMatt Jacob     U8                      Flags;                      /* 04h */
1679b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
1689b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
1699b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
1709b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1719b631363SMatt Jacob     U16                     ReplyFrameSize;             /* 0Ch */
1729b631363SMatt Jacob     U8                      Reserved1[2];               /* 0Eh */
1739b631363SMatt Jacob     U32                     HostMfaHighAddr;            /* 10h */
1749b631363SMatt Jacob     U32                     SenseBufferHighAddr;        /* 14h */
1759de3c85cSMatt Jacob     U32                     ReplyFifoHostSignalingAddr; /* 18h */
1769de3c85cSMatt Jacob     SGE_SIMPLE_UNION        HostPageBufferSGE;          /* 1Ch */
1779de3c85cSMatt Jacob     U16                     MsgVersion;                 /* 28h */
1789de3c85cSMatt Jacob     U16                     HeaderVersion;              /* 2Ah */
1799b631363SMatt Jacob } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
1809b631363SMatt Jacob   IOCInit_t, MPI_POINTER pIOCInit_t;
1819b631363SMatt Jacob 
1829b631363SMatt Jacob /* WhoInit values */
1839b631363SMatt Jacob #define MPI_WHOINIT_NO_ONE                              (0x00)
1849b631363SMatt Jacob #define MPI_WHOINIT_SYSTEM_BIOS                         (0x01)
1859b631363SMatt Jacob #define MPI_WHOINIT_ROM_BIOS                            (0x02)
1869b631363SMatt Jacob #define MPI_WHOINIT_PCI_PEER                            (0x03)
1879b631363SMatt Jacob #define MPI_WHOINIT_HOST_DRIVER                         (0x04)
1889b631363SMatt Jacob #define MPI_WHOINIT_MANUFACTURER                        (0x05)
1899b631363SMatt Jacob 
1909b631363SMatt Jacob /* Flags values */
1919de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT   (0x04)
1929de3c85cSMatt Jacob #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL        (0x02)
1939b631363SMatt Jacob #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE              (0x01)
1949b631363SMatt Jacob 
1959de3c85cSMatt Jacob /* MsgVersion */
1969de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_MASK               (0xFF00)
1979de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT              (8)
1989de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_MASK               (0x00FF)
1999de3c85cSMatt Jacob #define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT              (0)
2009de3c85cSMatt Jacob 
2019de3c85cSMatt Jacob /* HeaderVersion */
2029de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_MASK             (0xFF00)
2039de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT            (8)
2049de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_MASK              (0x00FF)
2059de3c85cSMatt Jacob #define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT             (0)
2069de3c85cSMatt Jacob 
2079de3c85cSMatt Jacob 
2089b631363SMatt Jacob typedef struct _MSG_IOC_INIT_REPLY
2099b631363SMatt Jacob {
2109b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
2119b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
2129b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
2139b631363SMatt Jacob     U8                      Function;                   /* 03h */
2149b631363SMatt Jacob     U8                      Flags;                      /* 04h */
2159b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
2169b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
2179b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
2189b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2199b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
2209b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
2219b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
2229b631363SMatt Jacob } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
2239b631363SMatt Jacob   IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
2249b631363SMatt Jacob 
2259b631363SMatt Jacob 
2269b631363SMatt Jacob 
2279b631363SMatt Jacob /****************************************************************************/
2289b631363SMatt Jacob /*  IOC Facts message                                                       */
2299b631363SMatt Jacob /****************************************************************************/
2309b631363SMatt Jacob 
2319b631363SMatt Jacob typedef struct _MSG_IOC_FACTS
2329b631363SMatt Jacob {
2339b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
2349b631363SMatt Jacob     U8                      ChainOffset;                /* 01h */
2359b631363SMatt Jacob     U8                      Function;                   /* 02h */
2369b631363SMatt Jacob     U8                      Reserved1[3];               /* 03h */
2379b631363SMatt Jacob     U8                      MsgFlags;                   /* 04h */
2389b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2399b631363SMatt Jacob } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
2409b631363SMatt Jacob   IOCFacts_t, MPI_POINTER pIOCFacts_t;
2419b631363SMatt Jacob 
2429b631363SMatt Jacob typedef struct _MPI_FW_VERSION_STRUCT
2439b631363SMatt Jacob {
2449b631363SMatt Jacob     U8                      Dev;                        /* 00h */
2459b631363SMatt Jacob     U8                      Unit;                       /* 01h */
2469b631363SMatt Jacob     U8                      Minor;                      /* 02h */
2479b631363SMatt Jacob     U8                      Major;                      /* 03h */
2489b631363SMatt Jacob } MPI_FW_VERSION_STRUCT;
2499b631363SMatt Jacob 
2509b631363SMatt Jacob typedef union _MPI_FW_VERSION
2519b631363SMatt Jacob {
2529b631363SMatt Jacob     MPI_FW_VERSION_STRUCT   Struct;
2539b631363SMatt Jacob     U32                     Word;
2549b631363SMatt Jacob } MPI_FW_VERSION;
2559b631363SMatt Jacob 
2569b631363SMatt Jacob /* IOC Facts Reply */
2579b631363SMatt Jacob typedef struct _MSG_IOC_FACTS_REPLY
2589b631363SMatt Jacob {
2599b631363SMatt Jacob     U16                     MsgVersion;                 /* 00h */
2609b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
2619b631363SMatt Jacob     U8                      Function;                   /* 03h */
2627fed69eeSMatt Jacob     U16                     HeaderVersion;              /* 04h */
2639b631363SMatt Jacob     U8                      IOCNumber;                  /* 06h */
2649b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
2659b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
2669b631363SMatt Jacob     U16                     IOCExceptions;              /* 0Ch */
2679b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
2689b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
2699b631363SMatt Jacob     U8                      MaxChainDepth;              /* 14h */
2709b631363SMatt Jacob     U8                      WhoInit;                    /* 15h */
2719b631363SMatt Jacob     U8                      BlockSize;                  /* 16h */
2729b631363SMatt Jacob     U8                      Flags;                      /* 17h */
2739b631363SMatt Jacob     U16                     ReplyQueueDepth;            /* 18h */
2749b631363SMatt Jacob     U16                     RequestFrameSize;           /* 1Ah */
2759b631363SMatt Jacob     U16                     Reserved_0101_FWVersion;    /* 1Ch */ /* obsolete 16-bit FWVersion */
2769b631363SMatt Jacob     U16                     ProductID;                  /* 1Eh */
2779b631363SMatt Jacob     U32                     CurrentHostMfaHighAddr;     /* 20h */
2789b631363SMatt Jacob     U16                     GlobalCredits;              /* 24h */
2799b631363SMatt Jacob     U8                      NumberOfPorts;              /* 26h */
2809b631363SMatt Jacob     U8                      EventState;                 /* 27h */
2819b631363SMatt Jacob     U32                     CurrentSenseBufferHighAddr; /* 28h */
2829b631363SMatt Jacob     U16                     CurReplyFrameSize;          /* 2Ch */
2839b631363SMatt Jacob     U8                      MaxDevices;                 /* 2Eh */
2849b631363SMatt Jacob     U8                      MaxBuses;                   /* 2Fh */
2859b631363SMatt Jacob     U32                     FWImageSize;                /* 30h */
2869de3c85cSMatt Jacob     U32                     IOCCapabilities;            /* 34h */
2879b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 38h */
2889de3c85cSMatt Jacob     U16                     HighPriorityQueueDepth;     /* 3Ch */
2899de3c85cSMatt Jacob     U16                     Reserved2;                  /* 3Eh */
2909de3c85cSMatt Jacob     SGE_SIMPLE_UNION        HostPageBufferSGE;          /* 40h */
2919de3c85cSMatt Jacob     U32                     ReplyFifoHostSignalingAddr; /* 4Ch */
2929b631363SMatt Jacob } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
2939b631363SMatt Jacob   IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
2949b631363SMatt Jacob 
2959b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK              (0xFF00)
2969de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT             (8)
2979b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK              (0x00FF)
2989de3c85cSMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT             (0)
2999b631363SMatt Jacob 
3009de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_MASK               (0xFF00)
3019de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT              (8)
3029de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_MASK                (0x00FF)
3039de3c85cSMatt Jacob #define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT               (0)
3047fed69eeSMatt Jacob 
3059b631363SMatt Jacob #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL        (0x0001)
3067fed69eeSMatt Jacob #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID         (0x0002)
3079de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL            (0x0004)
3089de3c85cSMatt Jacob #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL       (0x0008)
30962ae194dSScott Long #define MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED        (0x0010)
3109b631363SMatt Jacob 
3119b631363SMatt Jacob #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT             (0x01)
3129de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL       (0x02)
3139de3c85cSMatt Jacob #define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT  (0x04)
3149b631363SMatt Jacob 
3159b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_DISABLED                (0x00)
3169b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_ENABLED                 (0x01)
3179b631363SMatt Jacob 
3189de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q              (0x00000001)
3199de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL       (0x00000002)
3209de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING     (0x00000004)
3219de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER       (0x00000008)
3229de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER         (0x00000010)
3239de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER         (0x00000020)
3249de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_EEDP                    (0x00000040)
3259de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL           (0x00000080)
3269de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_MULTICAST               (0x00000100)
3279de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_SCSIIO32                (0x00000200)
3289de3c85cSMatt Jacob #define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16             (0x00000400)
32962ae194dSScott Long #define MPI_IOCFACTS_CAPABILITY_TLR                     (0x00000800)
3309b631363SMatt Jacob 
3319b631363SMatt Jacob 
3329b631363SMatt Jacob /*****************************************************************************
3339b631363SMatt Jacob *
3349b631363SMatt Jacob *               P o r t    M e s s a g e s
3359b631363SMatt Jacob *
3369b631363SMatt Jacob *****************************************************************************/
3379b631363SMatt Jacob 
3389b631363SMatt Jacob /****************************************************************************/
3399b631363SMatt Jacob /*  Port Facts message and Reply                                            */
3409b631363SMatt Jacob /****************************************************************************/
3419b631363SMatt Jacob 
3429b631363SMatt Jacob typedef struct _MSG_PORT_FACTS
3439b631363SMatt Jacob {
3449b631363SMatt Jacob      U8                     Reserved[2];                /* 00h */
3459b631363SMatt Jacob      U8                     ChainOffset;                /* 02h */
3469b631363SMatt Jacob      U8                     Function;                   /* 03h */
3479b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
3489b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
3499b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
3509b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
3519b631363SMatt Jacob } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
3529b631363SMatt Jacob   PortFacts_t, MPI_POINTER pPortFacts_t;
3539b631363SMatt Jacob 
3549b631363SMatt Jacob typedef struct _MSG_PORT_FACTS_REPLY
3559b631363SMatt Jacob {
3569b631363SMatt Jacob      U16                    Reserved;                   /* 00h */
3579b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
3589b631363SMatt Jacob      U8                     Function;                   /* 03h */
3599b631363SMatt Jacob      U16                    Reserved1;                  /* 04h */
3609b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
3619b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
3629b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
3639b631363SMatt Jacob      U16                    Reserved2;                  /* 0Ch */
3649b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
3659b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
3669b631363SMatt Jacob      U8                     Reserved3;                  /* 14h */
3679b631363SMatt Jacob      U8                     PortType;                   /* 15h */
3689b631363SMatt Jacob      U16                    MaxDevices;                 /* 16h */
3699b631363SMatt Jacob      U16                    PortSCSIID;                 /* 18h */
3709b631363SMatt Jacob      U16                    ProtocolFlags;              /* 1Ah */
3719b631363SMatt Jacob      U16                    MaxPostedCmdBuffers;        /* 1Ch */
3729b631363SMatt Jacob      U16                    MaxPersistentIDs;           /* 1Eh */
3739b631363SMatt Jacob      U16                    MaxLanBuckets;              /* 20h */
37462ae194dSScott Long      U8                     MaxInitiators;              /* 22h */
37562ae194dSScott Long      U8                     Reserved4;                  /* 23h */
3769b631363SMatt Jacob      U32                    Reserved5;                  /* 24h */
3779b631363SMatt Jacob } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
3789b631363SMatt Jacob   PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
3799b631363SMatt Jacob 
3809b631363SMatt Jacob 
3819b631363SMatt Jacob /* PortTypes values */
3829b631363SMatt Jacob 
3839b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_INACTIVE         (0x00)
3849b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SCSI             (0x01)
3859b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_FC               (0x10)
3869de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_ISCSI            (0x20)
3879de3c85cSMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SAS              (0x30)
3889b631363SMatt Jacob 
3899b631363SMatt Jacob /* ProtocolFlags values */
3909b631363SMatt Jacob 
3919b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR       (0x01)
3929b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LAN              (0x02)
3939b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_TARGET           (0x04)
3949b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_INITIATOR        (0x08)
3959b631363SMatt Jacob 
3969b631363SMatt Jacob 
3979b631363SMatt Jacob /****************************************************************************/
3989b631363SMatt Jacob /*  Port Enable Message                                                     */
3999b631363SMatt Jacob /****************************************************************************/
4009b631363SMatt Jacob 
4019b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE
4029b631363SMatt Jacob {
4039b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4049b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4059b631363SMatt Jacob     U8                      Function;                   /* 03h */
4069b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
4079b631363SMatt Jacob     U8                      PortNumber;                 /* 06h */
4089b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4099b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4109b631363SMatt Jacob } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
4119b631363SMatt Jacob   PortEnable_t, MPI_POINTER pPortEnable_t;
4129b631363SMatt Jacob 
4139b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE_REPLY
4149b631363SMatt Jacob {
4159b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4169b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
4179b631363SMatt Jacob     U8                      Function;                   /* 03h */
4189b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
4199b631363SMatt Jacob     U8                      PortNumber;                 /* 05h */
4209b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4219b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4229b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
4239b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
4249b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
4259b631363SMatt Jacob } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
4269b631363SMatt Jacob   PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
4279b631363SMatt Jacob 
4289b631363SMatt Jacob 
4299b631363SMatt Jacob /*****************************************************************************
4309b631363SMatt Jacob *
4319b631363SMatt Jacob *               E v e n t    M e s s a g e s
4329b631363SMatt Jacob *
4339b631363SMatt Jacob *****************************************************************************/
4349b631363SMatt Jacob 
4359b631363SMatt Jacob /****************************************************************************/
4369b631363SMatt Jacob /*  Event Notification messages                                             */
4379b631363SMatt Jacob /****************************************************************************/
4389b631363SMatt Jacob 
4399b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY
4409b631363SMatt Jacob {
4419b631363SMatt Jacob     U8                      Switch;                     /* 00h */
4429b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
4439b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4449b631363SMatt Jacob     U8                      Function;                   /* 03h */
4459b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
4469b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4479b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4489b631363SMatt Jacob } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
4499b631363SMatt Jacob   EventNotification_t, MPI_POINTER pEventNotification_t;
4509b631363SMatt Jacob 
4519b631363SMatt Jacob /* Event Notification Reply */
4529b631363SMatt Jacob 
4539b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY_REPLY
4549b631363SMatt Jacob {
4559b631363SMatt Jacob      U16                    EventDataLength;            /* 00h */
4569b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
4579b631363SMatt Jacob      U8                     Function;                   /* 03h */
4589b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
4599b631363SMatt Jacob      U8                     AckRequired;                /* 06h */
4609b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
4619b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
4629b631363SMatt Jacob      U8                     Reserved2[2];               /* 0Ch */
4639b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
4649b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
4659b631363SMatt Jacob      U32                    Event;                      /* 14h */
4669b631363SMatt Jacob      U32                    EventContext;               /* 18h */
4679b631363SMatt Jacob      U32                    Data[1];                    /* 1Ch */
4689b631363SMatt Jacob } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
4699b631363SMatt Jacob   EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
4709b631363SMatt Jacob 
4719b631363SMatt Jacob /* Event Acknowledge */
4729b631363SMatt Jacob 
4739b631363SMatt Jacob typedef struct _MSG_EVENT_ACK
4749b631363SMatt Jacob {
4759b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4769b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
4779b631363SMatt Jacob     U8                      Function;                   /* 03h */
4789b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
4799b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4809b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4819b631363SMatt Jacob     U32                     Event;                      /* 0Ch */
4829b631363SMatt Jacob     U32                     EventContext;               /* 10h */
4839b631363SMatt Jacob } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
4849b631363SMatt Jacob   EventAck_t, MPI_POINTER pEventAck_t;
4859b631363SMatt Jacob 
4869b631363SMatt Jacob typedef struct _MSG_EVENT_ACK_REPLY
4879b631363SMatt Jacob {
4889b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
4899b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
4909b631363SMatt Jacob     U8                      Function;                   /* 03h */
4919b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
4929b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
4939b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
4949b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
4959b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
4969b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
4979b631363SMatt Jacob } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
4989b631363SMatt Jacob   EventAckReply_t, MPI_POINTER pEventAckReply_t;
4999b631363SMatt Jacob 
5009b631363SMatt Jacob /* Switch */
5019b631363SMatt Jacob 
5029b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_OFF   (0x00)
5039b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_ON    (0x01)
5049b631363SMatt Jacob 
5059b631363SMatt Jacob /* Event */
5069b631363SMatt Jacob 
5079b631363SMatt Jacob #define MPI_EVENT_NONE                          (0x00000000)
5089b631363SMatt Jacob #define MPI_EVENT_LOG_DATA                      (0x00000001)
5099b631363SMatt Jacob #define MPI_EVENT_STATE_CHANGE                  (0x00000002)
5109b631363SMatt Jacob #define MPI_EVENT_UNIT_ATTENTION                (0x00000003)
5119b631363SMatt Jacob #define MPI_EVENT_IOC_BUS_RESET                 (0x00000004)
5129b631363SMatt Jacob #define MPI_EVENT_EXT_BUS_RESET                 (0x00000005)
5139b631363SMatt Jacob #define MPI_EVENT_RESCAN                        (0x00000006)
5149b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_CHANGE            (0x00000007)
5159b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE             (0x00000008)
5169b631363SMatt Jacob #define MPI_EVENT_LOGOUT                        (0x00000009)
5179b631363SMatt Jacob #define MPI_EVENT_EVENT_CHANGE                  (0x0000000A)
5189b631363SMatt Jacob #define MPI_EVENT_INTEGRATED_RAID               (0x0000000B)
5199b631363SMatt Jacob #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE     (0x0000000C)
5209b631363SMatt Jacob #define MPI_EVENT_ON_BUS_TIMER_EXPIRED          (0x0000000D)
5219de3c85cSMatt Jacob #define MPI_EVENT_QUEUE_FULL                    (0x0000000E)
5229de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE      (0x0000000F)
5239de3c85cSMatt Jacob #define MPI_EVENT_SAS_SES                       (0x00000010)
5249de3c85cSMatt Jacob #define MPI_EVENT_PERSISTENT_TABLE_FULL         (0x00000011)
5259de3c85cSMatt Jacob #define MPI_EVENT_SAS_PHY_LINK_STATUS           (0x00000012)
5269de3c85cSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY_ERROR           (0x00000013)
5270b80d21bSMatt Jacob #define MPI_EVENT_IR_RESYNC_UPDATE              (0x00000014)
5280b80d21bSMatt Jacob #define MPI_EVENT_IR2                           (0x00000015)
5290b80d21bSMatt Jacob #define MPI_EVENT_SAS_DISCOVERY                 (0x00000016)
53062ae194dSScott Long #define MPI_EVENT_SAS_BROADCAST_PRIMITIVE       (0x00000017)
53162ae194dSScott Long #define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x00000018)
53262ae194dSScott Long #define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW       (0x00000019)
53362ae194dSScott Long #define MPI_EVENT_SAS_SMP_ERROR                 (0x0000001A)
53462ae194dSScott Long #define MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE    (0x0000001B)
5350b80d21bSMatt Jacob #define MPI_EVENT_LOG_ENTRY_ADDED               (0x00000021)
5369b631363SMatt Jacob 
5379b631363SMatt Jacob /* AckRequired field values */
5389b631363SMatt Jacob 
5399b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
5409b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED     (0x01)
5419b631363SMatt Jacob 
5429b631363SMatt Jacob /* EventChange Event data */
5439b631363SMatt Jacob 
5449b631363SMatt Jacob typedef struct _EVENT_DATA_EVENT_CHANGE
5459b631363SMatt Jacob {
5469b631363SMatt Jacob     U8                      EventState;                 /* 00h */
5479b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
5489b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
5499b631363SMatt Jacob } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
5509b631363SMatt Jacob   EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
5519b631363SMatt Jacob 
5520b80d21bSMatt Jacob /* LogEntryAdded Event data */
5530b80d21bSMatt Jacob 
5540b80d21bSMatt Jacob /* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */
5550b80d21bSMatt Jacob #define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH    (0x1C)
5560b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY
5570b80d21bSMatt Jacob {
5580b80d21bSMatt Jacob     U32         TimeStamp;                          /* 00h */
5590b80d21bSMatt Jacob     U32         Reserved1;                          /* 04h */
5600b80d21bSMatt Jacob     U16         LogSequence;                        /* 08h */
5610b80d21bSMatt Jacob     U16         LogEntryQualifier;                  /* 0Ah */
5620b80d21bSMatt Jacob     U8          LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */
5630b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY,
5640b80d21bSMatt Jacob   MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t;
5650b80d21bSMatt Jacob 
5660b80d21bSMatt Jacob typedef struct _EVENT_DATA_LOG_ENTRY_ADDED
5670b80d21bSMatt Jacob {
5680b80d21bSMatt Jacob     U16                     LogSequence;            /* 00h */
5690b80d21bSMatt Jacob     U16                     Reserved1;              /* 02h */
5700b80d21bSMatt Jacob     U32                     Reserved2;              /* 04h */
5710b80d21bSMatt Jacob     EVENT_DATA_LOG_ENTRY    LogEntry;               /* 08h */
5720b80d21bSMatt Jacob } EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED,
5730b80d21bSMatt Jacob   MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t;
5740b80d21bSMatt Jacob 
5759b631363SMatt Jacob /* SCSI Event data for Port, Bus and Device forms */
5769b631363SMatt Jacob 
5779b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI
5789b631363SMatt Jacob {
5799b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
5809b631363SMatt Jacob     U8                      BusPort;                    /* 01h */
5819b631363SMatt Jacob     U16                     Reserved;                   /* 02h */
5829b631363SMatt Jacob } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
5839b631363SMatt Jacob   EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
5849b631363SMatt Jacob 
5859b631363SMatt Jacob /* SCSI Device Status Change Event data */
5869b631363SMatt Jacob 
5879b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
5889b631363SMatt Jacob {
5899b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
5909b631363SMatt Jacob     U8                      Bus;                        /* 01h */
5919b631363SMatt Jacob     U8                      ReasonCode;                 /* 02h */
5929b631363SMatt Jacob     U8                      LUN;                        /* 03h */
5939b631363SMatt Jacob     U8                      ASC;                        /* 04h */
5949b631363SMatt Jacob     U8                      ASCQ;                       /* 05h */
5959b631363SMatt Jacob     U16                     Reserved;                   /* 06h */
5969b631363SMatt Jacob } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
5979b631363SMatt Jacob   MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
5989b631363SMatt Jacob   MpiEventDataScsiDeviceStatusChange_t,
5999b631363SMatt Jacob   MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
6009b631363SMatt Jacob 
6019b631363SMatt Jacob /* MPI SCSI Device Status Change Event data ReasonCode values */
6029b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED                (0x03)
6039b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING       (0x04)
6049b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA           (0x05)
6059b631363SMatt Jacob 
6069de3c85cSMatt Jacob /* SAS Device Status Change Event data */
6079de3c85cSMatt Jacob 
6089de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
6099de3c85cSMatt Jacob {
6109de3c85cSMatt Jacob     U8                      TargetID;                   /* 00h */
6119de3c85cSMatt Jacob     U8                      Bus;                        /* 01h */
6129de3c85cSMatt Jacob     U8                      ReasonCode;                 /* 02h */
6139de3c85cSMatt Jacob     U8                      Reserved;                   /* 03h */
6149de3c85cSMatt Jacob     U8                      ASC;                        /* 04h */
6159de3c85cSMatt Jacob     U8                      ASCQ;                       /* 05h */
6169de3c85cSMatt Jacob     U16                     DevHandle;                  /* 06h */
6179de3c85cSMatt Jacob     U32                     DeviceInfo;                 /* 08h */
6189de3c85cSMatt Jacob     U16                     ParentDevHandle;            /* 0Ch */
6199de3c85cSMatt Jacob     U8                      PhyNum;                     /* 0Eh */
6209de3c85cSMatt Jacob     U8                      Reserved1;                  /* 0Fh */
6219de3c85cSMatt Jacob     U64                     SASAddress;                 /* 10h */
62262ae194dSScott Long     U8                      LUN[8];                     /* 18h */
62362ae194dSScott Long     U16                     TaskTag;                    /* 20h */
62462ae194dSScott Long     U16                     Reserved2;                  /* 22h */
6259de3c85cSMatt Jacob } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
6269de3c85cSMatt Jacob   MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
6279de3c85cSMatt Jacob   MpiEventDataSasDeviceStatusChange_t,
6289de3c85cSMatt Jacob   MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
6299de3c85cSMatt Jacob 
6309de3c85cSMatt Jacob /* MPI SAS Device Status Change Event data ReasonCode values */
6319de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED                     (0x03)
6329de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING            (0x04)
6339de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA                (0x05)
6349de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED          (0x06)
6359de3c85cSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED               (0x07)
6360b80d21bSMatt Jacob #define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET     (0x08)
63762ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL       (0x09)
63862ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL   (0x0A)
63962ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL   (0x0B)
64062ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL       (0x0C)
64162ae194dSScott Long #define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION        (0x0D)
6429de3c85cSMatt Jacob 
6439de3c85cSMatt Jacob 
6449de3c85cSMatt Jacob /* SCSI Event data for Queue Full event */
6459de3c85cSMatt Jacob 
6469de3c85cSMatt Jacob typedef struct _EVENT_DATA_QUEUE_FULL
6479de3c85cSMatt Jacob {
6489de3c85cSMatt Jacob     U8                      TargetID;                   /* 00h */
6499de3c85cSMatt Jacob     U8                      Bus;                        /* 01h */
6509de3c85cSMatt Jacob     U16                     CurrentDepth;               /* 02h */
6519de3c85cSMatt Jacob } EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
6529de3c85cSMatt Jacob   EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
6539de3c85cSMatt Jacob 
6549de3c85cSMatt Jacob /* MPI Integrated RAID Event data */
6559de3c85cSMatt Jacob 
6569de3c85cSMatt Jacob typedef struct _EVENT_DATA_RAID
6579de3c85cSMatt Jacob {
6589de3c85cSMatt Jacob     U8                      VolumeID;                   /* 00h */
6599de3c85cSMatt Jacob     U8                      VolumeBus;                  /* 01h */
6609de3c85cSMatt Jacob     U8                      ReasonCode;                 /* 02h */
6619de3c85cSMatt Jacob     U8                      PhysDiskNum;                /* 03h */
6629de3c85cSMatt Jacob     U8                      ASC;                        /* 04h */
6639de3c85cSMatt Jacob     U8                      ASCQ;                       /* 05h */
6649de3c85cSMatt Jacob     U16                     Reserved;                   /* 06h */
6659de3c85cSMatt Jacob     U32                     SettingsStatus;             /* 08h */
6669de3c85cSMatt Jacob } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
6679de3c85cSMatt Jacob   MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
6689de3c85cSMatt Jacob 
6699de3c85cSMatt Jacob /* MPI Integrated RAID Event data ReasonCode values */
6709de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_CREATED                (0x00)
6719de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_DELETED                (0x01)
6729de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED       (0x02)
6739de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED         (0x03)
6749de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED       (0x04)
6759de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED              (0x05)
6769de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED              (0x06)
6779de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED     (0x07)
6789de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED       (0x08)
6799de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED             (0x09)
6809de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_SMART_DATA                    (0x0A)
6819de3c85cSMatt Jacob #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED        (0x0B)
6829de3c85cSMatt Jacob 
6830b80d21bSMatt Jacob 
6840b80d21bSMatt Jacob /* MPI Integrated RAID Resync Update Event data */
6850b80d21bSMatt Jacob 
6860b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE
6870b80d21bSMatt Jacob {
6880b80d21bSMatt Jacob     U8                      VolumeID;                   /* 00h */
6890b80d21bSMatt Jacob     U8                      VolumeBus;                  /* 01h */
6900b80d21bSMatt Jacob     U8                      ResyncComplete;             /* 02h */
6910b80d21bSMatt Jacob     U8                      Reserved1;                  /* 03h */
6920b80d21bSMatt Jacob     U32                     Reserved2;                  /* 04h */
6930b80d21bSMatt Jacob } MPI_EVENT_DATA_IR_RESYNC_UPDATE,
6940b80d21bSMatt Jacob   MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE,
6950b80d21bSMatt Jacob   MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t;
6960b80d21bSMatt Jacob 
6970b80d21bSMatt Jacob /* MPI IR2 Event data */
6980b80d21bSMatt Jacob 
6990b80d21bSMatt Jacob /* MPI_LD_STATE or MPI_PD_STATE */
7000b80d21bSMatt Jacob typedef struct _IR2_STATE_CHANGED
7010b80d21bSMatt Jacob {
7020b80d21bSMatt Jacob     U16                 PreviousState;  /* 00h */
7030b80d21bSMatt Jacob     U16                 NewState;       /* 02h */
7040b80d21bSMatt Jacob } IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED;
7050b80d21bSMatt Jacob 
7060b80d21bSMatt Jacob typedef struct _IR2_PD_INFO
7070b80d21bSMatt Jacob {
7080b80d21bSMatt Jacob     U16                 DeviceHandle;           /* 00h */
7090b80d21bSMatt Jacob     U8                  TruncEnclosureHandle;   /* 02h */
7100b80d21bSMatt Jacob     U8                  TruncatedSlot;          /* 03h */
7110b80d21bSMatt Jacob } IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO;
7120b80d21bSMatt Jacob 
7130b80d21bSMatt Jacob typedef union _MPI_IR2_RC_EVENT_DATA
7140b80d21bSMatt Jacob {
7150b80d21bSMatt Jacob     IR2_STATE_CHANGED   StateChanged;
7160b80d21bSMatt Jacob     U32                 Lba;
7170b80d21bSMatt Jacob     IR2_PD_INFO         PdInfo;
7180b80d21bSMatt Jacob } MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA;
7190b80d21bSMatt Jacob 
7200b80d21bSMatt Jacob typedef struct _MPI_EVENT_DATA_IR2
7210b80d21bSMatt Jacob {
7220b80d21bSMatt Jacob     U8                      TargetID;             /* 00h */
7230b80d21bSMatt Jacob     U8                      Bus;                  /* 01h */
7240b80d21bSMatt Jacob     U8                      ReasonCode;           /* 02h */
7250b80d21bSMatt Jacob     U8                      PhysDiskNum;          /* 03h */
7260b80d21bSMatt Jacob     MPI_IR2_RC_EVENT_DATA   IR2EventData;         /* 04h */
7270b80d21bSMatt Jacob } MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2,
7280b80d21bSMatt Jacob   MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t;
7290b80d21bSMatt Jacob 
7300b80d21bSMatt Jacob /* MPI IR2 Event data ReasonCode values */
7310b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_LD_STATE_CHANGED           (0x01)
7320b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_STATE_CHANGED           (0x02)
7330b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL       (0x03)
7340b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_INSERTED                (0x04)
7350b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_PD_REMOVED                 (0x05)
7360b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED       (0x06)
7370b80d21bSMatt Jacob #define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR       (0x07)
7380b80d21bSMatt Jacob 
7390b80d21bSMatt Jacob /* defines for logical disk states */
7400b80d21bSMatt Jacob #define MPI_LD_STATE_OPTIMAL                        (0x00)
7410b80d21bSMatt Jacob #define MPI_LD_STATE_DEGRADED                       (0x01)
7420b80d21bSMatt Jacob #define MPI_LD_STATE_FAILED                         (0x02)
7430b80d21bSMatt Jacob #define MPI_LD_STATE_MISSING                        (0x03)
7440b80d21bSMatt Jacob #define MPI_LD_STATE_OFFLINE                        (0x04)
7450b80d21bSMatt Jacob 
7460b80d21bSMatt Jacob /* defines for physical disk states */
7470b80d21bSMatt Jacob #define MPI_PD_STATE_ONLINE                         (0x00)
7480b80d21bSMatt Jacob #define MPI_PD_STATE_MISSING                        (0x01)
7490b80d21bSMatt Jacob #define MPI_PD_STATE_NOT_COMPATIBLE                 (0x02)
7500b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED                         (0x03)
7510b80d21bSMatt Jacob #define MPI_PD_STATE_INITIALIZING                   (0x04)
7520b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST        (0x05)
7530b80d21bSMatt Jacob #define MPI_PD_STATE_FAILED_AT_HOST_REQUEST         (0x06)
7540b80d21bSMatt Jacob #define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON     (0xFF)
7550b80d21bSMatt Jacob 
7569b631363SMatt Jacob /* MPI Link Status Change Event data */
7579b631363SMatt Jacob 
7589b631363SMatt Jacob typedef struct _EVENT_DATA_LINK_STATUS
7599b631363SMatt Jacob {
7609b631363SMatt Jacob     U8                      State;                      /* 00h */
7619b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
7629b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
7639b631363SMatt Jacob     U8                      Reserved2;                  /* 04h */
7649b631363SMatt Jacob     U8                      Port;                       /* 05h */
7659b631363SMatt Jacob     U16                     Reserved3;                  /* 06h */
7669b631363SMatt Jacob } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
7679b631363SMatt Jacob   EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
7689b631363SMatt Jacob 
7699b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_FAILURE       (0x00000000)
7709b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_ACTIVE        (0x00000001)
7719b631363SMatt Jacob 
7729b631363SMatt Jacob /* MPI Loop State Change Event data */
7739b631363SMatt Jacob 
7749b631363SMatt Jacob typedef struct _EVENT_DATA_LOOP_STATE
7759b631363SMatt Jacob {
7769b631363SMatt Jacob     U8                      Character4;                 /* 00h */
7779b631363SMatt Jacob     U8                      Character3;                 /* 01h */
7789b631363SMatt Jacob     U8                      Type;                       /* 02h */
7799b631363SMatt Jacob     U8                      Reserved;                   /* 03h */
7809b631363SMatt Jacob     U8                      Reserved1;                  /* 04h */
7819b631363SMatt Jacob     U8                      Port;                       /* 05h */
7829b631363SMatt Jacob     U16                     Reserved2;                  /* 06h */
7839b631363SMatt Jacob } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
7849b631363SMatt Jacob   EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
7859b631363SMatt Jacob 
7869b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LIP     (0x0001)
7879b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPE     (0x0002)
7889b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPB     (0x0003)
7899b631363SMatt Jacob 
7909b631363SMatt Jacob /* MPI LOGOUT Event data */
7919b631363SMatt Jacob 
7929b631363SMatt Jacob typedef struct _EVENT_DATA_LOGOUT
7939b631363SMatt Jacob {
7949b631363SMatt Jacob     U32                     NPortID;                    /* 00h */
7957fed69eeSMatt Jacob     U8                      AliasIndex;                 /* 04h */
7969b631363SMatt Jacob     U8                      Port;                       /* 05h */
7979b631363SMatt Jacob     U16                     Reserved1;                  /* 06h */
7989b631363SMatt Jacob } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
7999b631363SMatt Jacob   EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
8009b631363SMatt Jacob 
8017fed69eeSMatt Jacob #define MPI_EVENT_LOGOUT_ALL_ALIASES        (0xFF)
8027fed69eeSMatt Jacob 
8039de3c85cSMatt Jacob /* SAS SES Event data */
8047fed69eeSMatt Jacob 
8059de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_SES
8069b631363SMatt Jacob {
8079de3c85cSMatt Jacob     U8                      PhyNum;                     /* 00h */
8089de3c85cSMatt Jacob     U8                      Port;                       /* 01h */
8099de3c85cSMatt Jacob     U8                      PortWidth;                  /* 02h */
8109de3c85cSMatt Jacob     U8                      Reserved1;                  /* 04h */
8119de3c85cSMatt Jacob } EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES,
8129de3c85cSMatt Jacob   MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t;
8139b631363SMatt Jacob 
81462ae194dSScott Long /* SAS Broadcast Primitive Event data */
81562ae194dSScott Long 
81662ae194dSScott Long typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE
81762ae194dSScott Long {
81862ae194dSScott Long     U8                      PhyNum;                     /* 00h */
81962ae194dSScott Long     U8                      Port;                       /* 01h */
82062ae194dSScott Long     U8                      PortWidth;                  /* 02h */
82162ae194dSScott Long     U8                      Primitive;                  /* 04h */
82262ae194dSScott Long } EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
82362ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
82462ae194dSScott Long   MpiEventDataSasBroadcastPrimitive_t,
82562ae194dSScott Long   MPI_POINTER pMpiEventDataSasBroadcastPrimitive_t;
82662ae194dSScott Long 
82762ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE              (0x01)
82862ae194dSScott Long #define MPI_EVENT_PRIMITIVE_EXPANDER            (0x03)
82962ae194dSScott Long #define MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT  (0x04)
83062ae194dSScott Long #define MPI_EVENT_PRIMITIVE_RESERVED3           (0x05)
83162ae194dSScott Long #define MPI_EVENT_PRIMITIVE_RESERVED4           (0x06)
83262ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED    (0x07)
83362ae194dSScott Long #define MPI_EVENT_PRIMITIVE_CHANGE1_RESERVED    (0x08)
83462ae194dSScott Long 
8359de3c85cSMatt Jacob /* SAS Phy Link Status Event data */
8369de3c85cSMatt Jacob 
8379de3c85cSMatt Jacob typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS
8389de3c85cSMatt Jacob {
8399de3c85cSMatt Jacob     U8                      PhyNum;                     /* 00h */
8409de3c85cSMatt Jacob     U8                      LinkRates;                  /* 01h */
8419de3c85cSMatt Jacob     U16                     DevHandle;                  /* 02h */
8429de3c85cSMatt Jacob     U64                     SASAddress;                 /* 04h */
8439de3c85cSMatt Jacob } EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS,
8449de3c85cSMatt Jacob   MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t;
8459de3c85cSMatt Jacob 
8469de3c85cSMatt Jacob /* defines for the LinkRates field of the SAS PHY Link Status event */
8479de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK                   (0xF0)
8489de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT                  (4)
8499de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK                  (0x0F)
8509de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT                 (0)
8519de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN                   (0x00)
8529de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED              (0x01)
8539de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION  (0x02)
8549de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE         (0x03)
8559de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_1_5                       (0x08)
8569de3c85cSMatt Jacob #define MPI_EVENT_SAS_PLS_LR_RATE_3_0                       (0x09)
8579de3c85cSMatt Jacob 
8580b80d21bSMatt Jacob /* SAS Discovery Event data */
8590b80d21bSMatt Jacob 
8600b80d21bSMatt Jacob typedef struct _EVENT_DATA_SAS_DISCOVERY
8610b80d21bSMatt Jacob {
8620b80d21bSMatt Jacob     U32                     DiscoveryStatus;            /* 00h */
8630b80d21bSMatt Jacob     U32                     Reserved1;                  /* 04h */
8640b80d21bSMatt Jacob } EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY,
8650b80d21bSMatt Jacob   EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t;
8660b80d21bSMatt Jacob 
8670b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_COMPLETE                       (0x00000000)
8680b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS                    (0x00000001)
8690b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK                  (0xFFFF0000)
8700b80d21bSMatt Jacob #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT                 (16)
8710b80d21bSMatt Jacob 
8729de3c85cSMatt Jacob /* SAS Discovery Errror Event data */
8739de3c85cSMatt Jacob 
8749de3c85cSMatt Jacob typedef struct _EVENT_DATA_DISCOVERY_ERROR
8759de3c85cSMatt Jacob {
8769de3c85cSMatt Jacob     U32                     DiscoveryStatus;            /* 00h */
8779de3c85cSMatt Jacob     U8                      Port;                       /* 04h */
8789de3c85cSMatt Jacob     U8                      Reserved1;                  /* 05h */
8799de3c85cSMatt Jacob     U16                     Reserved2;                  /* 06h */
8809de3c85cSMatt Jacob } EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR,
8819de3c85cSMatt Jacob   EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t;
8829de3c85cSMatt Jacob 
8839de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED               (0x00000001)
8849de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE        (0x00000002)
8859de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS              (0x00000004)
8869de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR                (0x00000008)
8879de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT                 (0x00000010)
8889de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES           (0x00000020)
8899de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST             (0x00000040)
8909de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED         (0x00000080)
8919de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR               (0x00000100)
8929de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE          (0x00000200)
8939de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE              (0x00000400)
89462ae194dSScott Long #define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE          (0x00000800)
8959de3c85cSMatt Jacob #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS            (0x00001000)
89662ae194dSScott Long #define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN           (0x00002000)
89762ae194dSScott Long 
89862ae194dSScott Long /* SAS SMP Error Event data */
89962ae194dSScott Long 
90062ae194dSScott Long typedef struct _EVENT_DATA_SAS_SMP_ERROR
90162ae194dSScott Long {
90262ae194dSScott Long     U8                      Status;                     /* 00h */
90362ae194dSScott Long     U8                      Port;                       /* 01h */
90462ae194dSScott Long     U8                      SMPFunctionResult;          /* 02h */
90562ae194dSScott Long     U8                      Reserved1;                  /* 03h */
90662ae194dSScott Long     U64                     SASAddress;                 /* 04h */
90762ae194dSScott Long } EVENT_DATA_SAS_SMP_ERROR, MPI_POINTER PTR_EVENT_DATA_SAS_SMP_ERROR,
90862ae194dSScott Long   MpiEventDataSasSmpError_t, MPI_POINTER pMpiEventDataSasSmpError_t;
90962ae194dSScott Long 
91062ae194dSScott Long /* defines for the Status field of the SAS SMP Error event */
91162ae194dSScott Long #define MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID         (0x00)
91262ae194dSScott Long #define MPI_EVENT_SAS_SMP_CRC_ERROR                     (0x01)
91362ae194dSScott Long #define MPI_EVENT_SAS_SMP_TIMEOUT                       (0x02)
91462ae194dSScott Long #define MPI_EVENT_SAS_SMP_NO_DESTINATION                (0x03)
91562ae194dSScott Long #define MPI_EVENT_SAS_SMP_BAD_DESTINATION               (0x04)
91662ae194dSScott Long 
91762ae194dSScott Long /* SAS Initiator Device Status Change Event data */
91862ae194dSScott Long 
91962ae194dSScott Long typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
92062ae194dSScott Long {
92162ae194dSScott Long     U8                      ReasonCode;                 /* 00h */
92262ae194dSScott Long     U8                      Port;                       /* 01h */
92362ae194dSScott Long     U16                     DevHandle;                  /* 02h */
92462ae194dSScott Long     U64                     SASAddress;                 /* 04h */
92562ae194dSScott Long } EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
92662ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
92762ae194dSScott Long   MpiEventDataSasInitDevStatusChange_t,
92862ae194dSScott Long   MPI_POINTER pMpiEventDataSasInitDevStatusChange_t;
92962ae194dSScott Long 
93062ae194dSScott Long /* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
93162ae194dSScott Long #define MPI_EVENT_SAS_INIT_RC_ADDED                 (0x01)
93262ae194dSScott Long 
93362ae194dSScott Long /* SAS Initiator Device Table Overflow Event data */
93462ae194dSScott Long 
93562ae194dSScott Long typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
93662ae194dSScott Long {
93762ae194dSScott Long     U8                      MaxInit;                    /* 00h */
93862ae194dSScott Long     U8                      CurrentInit;                /* 01h */
93962ae194dSScott Long     U16                     Reserved1;                  /* 02h */
94062ae194dSScott Long } EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
94162ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
94262ae194dSScott Long   MpiEventDataSasInitTableOverflow_t,
94362ae194dSScott Long   MPI_POINTER pMpiEventDataSasInitTableOverflow_t;
94462ae194dSScott Long 
94562ae194dSScott Long /* SAS Expander Status Change Event data */
94662ae194dSScott Long 
94762ae194dSScott Long typedef struct _EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE
94862ae194dSScott Long {
94962ae194dSScott Long     U8                      ReasonCode;             /* 00h */
95062ae194dSScott Long     U8                      Reserved1;              /* 01h */
95162ae194dSScott Long     U16                     Reserved2;              /* 02h */
95262ae194dSScott Long     U8                      PhysicalPort;           /* 04h */
95362ae194dSScott Long     U8                      Reserved3;              /* 05h */
95462ae194dSScott Long     U16                     EnclosureHandle;        /* 06h */
95562ae194dSScott Long     U64                     SASAddress;             /* 08h */
95662ae194dSScott Long     U32                     DiscoveryStatus;        /* 10h */
95762ae194dSScott Long     U16                     DevHandle;              /* 14h */
95862ae194dSScott Long     U16                     ParentDevHandle;        /* 16h */
95962ae194dSScott Long     U16                     ExpanderChangeCount;    /* 18h */
96062ae194dSScott Long     U16                     ExpanderRouteIndexes;   /* 1Ah */
96162ae194dSScott Long     U8                      NumPhys;                /* 1Ch */
96262ae194dSScott Long     U8                      SASLevel;               /* 1Dh */
96362ae194dSScott Long     U8                      Flags;                  /* 1Eh */
96462ae194dSScott Long     U8                      Reserved4;              /* 1Fh */
96562ae194dSScott Long } EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
96662ae194dSScott Long   MPI_POINTER PTR_EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
96762ae194dSScott Long   MpiEventDataSasExpanderStatusChange_t,
96862ae194dSScott Long   MPI_POINTER pMpiEventDataSasExpanderStatusChange_t;
96962ae194dSScott Long 
97062ae194dSScott Long /* values for ReasonCode field of SAS Expander Status Change Event data */
97162ae194dSScott Long #define MPI_EVENT_SAS_EXP_RC_ADDED                      (0x00)
97262ae194dSScott Long #define MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING             (0x01)
97362ae194dSScott Long 
97462ae194dSScott Long /* values for DiscoveryStatus field of SAS Expander Status Change Event data */
97562ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_LOOP_DETECTED              (0x00000001)
97662ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_UNADDRESSABLE_DEVICE       (0x00000002)
97762ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_MULTIPLE_PORTS             (0x00000004)
97862ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_EXPANDER_ERR               (0x00000008)
97962ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_TIMEOUT                (0x00000010)
98062ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_OUT_ROUTE_ENTRIES          (0x00000020)
98162ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_INDEX_NOT_EXIST            (0x00000040)
98262ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_FUNCTION_FAILED        (0x00000080)
98362ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SMP_CRC_ERROR              (0x00000100)
98462ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_SUBTRACTIVE_LINK           (0x00000200)
98562ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_TABLE_LINK                 (0x00000400)
98662ae194dSScott Long #define MPI_EVENT_SAS_EXP_DS_UNSUPPORTED_DEVICE         (0x00000800)
98762ae194dSScott Long 
98862ae194dSScott Long /* values for Flags field of SAS Expander Status Change Event data */
98962ae194dSScott Long #define MPI_EVENT_SAS_EXP_FLAGS_ROUTE_TABLE_CONFIG      (0x02)
99062ae194dSScott Long #define MPI_EVENT_SAS_EXP_FLAGS_CONFIG_IN_PROGRESS      (0x01)
99162ae194dSScott Long 
9929b631363SMatt Jacob 
9939b631363SMatt Jacob 
9949b631363SMatt Jacob /*****************************************************************************
9959b631363SMatt Jacob *
9969b631363SMatt Jacob *               F i r m w a r e    L o a d    M e s s a g e s
9979b631363SMatt Jacob *
9989b631363SMatt Jacob *****************************************************************************/
9999b631363SMatt Jacob 
10009b631363SMatt Jacob /****************************************************************************/
10019b631363SMatt Jacob /*  Firmware Download message and associated structures                     */
10029b631363SMatt Jacob /****************************************************************************/
10039b631363SMatt Jacob 
10049b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD
10059b631363SMatt Jacob {
10069b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10079b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10089b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
10099b631363SMatt Jacob     U8                      Function;                   /* 03h */
10109b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10119b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10129b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10139b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
10149b631363SMatt Jacob } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
10159b631363SMatt Jacob   FWDownload_t, MPI_POINTER pFWDownload_t;
10169b631363SMatt Jacob 
10179de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT    (0x01)
10189de3c85cSMatt Jacob 
10199b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_RESERVED          (0x00)
10209b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_FW                (0x01)
10219b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BIOS              (0x02)
10229b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_NVDATA            (0x03)
10239de3c85cSMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER        (0x04)
102462ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_MANUFACTURING     (0x06)
102562ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1          (0x07)
102662ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2          (0x08)
102762ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_MEGARAID          (0x09)
102862ae194dSScott Long #define MPI_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
10299b631363SMatt Jacob 
10309b631363SMatt Jacob 
10319b631363SMatt Jacob typedef struct _FWDownloadTCSGE
10329b631363SMatt Jacob {
10339b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
10349b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
10359b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
10369b631363SMatt Jacob     U8                      Flags;                      /* 03h */
10379b631363SMatt Jacob     U32                     Reserved_0100_Checksum;     /* 04h */ /* obsolete Checksum */
10389b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
10399b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
10409b631363SMatt Jacob } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
10419b631363SMatt Jacob   FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
10429b631363SMatt Jacob 
10439b631363SMatt Jacob /* Firmware Download reply */
10449b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD_REPLY
10459b631363SMatt Jacob {
10469b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10479b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10489b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
10499b631363SMatt Jacob     U8                      Function;                   /* 03h */
10509b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10519b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10529b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10539b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
10549b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
10559b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
10569b631363SMatt Jacob } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
10579b631363SMatt Jacob   FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
10589b631363SMatt Jacob 
10599b631363SMatt Jacob 
10609b631363SMatt Jacob /****************************************************************************/
10619b631363SMatt Jacob /*  Firmware Upload message and associated structures                       */
10629b631363SMatt Jacob /****************************************************************************/
10639b631363SMatt Jacob 
10649b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD
10659b631363SMatt Jacob {
10669b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
10679b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
10689b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
10699b631363SMatt Jacob     U8                      Function;                   /* 03h */
10709b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
10719b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
10729b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
10739b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
10749b631363SMatt Jacob } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
10759b631363SMatt Jacob   FWUpload_t, MPI_POINTER pFWUpload_t;
10769b631363SMatt Jacob 
10779b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM          (0x00)
10789b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_FLASH            (0x01)
10799b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH          (0x02)
10809b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_NVDATA              (0x03)
10819de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER          (0x04)
10829de3c85cSMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_BACKUP           (0x05)
108362ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_MANUFACTURING       (0x06)
108462ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_CONFIG_1            (0x07)
108562ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_CONFIG_2            (0x08)
108662ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_MEGARAID            (0x09)
108762ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_COMPLETE            (0x0A)
108862ae194dSScott Long #define MPI_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK   (0x0B)
10899b631363SMatt Jacob 
10909b631363SMatt Jacob typedef struct _FWUploadTCSGE
10919b631363SMatt Jacob {
10929b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
10939b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
10949b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
10959b631363SMatt Jacob     U8                      Flags;                      /* 03h */
10969b631363SMatt Jacob     U32                     Reserved1;                  /* 04h */
10979b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
10989b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
10999b631363SMatt Jacob } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
11009b631363SMatt Jacob   FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
11019b631363SMatt Jacob 
11029b631363SMatt Jacob /* Firmware Upload reply */
11039b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD_REPLY
11049b631363SMatt Jacob {
11059b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
11069b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
11079b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
11089b631363SMatt Jacob     U8                      Function;                   /* 03h */
11099b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
11109b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
11119b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
11129b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
11139b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
11149b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
11159b631363SMatt Jacob     U32                     ActualImageSize;            /* 14h */
11169b631363SMatt Jacob } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
11179b631363SMatt Jacob   FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
11189b631363SMatt Jacob 
11199b631363SMatt Jacob 
11209b631363SMatt Jacob typedef struct _MPI_FW_HEADER
11219b631363SMatt Jacob {
11229b631363SMatt Jacob     U32                     ArmBranchInstruction0;      /* 00h */
11239b631363SMatt Jacob     U32                     Signature0;                 /* 04h */
11249b631363SMatt Jacob     U32                     Signature1;                 /* 08h */
11259b631363SMatt Jacob     U32                     Signature2;                 /* 0Ch */
11269b631363SMatt Jacob     U32                     ArmBranchInstruction1;      /* 10h */
11279b631363SMatt Jacob     U32                     ArmBranchInstruction2;      /* 14h */
11289b631363SMatt Jacob     U32                     Reserved;                   /* 18h */
11299b631363SMatt Jacob     U32                     Checksum;                   /* 1Ch */
11309b631363SMatt Jacob     U16                     VendorId;                   /* 20h */
11319b631363SMatt Jacob     U16                     ProductId;                  /* 22h */
11329b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 24h */
11339b631363SMatt Jacob     U32                     SeqCodeVersion;             /* 28h */
11349b631363SMatt Jacob     U32                     ImageSize;                  /* 2Ch */
11359b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 30h */
11369b631363SMatt Jacob     U32                     LoadStartAddress;           /* 34h */
11379b631363SMatt Jacob     U32                     IopResetVectorValue;        /* 38h */
11389b631363SMatt Jacob     U32                     IopResetRegAddr;            /* 3Ch */
11399b631363SMatt Jacob     U32                     VersionNameWhat;            /* 40h */
11409b631363SMatt Jacob     U8                      VersionName[32];            /* 44h */
11419b631363SMatt Jacob     U32                     VendorNameWhat;             /* 64h */
11429b631363SMatt Jacob     U8                      VendorName[32];             /* 68h */
11439b631363SMatt Jacob } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
11449b631363SMatt Jacob   MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
11459b631363SMatt Jacob 
11469b631363SMatt Jacob #define MPI_FW_HEADER_WHAT_SIGNATURE        (0x29232840)
11479b631363SMatt Jacob 
11489b631363SMatt Jacob /* defines for using the ProductId field */
11499b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_MASK             (0xF000)
11509b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SCSI             (0x0000)
11519b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_FC               (0x1000)
11529de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SAS              (0x2000)
11539b631363SMatt Jacob 
11547fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_0               (0x5AEAA55A)
11557fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_1               (0xA55AEAA5)
11567fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_2               (0x5AA55AEA)
11577fed69eeSMatt Jacob 
11589b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_MASK                     (0x0F00)
11599b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI           (0x0100)
11609b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI    (0x0200)
11619b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI              (0x0300)
11629b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IM_SCSI                  (0x0400)
11639b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IS_SCSI                  (0x0500)
11649b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_CTX_SCSI                 (0x0600)
11659de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_PROD_IR_SCSI                  (0x0700)
11669b631363SMatt Jacob 
11679b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_MASK           (0x00FF)
11689de3c85cSMatt Jacob /* SCSI */
11699b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI    (0x0001)
11709b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI    (0x0002)
11719b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI    (0x0003)
11729b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI    (0x0004)
11739b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI    (0x0005)
11749b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI    (0x0006)
11759b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI    (0x0007)
11769b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI    (0x0008)
11779b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI    (0x0009)
11789b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI    (0x000A)
1179b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI   (0x000B)
1180b0a2fdeeSScott Long #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI   (0x000C)
11819de3c85cSMatt Jacob /* Fibre Channel */
11829b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_909_FC         (0x0000)
11839de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919_FC         (0x0001) /* 919 and 929     */
11849de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919X_FC        (0x0002) /* 919X and 929X   */
11859de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919XL_FC       (0x0003) /* 919XL and 929XL */
11869de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_939X_FC        (0x0004) /* 939X and 949X   */
11879de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_959_FC         (0x0005)
11880b80d21bSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_949E_FC        (0x0006)
11899de3c85cSMatt Jacob /* SAS */
11909de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1064_SAS       (0x0001)
11919de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1068_SAS       (0x0002)
11929de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1078_SAS       (0x0003)
11939de3c85cSMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_106xE_SAS      (0x0004) /* 1068E, 1066E, and 1064E */
11949b631363SMatt Jacob 
11959b631363SMatt Jacob typedef struct _MPI_EXT_IMAGE_HEADER
11969b631363SMatt Jacob {
11979b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
11989b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
11999b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
12009b631363SMatt Jacob     U32                     Checksum;                   /* 04h */
12019b631363SMatt Jacob     U32                     ImageSize;                  /* 08h */
12029b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 0Ch */
12039b631363SMatt Jacob     U32                     LoadStartAddress;           /* 10h */
12049b631363SMatt Jacob     U32                     Reserved2;                  /* 14h */
12059b631363SMatt Jacob } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
12069b631363SMatt Jacob   MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
12079b631363SMatt Jacob 
12089b631363SMatt Jacob /* defines for the ImageType field */
12099b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED          (0x00)
12109b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_FW                   (0x01)
12119b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_NVDATA               (0x03)
12129de3c85cSMatt Jacob #define MPI_EXT_IMAGE_TYPE_BOOTLOADER           (0x04)
121362ae194dSScott Long #define MPI_EXT_IMAGE_TYPE_INITIALIZATION       (0x05)
12149b631363SMatt Jacob 
12159b631363SMatt Jacob #endif
1216