xref: /freebsd/sys/dev/mpt/mpilib/mpi_ioc.h (revision 7fed69ee80b877e8dbaca8f0d77a686aa21f7852)
19b631363SMatt Jacob /* $FreeBSD$ */
29b631363SMatt Jacob /*
3d3ecac66SMatt Jacob  * Copyright (c) 2000, 2001 by LSI Logic Corporation
4d3ecac66SMatt Jacob  *
5d3ecac66SMatt Jacob  * Redistribution and use in source and binary forms, with or without
6d3ecac66SMatt Jacob  * modification, are permitted provided that the following conditions
7d3ecac66SMatt Jacob  * are met:
8d3ecac66SMatt Jacob  * 1. Redistributions of source code must retain the above copyright
9d3ecac66SMatt Jacob  *    notice immediately at the beginning of the file, without modification,
10d3ecac66SMatt Jacob  *    this list of conditions, and the following disclaimer.
11d3ecac66SMatt Jacob  * 2. The name of the author may not be used to endorse or promote products
12d3ecac66SMatt Jacob  *    derived from this software without specific prior written permission.
13d3ecac66SMatt Jacob  *
14d3ecac66SMatt Jacob  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15d3ecac66SMatt Jacob  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16d3ecac66SMatt Jacob  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17d3ecac66SMatt Jacob  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18d3ecac66SMatt Jacob  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19d3ecac66SMatt Jacob  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20d3ecac66SMatt Jacob  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21d3ecac66SMatt Jacob  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22d3ecac66SMatt Jacob  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23d3ecac66SMatt Jacob  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24d3ecac66SMatt Jacob  * SUCH DAMAGE.
259b631363SMatt Jacob  *
269b631363SMatt Jacob  *
279b631363SMatt Jacob  *           Name:  MPI_IOC.H
289b631363SMatt Jacob  *          Title:  MPI IOC, Port, Event, FW Download, and FW Upload messages
299b631363SMatt Jacob  *  Creation Date:  August 11, 2000
309b631363SMatt Jacob  *
317fed69eeSMatt Jacob  *    MPI_IOC.H Version:  01.02.07
329b631363SMatt Jacob  *
339b631363SMatt Jacob  *  Version History
349b631363SMatt Jacob  *  ---------------
359b631363SMatt Jacob  *
369b631363SMatt Jacob  *  Date      Version   Description
379b631363SMatt Jacob  *  --------  --------  ------------------------------------------------------
389b631363SMatt Jacob  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
399b631363SMatt Jacob  *  05-24-00  00.10.02  Added _MSG_IOC_INIT_REPLY structure.
409b631363SMatt Jacob  *  06-06-00  01.00.01  Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
419b631363SMatt Jacob  *  06-12-00  01.00.02  Added _MSG_PORT_ENABLE_REPLY structure.
429b631363SMatt Jacob  *                      Added _MSG_EVENT_ACK_REPLY structure.
439b631363SMatt Jacob  *                      Added _MSG_FW_DOWNLOAD_REPLY structure.
449b631363SMatt Jacob  *                      Added _MSG_TOOLBOX_REPLY structure.
459b631363SMatt Jacob  *  06-30-00  01.00.03  Added MaxLanBuckets to _PORT_FACT_REPLY structure.
469b631363SMatt Jacob  *  07-27-00  01.00.04  Added _EVENT_DATA structure definitions for _SCSI,
479b631363SMatt Jacob  *                      _LINK_STATUS, _LOOP_STATE and _LOGOUT.
489b631363SMatt Jacob  *  08-11-00  01.00.05  Switched positions of MsgLength and Function fields in
499b631363SMatt Jacob  *                      _MSG_EVENT_ACK_REPLY structure to match specification.
509b631363SMatt Jacob  *  11-02-00  01.01.01  Original release for post 1.0 work.
519b631363SMatt Jacob  *                      Added a value for Manufacturer to WhoInit.
529b631363SMatt Jacob  *  12-04-00  01.01.02  Modified IOCFacts reply, added FWUpload messages, and
539b631363SMatt Jacob  *                      removed toolbox message.
549b631363SMatt Jacob  *  01-09-01  01.01.03  Added event enabled and disabled defines.
559b631363SMatt Jacob  *                      Added structures for FwHeader and DataHeader.
569b631363SMatt Jacob  *                      Added ImageType to FwUpload reply.
579b631363SMatt Jacob  *  02-20-01  01.01.04  Started using MPI_POINTER.
589b631363SMatt Jacob  *  02-27-01  01.01.05  Added event for RAID status change and its event data.
599b631363SMatt Jacob  *                      Added IocNumber field to MSG_IOC_FACTS_REPLY.
609b631363SMatt Jacob  *  03-27-01  01.01.06  Added defines for ProductId field of MPI_FW_HEADER.
619b631363SMatt Jacob  *                      Added structure offset comments.
629b631363SMatt Jacob  *  04-09-01  01.01.07  Added structure EVENT_DATA_EVENT_CHANGE.
639b631363SMatt Jacob  *  08-08-01  01.02.01  Original release for v1.2 work.
649b631363SMatt Jacob  *                      New format for FWVersion and ProductId in
659b631363SMatt Jacob  *                      MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
669b631363SMatt Jacob  *  08-31-01  01.02.02  Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
679b631363SMatt Jacob  *                      related structure and defines.
689b631363SMatt Jacob  *                      Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
699b631363SMatt Jacob  *                      Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
709b631363SMatt Jacob  *                      Replaced a reserved field in MSG_IOC_FACTS_REPLY with
719b631363SMatt Jacob  *                      IOCExceptions and changed DataImageSize to reserved.
729b631363SMatt Jacob  *                      Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
739b631363SMatt Jacob  *                      MPI_FW_UPLOAD_ITYPE_NVDATA.
749b631363SMatt Jacob  *  09-28-01  01.02.03  Modified Event Data for Integrated RAID.
759b631363SMatt Jacob  *  11-01-01  01.02.04  Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
767fed69eeSMatt Jacob  *  03-14-02  01.02.05  Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
777fed69eeSMatt Jacob  *  05-31-02  01.02.06  Added define for
787fed69eeSMatt Jacob  *                      MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
797fed69eeSMatt Jacob  *                      Added AliasIndex to EVENT_DATA_LOGOUT structure.
807fed69eeSMatt Jacob  *  04-01-03  01.02.07  Added defines for MPI_FW_HEADER_SIGNATURE_.
819b631363SMatt Jacob  *  --------------------------------------------------------------------------
829b631363SMatt Jacob  */
839b631363SMatt Jacob 
849b631363SMatt Jacob #ifndef MPI_IOC_H
859b631363SMatt Jacob #define MPI_IOC_H
869b631363SMatt Jacob 
879b631363SMatt Jacob 
889b631363SMatt Jacob /*****************************************************************************
899b631363SMatt Jacob *
909b631363SMatt Jacob *               I O C    M e s s a g e s
919b631363SMatt Jacob *
929b631363SMatt Jacob *****************************************************************************/
939b631363SMatt Jacob 
949b631363SMatt Jacob /****************************************************************************/
959b631363SMatt Jacob /*  IOCInit message                                                         */
969b631363SMatt Jacob /****************************************************************************/
979b631363SMatt Jacob 
989b631363SMatt Jacob typedef struct _MSG_IOC_INIT
999b631363SMatt Jacob {
1009b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
1019b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
1029b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
1039b631363SMatt Jacob     U8                      Function;                   /* 03h */
1049b631363SMatt Jacob     U8                      Flags;                      /* 04h */
1059b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
1069b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
1079b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
1089b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1099b631363SMatt Jacob     U16                     ReplyFrameSize;             /* 0Ch */
1109b631363SMatt Jacob     U8                      Reserved1[2];               /* 0Eh */
1119b631363SMatt Jacob     U32                     HostMfaHighAddr;            /* 10h */
1129b631363SMatt Jacob     U32                     SenseBufferHighAddr;        /* 14h */
1139b631363SMatt Jacob } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
1149b631363SMatt Jacob   IOCInit_t, MPI_POINTER pIOCInit_t;
1159b631363SMatt Jacob 
1169b631363SMatt Jacob /* WhoInit values */
1179b631363SMatt Jacob #define MPI_WHOINIT_NO_ONE                      (0x00)
1189b631363SMatt Jacob #define MPI_WHOINIT_SYSTEM_BIOS                 (0x01)
1199b631363SMatt Jacob #define MPI_WHOINIT_ROM_BIOS                    (0x02)
1209b631363SMatt Jacob #define MPI_WHOINIT_PCI_PEER                    (0x03)
1219b631363SMatt Jacob #define MPI_WHOINIT_HOST_DRIVER                 (0x04)
1229b631363SMatt Jacob #define MPI_WHOINIT_MANUFACTURER                (0x05)
1239b631363SMatt Jacob 
1249b631363SMatt Jacob /* Flags values */
1259b631363SMatt Jacob #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE      (0x01)
1269b631363SMatt Jacob 
1279b631363SMatt Jacob typedef struct _MSG_IOC_INIT_REPLY
1289b631363SMatt Jacob {
1299b631363SMatt Jacob     U8                      WhoInit;                    /* 00h */
1309b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
1319b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
1329b631363SMatt Jacob     U8                      Function;                   /* 03h */
1339b631363SMatt Jacob     U8                      Flags;                      /* 04h */
1349b631363SMatt Jacob     U8                      MaxDevices;                 /* 05h */
1359b631363SMatt Jacob     U8                      MaxBuses;                   /* 06h */
1369b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
1379b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1389b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
1399b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
1409b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
1419b631363SMatt Jacob } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
1429b631363SMatt Jacob   IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
1439b631363SMatt Jacob 
1449b631363SMatt Jacob 
1459b631363SMatt Jacob 
1469b631363SMatt Jacob /****************************************************************************/
1479b631363SMatt Jacob /*  IOC Facts message                                                       */
1489b631363SMatt Jacob /****************************************************************************/
1499b631363SMatt Jacob 
1509b631363SMatt Jacob typedef struct _MSG_IOC_FACTS
1519b631363SMatt Jacob {
1529b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
1539b631363SMatt Jacob     U8                      ChainOffset;                /* 01h */
1549b631363SMatt Jacob     U8                      Function;                   /* 02h */
1559b631363SMatt Jacob     U8                      Reserved1[3];               /* 03h */
1569b631363SMatt Jacob     U8                      MsgFlags;                   /* 04h */
1579b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1589b631363SMatt Jacob } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
1599b631363SMatt Jacob   IOCFacts_t, MPI_POINTER pIOCFacts_t;
1609b631363SMatt Jacob 
1619b631363SMatt Jacob typedef struct _MPI_FW_VERSION_STRUCT
1629b631363SMatt Jacob {
1639b631363SMatt Jacob     U8                      Dev;                        /* 00h */
1649b631363SMatt Jacob     U8                      Unit;                       /* 01h */
1659b631363SMatt Jacob     U8                      Minor;                      /* 02h */
1669b631363SMatt Jacob     U8                      Major;                      /* 03h */
1679b631363SMatt Jacob } MPI_FW_VERSION_STRUCT;
1689b631363SMatt Jacob 
1699b631363SMatt Jacob typedef union _MPI_FW_VERSION
1709b631363SMatt Jacob {
1719b631363SMatt Jacob     MPI_FW_VERSION_STRUCT   Struct;
1729b631363SMatt Jacob     U32                     Word;
1739b631363SMatt Jacob } MPI_FW_VERSION;
1749b631363SMatt Jacob 
1759b631363SMatt Jacob /* IOC Facts Reply */
1769b631363SMatt Jacob typedef struct _MSG_IOC_FACTS_REPLY
1779b631363SMatt Jacob {
1789b631363SMatt Jacob     U16                     MsgVersion;                 /* 00h */
1799b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
1809b631363SMatt Jacob     U8                      Function;                   /* 03h */
1817fed69eeSMatt Jacob     U16                     HeaderVersion;              /* 04h */
1829b631363SMatt Jacob     U8                      IOCNumber;                  /* 06h */
1839b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
1849b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
1859b631363SMatt Jacob     U16                     IOCExceptions;              /* 0Ch */
1869b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
1879b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
1889b631363SMatt Jacob     U8                      MaxChainDepth;              /* 14h */
1899b631363SMatt Jacob     U8                      WhoInit;                    /* 15h */
1909b631363SMatt Jacob     U8                      BlockSize;                  /* 16h */
1919b631363SMatt Jacob     U8                      Flags;                      /* 17h */
1929b631363SMatt Jacob     U16                     ReplyQueueDepth;            /* 18h */
1939b631363SMatt Jacob     U16                     RequestFrameSize;           /* 1Ah */
1949b631363SMatt Jacob     U16                     Reserved_0101_FWVersion;    /* 1Ch */ /* obsolete 16-bit FWVersion */
1959b631363SMatt Jacob     U16                     ProductID;                  /* 1Eh */
1969b631363SMatt Jacob     U32                     CurrentHostMfaHighAddr;     /* 20h */
1979b631363SMatt Jacob     U16                     GlobalCredits;              /* 24h */
1989b631363SMatt Jacob     U8                      NumberOfPorts;              /* 26h */
1999b631363SMatt Jacob     U8                      EventState;                 /* 27h */
2009b631363SMatt Jacob     U32                     CurrentSenseBufferHighAddr; /* 28h */
2019b631363SMatt Jacob     U16                     CurReplyFrameSize;          /* 2Ch */
2029b631363SMatt Jacob     U8                      MaxDevices;                 /* 2Eh */
2039b631363SMatt Jacob     U8                      MaxBuses;                   /* 2Fh */
2049b631363SMatt Jacob     U32                     FWImageSize;                /* 30h */
2059b631363SMatt Jacob     U32                     Reserved4;                  /* 34h */
2069b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 38h */
2079b631363SMatt Jacob } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
2089b631363SMatt Jacob   IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
2099b631363SMatt Jacob 
2109b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK          (0xFF00)
2119b631363SMatt Jacob #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK          (0x00FF)
2129b631363SMatt Jacob 
2137fed69eeSMatt Jacob #define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK        (0xFF00)
2147fed69eeSMatt Jacob #define MPI_IOCFACTS_HEADERVERSION_DEV_MASK         (0x00FF)
2157fed69eeSMatt Jacob 
2169b631363SMatt Jacob #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL    (0x0001)
2177fed69eeSMatt Jacob #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID     (0x0002)
2189b631363SMatt Jacob 
2199b631363SMatt Jacob #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT         (0x01)
2209b631363SMatt Jacob 
2219b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_DISABLED            (0x00)
2229b631363SMatt Jacob #define MPI_IOCFACTS_EVENTSTATE_ENABLED             (0x01)
2239b631363SMatt Jacob 
2249b631363SMatt Jacob 
2259b631363SMatt Jacob 
2269b631363SMatt Jacob /*****************************************************************************
2279b631363SMatt Jacob *
2289b631363SMatt Jacob *               P o r t    M e s s a g e s
2299b631363SMatt Jacob *
2309b631363SMatt Jacob *****************************************************************************/
2319b631363SMatt Jacob 
2329b631363SMatt Jacob /****************************************************************************/
2339b631363SMatt Jacob /*  Port Facts message and Reply                                            */
2349b631363SMatt Jacob /****************************************************************************/
2359b631363SMatt Jacob 
2369b631363SMatt Jacob typedef struct _MSG_PORT_FACTS
2379b631363SMatt Jacob {
2389b631363SMatt Jacob      U8                     Reserved[2];                /* 00h */
2399b631363SMatt Jacob      U8                     ChainOffset;                /* 02h */
2409b631363SMatt Jacob      U8                     Function;                   /* 03h */
2419b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
2429b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
2439b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
2449b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
2459b631363SMatt Jacob } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
2469b631363SMatt Jacob   PortFacts_t, MPI_POINTER pPortFacts_t;
2479b631363SMatt Jacob 
2489b631363SMatt Jacob typedef struct _MSG_PORT_FACTS_REPLY
2499b631363SMatt Jacob {
2509b631363SMatt Jacob      U16                    Reserved;                   /* 00h */
2519b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
2529b631363SMatt Jacob      U8                     Function;                   /* 03h */
2539b631363SMatt Jacob      U16                    Reserved1;                  /* 04h */
2549b631363SMatt Jacob      U8                     PortNumber;                 /* 06h */
2559b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
2569b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
2579b631363SMatt Jacob      U16                    Reserved2;                  /* 0Ch */
2589b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
2599b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
2609b631363SMatt Jacob      U8                     Reserved3;                  /* 14h */
2619b631363SMatt Jacob      U8                     PortType;                   /* 15h */
2629b631363SMatt Jacob      U16                    MaxDevices;                 /* 16h */
2639b631363SMatt Jacob      U16                    PortSCSIID;                 /* 18h */
2649b631363SMatt Jacob      U16                    ProtocolFlags;              /* 1Ah */
2659b631363SMatt Jacob      U16                    MaxPostedCmdBuffers;        /* 1Ch */
2669b631363SMatt Jacob      U16                    MaxPersistentIDs;           /* 1Eh */
2679b631363SMatt Jacob      U16                    MaxLanBuckets;              /* 20h */
2689b631363SMatt Jacob      U16                    Reserved4;                  /* 22h */
2699b631363SMatt Jacob      U32                    Reserved5;                  /* 24h */
2709b631363SMatt Jacob } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
2719b631363SMatt Jacob   PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
2729b631363SMatt Jacob 
2739b631363SMatt Jacob 
2749b631363SMatt Jacob /* PortTypes values */
2759b631363SMatt Jacob 
2769b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_INACTIVE         (0x00)
2779b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_SCSI             (0x01)
2789b631363SMatt Jacob #define MPI_PORTFACTS_PORTTYPE_FC               (0x10)
2799b631363SMatt Jacob 
2809b631363SMatt Jacob /* ProtocolFlags values */
2819b631363SMatt Jacob 
2829b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR       (0x01)
2839b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_LAN              (0x02)
2849b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_TARGET           (0x04)
2859b631363SMatt Jacob #define MPI_PORTFACTS_PROTOCOL_INITIATOR        (0x08)
2869b631363SMatt Jacob 
2879b631363SMatt Jacob 
2889b631363SMatt Jacob /****************************************************************************/
2899b631363SMatt Jacob /*  Port Enable Message                                                     */
2909b631363SMatt Jacob /****************************************************************************/
2919b631363SMatt Jacob 
2929b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE
2939b631363SMatt Jacob {
2949b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
2959b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
2969b631363SMatt Jacob     U8                      Function;                   /* 03h */
2979b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
2989b631363SMatt Jacob     U8                      PortNumber;                 /* 06h */
2999b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
3009b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
3019b631363SMatt Jacob } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
3029b631363SMatt Jacob   PortEnable_t, MPI_POINTER pPortEnable_t;
3039b631363SMatt Jacob 
3049b631363SMatt Jacob typedef struct _MSG_PORT_ENABLE_REPLY
3059b631363SMatt Jacob {
3069b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
3079b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
3089b631363SMatt Jacob     U8                      Function;                   /* 03h */
3099b631363SMatt Jacob     U8                      Reserved1[2];               /* 04h */
3109b631363SMatt Jacob     U8                      PortNumber;                 /* 05h */
3119b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
3129b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
3139b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
3149b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
3159b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
3169b631363SMatt Jacob } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
3179b631363SMatt Jacob   PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
3189b631363SMatt Jacob 
3199b631363SMatt Jacob 
3209b631363SMatt Jacob /*****************************************************************************
3219b631363SMatt Jacob *
3229b631363SMatt Jacob *               E v e n t    M e s s a g e s
3239b631363SMatt Jacob *
3249b631363SMatt Jacob *****************************************************************************/
3259b631363SMatt Jacob 
3269b631363SMatt Jacob /****************************************************************************/
3279b631363SMatt Jacob /*  Event Notification messages                                             */
3289b631363SMatt Jacob /****************************************************************************/
3299b631363SMatt Jacob 
3309b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY
3319b631363SMatt Jacob {
3329b631363SMatt Jacob     U8                      Switch;                     /* 00h */
3339b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
3349b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
3359b631363SMatt Jacob     U8                      Function;                   /* 03h */
3369b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
3379b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
3389b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
3399b631363SMatt Jacob } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
3409b631363SMatt Jacob   EventNotification_t, MPI_POINTER pEventNotification_t;
3419b631363SMatt Jacob 
3429b631363SMatt Jacob /* Event Notification Reply */
3439b631363SMatt Jacob 
3449b631363SMatt Jacob typedef struct _MSG_EVENT_NOTIFY_REPLY
3459b631363SMatt Jacob {
3469b631363SMatt Jacob      U16                    EventDataLength;            /* 00h */
3479b631363SMatt Jacob      U8                     MsgLength;                  /* 02h */
3489b631363SMatt Jacob      U8                     Function;                   /* 03h */
3499b631363SMatt Jacob      U8                     Reserved1[2];               /* 04h */
3509b631363SMatt Jacob      U8                     AckRequired;                /* 06h */
3519b631363SMatt Jacob      U8                     MsgFlags;                   /* 07h */
3529b631363SMatt Jacob      U32                    MsgContext;                 /* 08h */
3539b631363SMatt Jacob      U8                     Reserved2[2];               /* 0Ch */
3549b631363SMatt Jacob      U16                    IOCStatus;                  /* 0Eh */
3559b631363SMatt Jacob      U32                    IOCLogInfo;                 /* 10h */
3569b631363SMatt Jacob      U32                    Event;                      /* 14h */
3579b631363SMatt Jacob      U32                    EventContext;               /* 18h */
3589b631363SMatt Jacob      U32                    Data[1];                    /* 1Ch */
3599b631363SMatt Jacob } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
3609b631363SMatt Jacob   EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
3619b631363SMatt Jacob 
3629b631363SMatt Jacob /* Event Acknowledge */
3639b631363SMatt Jacob 
3649b631363SMatt Jacob typedef struct _MSG_EVENT_ACK
3659b631363SMatt Jacob {
3669b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
3679b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
3689b631363SMatt Jacob     U8                      Function;                   /* 03h */
3699b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
3709b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
3719b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
3729b631363SMatt Jacob     U32                     Event;                      /* 0Ch */
3739b631363SMatt Jacob     U32                     EventContext;               /* 10h */
3749b631363SMatt Jacob } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
3759b631363SMatt Jacob   EventAck_t, MPI_POINTER pEventAck_t;
3769b631363SMatt Jacob 
3779b631363SMatt Jacob typedef struct _MSG_EVENT_ACK_REPLY
3789b631363SMatt Jacob {
3799b631363SMatt Jacob     U8                      Reserved[2];                /* 00h */
3809b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
3819b631363SMatt Jacob     U8                      Function;                   /* 03h */
3829b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
3839b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
3849b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
3859b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
3869b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
3879b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
3889b631363SMatt Jacob } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
3899b631363SMatt Jacob   EventAckReply_t, MPI_POINTER pEventAckReply_t;
3909b631363SMatt Jacob 
3919b631363SMatt Jacob /* Switch */
3929b631363SMatt Jacob 
3939b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_OFF   (0x00)
3949b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_SWITCH_ON    (0x01)
3959b631363SMatt Jacob 
3969b631363SMatt Jacob /* Event */
3979b631363SMatt Jacob 
3989b631363SMatt Jacob #define MPI_EVENT_NONE                      (0x00000000)
3999b631363SMatt Jacob #define MPI_EVENT_LOG_DATA                  (0x00000001)
4009b631363SMatt Jacob #define MPI_EVENT_STATE_CHANGE              (0x00000002)
4019b631363SMatt Jacob #define MPI_EVENT_UNIT_ATTENTION            (0x00000003)
4029b631363SMatt Jacob #define MPI_EVENT_IOC_BUS_RESET             (0x00000004)
4039b631363SMatt Jacob #define MPI_EVENT_EXT_BUS_RESET             (0x00000005)
4049b631363SMatt Jacob #define MPI_EVENT_RESCAN                    (0x00000006)
4059b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_CHANGE        (0x00000007)
4069b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE         (0x00000008)
4079b631363SMatt Jacob #define MPI_EVENT_LOGOUT                    (0x00000009)
4089b631363SMatt Jacob #define MPI_EVENT_EVENT_CHANGE              (0x0000000A)
4099b631363SMatt Jacob #define MPI_EVENT_INTEGRATED_RAID           (0x0000000B)
4109b631363SMatt Jacob #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C)
4119b631363SMatt Jacob #define MPI_EVENT_ON_BUS_TIMER_EXPIRED      (0x0000000D)
4129b631363SMatt Jacob 
4139b631363SMatt Jacob /* AckRequired field values */
4149b631363SMatt Jacob 
4159b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
4169b631363SMatt Jacob #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED     (0x01)
4179b631363SMatt Jacob 
4189b631363SMatt Jacob /* EventChange Event data */
4199b631363SMatt Jacob 
4209b631363SMatt Jacob typedef struct _EVENT_DATA_EVENT_CHANGE
4219b631363SMatt Jacob {
4229b631363SMatt Jacob     U8                      EventState;                 /* 00h */
4239b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
4249b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
4259b631363SMatt Jacob } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
4269b631363SMatt Jacob   EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
4279b631363SMatt Jacob 
4289b631363SMatt Jacob /* SCSI Event data for Port, Bus and Device forms */
4299b631363SMatt Jacob 
4309b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI
4319b631363SMatt Jacob {
4329b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
4339b631363SMatt Jacob     U8                      BusPort;                    /* 01h */
4349b631363SMatt Jacob     U16                     Reserved;                   /* 02h */
4359b631363SMatt Jacob } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
4369b631363SMatt Jacob   EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
4379b631363SMatt Jacob 
4389b631363SMatt Jacob /* SCSI Device Status Change Event data */
4399b631363SMatt Jacob 
4409b631363SMatt Jacob typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
4419b631363SMatt Jacob {
4429b631363SMatt Jacob     U8                      TargetID;                   /* 00h */
4439b631363SMatt Jacob     U8                      Bus;                        /* 01h */
4449b631363SMatt Jacob     U8                      ReasonCode;                 /* 02h */
4459b631363SMatt Jacob     U8                      LUN;                        /* 03h */
4469b631363SMatt Jacob     U8                      ASC;                        /* 04h */
4479b631363SMatt Jacob     U8                      ASCQ;                       /* 05h */
4489b631363SMatt Jacob     U16                     Reserved;                   /* 06h */
4499b631363SMatt Jacob } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
4509b631363SMatt Jacob   MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
4519b631363SMatt Jacob   MpiEventDataScsiDeviceStatusChange_t,
4529b631363SMatt Jacob   MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
4539b631363SMatt Jacob 
4549b631363SMatt Jacob /* MPI SCSI Device Status Change Event data ReasonCode values */
4559b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED                (0x03)
4569b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING       (0x04)
4579b631363SMatt Jacob #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA           (0x05)
4589b631363SMatt Jacob 
4599b631363SMatt Jacob /* MPI Link Status Change Event data */
4609b631363SMatt Jacob 
4619b631363SMatt Jacob typedef struct _EVENT_DATA_LINK_STATUS
4629b631363SMatt Jacob {
4639b631363SMatt Jacob     U8                      State;                      /* 00h */
4649b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
4659b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
4669b631363SMatt Jacob     U8                      Reserved2;                  /* 04h */
4679b631363SMatt Jacob     U8                      Port;                       /* 05h */
4689b631363SMatt Jacob     U16                     Reserved3;                  /* 06h */
4699b631363SMatt Jacob } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
4709b631363SMatt Jacob   EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
4719b631363SMatt Jacob 
4729b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_FAILURE       (0x00000000)
4739b631363SMatt Jacob #define MPI_EVENT_LINK_STATUS_ACTIVE        (0x00000001)
4749b631363SMatt Jacob 
4759b631363SMatt Jacob /* MPI Loop State Change Event data */
4769b631363SMatt Jacob 
4779b631363SMatt Jacob typedef struct _EVENT_DATA_LOOP_STATE
4789b631363SMatt Jacob {
4799b631363SMatt Jacob     U8                      Character4;                 /* 00h */
4809b631363SMatt Jacob     U8                      Character3;                 /* 01h */
4819b631363SMatt Jacob     U8                      Type;                       /* 02h */
4829b631363SMatt Jacob     U8                      Reserved;                   /* 03h */
4839b631363SMatt Jacob     U8                      Reserved1;                  /* 04h */
4849b631363SMatt Jacob     U8                      Port;                       /* 05h */
4859b631363SMatt Jacob     U16                     Reserved2;                  /* 06h */
4869b631363SMatt Jacob } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
4879b631363SMatt Jacob   EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
4889b631363SMatt Jacob 
4899b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LIP     (0x0001)
4909b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPE     (0x0002)
4919b631363SMatt Jacob #define MPI_EVENT_LOOP_STATE_CHANGE_LPB     (0x0003)
4929b631363SMatt Jacob 
4939b631363SMatt Jacob /* MPI LOGOUT Event data */
4949b631363SMatt Jacob 
4959b631363SMatt Jacob typedef struct _EVENT_DATA_LOGOUT
4969b631363SMatt Jacob {
4979b631363SMatt Jacob     U32                     NPortID;                    /* 00h */
4987fed69eeSMatt Jacob     U8                      AliasIndex;                 /* 04h */
4999b631363SMatt Jacob     U8                      Port;                       /* 05h */
5009b631363SMatt Jacob     U16                     Reserved1;                  /* 06h */
5019b631363SMatt Jacob } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
5029b631363SMatt Jacob   EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
5039b631363SMatt Jacob 
5047fed69eeSMatt Jacob #define MPI_EVENT_LOGOUT_ALL_ALIASES        (0xFF)
5057fed69eeSMatt Jacob 
5067fed69eeSMatt Jacob 
5079b631363SMatt Jacob /* MPI Integrated RAID Event data */
5089b631363SMatt Jacob 
5099b631363SMatt Jacob typedef struct _EVENT_DATA_RAID
5109b631363SMatt Jacob {
5119b631363SMatt Jacob     U8                      VolumeID;                   /* 00h */
5129b631363SMatt Jacob     U8                      VolumeBus;                  /* 01h */
5139b631363SMatt Jacob     U8                      ReasonCode;                 /* 02h */
5149b631363SMatt Jacob     U8                      PhysDiskNum;                /* 03h */
5159b631363SMatt Jacob     U8                      ASC;                        /* 04h */
5169b631363SMatt Jacob     U8                      ASCQ;                       /* 05h */
5179b631363SMatt Jacob     U16                     Reserved;                   /* 06h */
5189b631363SMatt Jacob     U32                     SettingsStatus;             /* 08h */
5199b631363SMatt Jacob } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
5209b631363SMatt Jacob   MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
5219b631363SMatt Jacob 
5229b631363SMatt Jacob /* MPI Integrated RAID Event data ReasonCode values */
5239b631363SMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_CREATED                (0x00)
5249b631363SMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_DELETED                (0x01)
5259b631363SMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED       (0x02)
5269b631363SMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED         (0x03)
5279b631363SMatt Jacob #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED       (0x04)
5289b631363SMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED              (0x05)
5299b631363SMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED              (0x06)
5309b631363SMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED     (0x07)
5319b631363SMatt Jacob #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED       (0x08)
5329b631363SMatt Jacob #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED             (0x09)
5339b631363SMatt Jacob #define MPI_EVENT_RAID_RC_SMART_DATA                    (0x0A)
5349b631363SMatt Jacob #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED        (0x0B)
5359b631363SMatt Jacob 
5369b631363SMatt Jacob 
5379b631363SMatt Jacob /*****************************************************************************
5389b631363SMatt Jacob *
5399b631363SMatt Jacob *               F i r m w a r e    L o a d    M e s s a g e s
5409b631363SMatt Jacob *
5419b631363SMatt Jacob *****************************************************************************/
5429b631363SMatt Jacob 
5439b631363SMatt Jacob /****************************************************************************/
5449b631363SMatt Jacob /*  Firmware Download message and associated structures                     */
5459b631363SMatt Jacob /****************************************************************************/
5469b631363SMatt Jacob 
5479b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD
5489b631363SMatt Jacob {
5499b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
5509b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
5519b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
5529b631363SMatt Jacob     U8                      Function;                   /* 03h */
5539b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
5549b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
5559b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
5569b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
5579b631363SMatt Jacob } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
5589b631363SMatt Jacob   FWDownload_t, MPI_POINTER pFWDownload_t;
5599b631363SMatt Jacob 
5609b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_RESERVED      (0x00)
5619b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_FW            (0x01)
5629b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_BIOS          (0x02)
5639b631363SMatt Jacob #define MPI_FW_DOWNLOAD_ITYPE_NVDATA        (0x03)
5649b631363SMatt Jacob 
5659b631363SMatt Jacob 
5669b631363SMatt Jacob typedef struct _FWDownloadTCSGE
5679b631363SMatt Jacob {
5689b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
5699b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
5709b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
5719b631363SMatt Jacob     U8                      Flags;                      /* 03h */
5729b631363SMatt Jacob     U32                     Reserved_0100_Checksum;     /* 04h */ /* obsolete Checksum */
5739b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
5749b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
5759b631363SMatt Jacob } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
5769b631363SMatt Jacob   FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
5779b631363SMatt Jacob 
5789b631363SMatt Jacob /* Firmware Download reply */
5799b631363SMatt Jacob typedef struct _MSG_FW_DOWNLOAD_REPLY
5809b631363SMatt Jacob {
5819b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
5829b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
5839b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
5849b631363SMatt Jacob     U8                      Function;                   /* 03h */
5859b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
5869b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
5879b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
5889b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
5899b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
5909b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
5919b631363SMatt Jacob } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
5929b631363SMatt Jacob   FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
5939b631363SMatt Jacob 
5949b631363SMatt Jacob 
5959b631363SMatt Jacob /****************************************************************************/
5969b631363SMatt Jacob /*  Firmware Upload message and associated structures                       */
5979b631363SMatt Jacob /****************************************************************************/
5989b631363SMatt Jacob 
5999b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD
6009b631363SMatt Jacob {
6019b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
6029b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
6039b631363SMatt Jacob     U8                      ChainOffset;                /* 02h */
6049b631363SMatt Jacob     U8                      Function;                   /* 03h */
6059b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
6069b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
6079b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
6089b631363SMatt Jacob     SGE_MPI_UNION           SGL;                        /* 0Ch */
6099b631363SMatt Jacob } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
6109b631363SMatt Jacob   FWUpload_t, MPI_POINTER pFWUpload_t;
6119b631363SMatt Jacob 
6129b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM      (0x00)
6139b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_FW_FLASH        (0x01)
6149b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH      (0x02)
6159b631363SMatt Jacob #define MPI_FW_UPLOAD_ITYPE_NVDATA          (0x03)
6169b631363SMatt Jacob 
6179b631363SMatt Jacob typedef struct _FWUploadTCSGE
6189b631363SMatt Jacob {
6199b631363SMatt Jacob     U8                      Reserved;                   /* 00h */
6209b631363SMatt Jacob     U8                      ContextSize;                /* 01h */
6219b631363SMatt Jacob     U8                      DetailsLength;              /* 02h */
6229b631363SMatt Jacob     U8                      Flags;                      /* 03h */
6239b631363SMatt Jacob     U32                     Reserved1;                  /* 04h */
6249b631363SMatt Jacob     U32                     ImageOffset;                /* 08h */
6259b631363SMatt Jacob     U32                     ImageSize;                  /* 0Ch */
6269b631363SMatt Jacob } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
6279b631363SMatt Jacob   FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
6289b631363SMatt Jacob 
6299b631363SMatt Jacob /* Firmware Upload reply */
6309b631363SMatt Jacob typedef struct _MSG_FW_UPLOAD_REPLY
6319b631363SMatt Jacob {
6329b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
6339b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
6349b631363SMatt Jacob     U8                      MsgLength;                  /* 02h */
6359b631363SMatt Jacob     U8                      Function;                   /* 03h */
6369b631363SMatt Jacob     U8                      Reserved1[3];               /* 04h */
6379b631363SMatt Jacob     U8                      MsgFlags;                   /* 07h */
6389b631363SMatt Jacob     U32                     MsgContext;                 /* 08h */
6399b631363SMatt Jacob     U16                     Reserved2;                  /* 0Ch */
6409b631363SMatt Jacob     U16                     IOCStatus;                  /* 0Eh */
6419b631363SMatt Jacob     U32                     IOCLogInfo;                 /* 10h */
6429b631363SMatt Jacob     U32                     ActualImageSize;            /* 14h */
6439b631363SMatt Jacob } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
6449b631363SMatt Jacob   FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
6459b631363SMatt Jacob 
6469b631363SMatt Jacob 
6479b631363SMatt Jacob typedef struct _MPI_FW_HEADER
6489b631363SMatt Jacob {
6499b631363SMatt Jacob     U32                     ArmBranchInstruction0;      /* 00h */
6509b631363SMatt Jacob     U32                     Signature0;                 /* 04h */
6519b631363SMatt Jacob     U32                     Signature1;                 /* 08h */
6529b631363SMatt Jacob     U32                     Signature2;                 /* 0Ch */
6539b631363SMatt Jacob     U32                     ArmBranchInstruction1;      /* 10h */
6549b631363SMatt Jacob     U32                     ArmBranchInstruction2;      /* 14h */
6559b631363SMatt Jacob     U32                     Reserved;                   /* 18h */
6569b631363SMatt Jacob     U32                     Checksum;                   /* 1Ch */
6579b631363SMatt Jacob     U16                     VendorId;                   /* 20h */
6589b631363SMatt Jacob     U16                     ProductId;                  /* 22h */
6599b631363SMatt Jacob     MPI_FW_VERSION          FWVersion;                  /* 24h */
6609b631363SMatt Jacob     U32                     SeqCodeVersion;             /* 28h */
6619b631363SMatt Jacob     U32                     ImageSize;                  /* 2Ch */
6629b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 30h */
6639b631363SMatt Jacob     U32                     LoadStartAddress;           /* 34h */
6649b631363SMatt Jacob     U32                     IopResetVectorValue;        /* 38h */
6659b631363SMatt Jacob     U32                     IopResetRegAddr;            /* 3Ch */
6669b631363SMatt Jacob     U32                     VersionNameWhat;            /* 40h */
6679b631363SMatt Jacob     U8                      VersionName[32];            /* 44h */
6689b631363SMatt Jacob     U32                     VendorNameWhat;             /* 64h */
6699b631363SMatt Jacob     U8                      VendorName[32];             /* 68h */
6709b631363SMatt Jacob } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
6719b631363SMatt Jacob   MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
6729b631363SMatt Jacob 
6739b631363SMatt Jacob #define MPI_FW_HEADER_WHAT_SIGNATURE        (0x29232840)
6749b631363SMatt Jacob 
6759b631363SMatt Jacob /* defines for using the ProductId field */
6769b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_MASK             (0xF000)
6779b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_SCSI             (0x0000)
6789b631363SMatt Jacob #define MPI_FW_HEADER_PID_TYPE_FC               (0x1000)
6799b631363SMatt Jacob 
6807fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_0               (0x5AEAA55A)
6817fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_1               (0xA55AEAA5)
6827fed69eeSMatt Jacob #define MPI_FW_HEADER_SIGNATURE_2               (0x5AA55AEA)
6837fed69eeSMatt Jacob 
6849b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_MASK                     (0x0F00)
6859b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI           (0x0100)
6869b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI    (0x0200)
6879b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI              (0x0300)
6889b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IM_SCSI                  (0x0400)
6899b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_IS_SCSI                  (0x0500)
6909b631363SMatt Jacob #define MPI_FW_HEADER_PID_PROD_CTX_SCSI                 (0x0600)
6919b631363SMatt Jacob 
6929b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_MASK           (0x00FF)
6939b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI    (0x0001)
6949b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI    (0x0002)
6959b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI    (0x0003)
6969b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI    (0x0004)
6979b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI    (0x0005)
6989b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI    (0x0006)
6999b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI    (0x0007)
7009b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI    (0x0008)
7019b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI    (0x0009)
7029b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI    (0x000A)
7039b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_909_FC         (0x0000)
7049b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919_FC         (0x0001)
7059b631363SMatt Jacob #define MPI_FW_HEADER_PID_FAMILY_919X_FC        (0x0002)
7069b631363SMatt Jacob 
7079b631363SMatt Jacob typedef struct _MPI_EXT_IMAGE_HEADER
7089b631363SMatt Jacob {
7099b631363SMatt Jacob     U8                      ImageType;                  /* 00h */
7109b631363SMatt Jacob     U8                      Reserved;                   /* 01h */
7119b631363SMatt Jacob     U16                     Reserved1;                  /* 02h */
7129b631363SMatt Jacob     U32                     Checksum;                   /* 04h */
7139b631363SMatt Jacob     U32                     ImageSize;                  /* 08h */
7149b631363SMatt Jacob     U32                     NextImageHeaderOffset;      /* 0Ch */
7159b631363SMatt Jacob     U32                     LoadStartAddress;           /* 10h */
7169b631363SMatt Jacob     U32                     Reserved2;                  /* 14h */
7179b631363SMatt Jacob } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
7189b631363SMatt Jacob   MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
7199b631363SMatt Jacob 
7209b631363SMatt Jacob /* defines for the ImageType field */
7219b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED          (0x00)
7229b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_FW                   (0x01)
7239b631363SMatt Jacob #define MPI_EXT_IMAGE_TYPE_NVDATA               (0x03)
7249b631363SMatt Jacob 
7259b631363SMatt Jacob #endif
726