xref: /freebsd/sys/dev/mps/mpi/mpi2_ioc.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1d043c564SKenneth D. Merry /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
4ef065d89SStephen McConnell  * Copyright (c) 2006-2015 LSI Corp.
5ef065d89SStephen McConnell  * Copyright (c) 2013-2015 Avago Technologies
6d043c564SKenneth D. Merry  * All rights reserved.
7d043c564SKenneth D. Merry  *
8d043c564SKenneth D. Merry  * Redistribution and use in source and binary forms, with or without
9d043c564SKenneth D. Merry  * modification, are permitted provided that the following conditions
10d043c564SKenneth D. Merry  * are met:
11d043c564SKenneth D. Merry  * 1. Redistributions of source code must retain the above copyright
12d043c564SKenneth D. Merry  *    notice, this list of conditions and the following disclaimer.
13d043c564SKenneth D. Merry  * 2. Redistributions in binary form must reproduce the above copyright
14d043c564SKenneth D. Merry  *    notice, this list of conditions and the following disclaimer in the
15d043c564SKenneth D. Merry  *    documentation and/or other materials provided with the distribution.
16d043c564SKenneth D. Merry  *
17d043c564SKenneth D. Merry  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18d043c564SKenneth D. Merry  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19d043c564SKenneth D. Merry  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20d043c564SKenneth D. Merry  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21d043c564SKenneth D. Merry  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22d043c564SKenneth D. Merry  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23d043c564SKenneth D. Merry  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24d043c564SKenneth D. Merry  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25d043c564SKenneth D. Merry  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26d043c564SKenneth D. Merry  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27d043c564SKenneth D. Merry  * SUCH DAMAGE.
28d043c564SKenneth D. Merry  *
29ef065d89SStephen McConnell  * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD
30d043c564SKenneth D. Merry  */
31d043c564SKenneth D. Merry 
32d3c7b9a0SKenneth D. Merry /*
33ef065d89SStephen McConnell  *  Copyright (c) 2006-2015 LSI Corporation.
34ef065d89SStephen McConnell  *  Copyright (c) 2013-2015 Avago Technologies
35d3c7b9a0SKenneth D. Merry  *
36d3c7b9a0SKenneth D. Merry  *
37d3c7b9a0SKenneth D. Merry  *           Name:  mpi2_ioc.h
38d3c7b9a0SKenneth D. Merry  *          Title:  MPI IOC, Port, Event, FW Download, and FW Upload messages
39d3c7b9a0SKenneth D. Merry  *  Creation Date:  October 11, 2006
40d3c7b9a0SKenneth D. Merry  *
41d043c564SKenneth D. Merry  *  mpi2_ioc.h Version:  02.00.16
42d3c7b9a0SKenneth D. Merry  *
43d3c7b9a0SKenneth D. Merry  *  Version History
44d3c7b9a0SKenneth D. Merry  *  ---------------
45d3c7b9a0SKenneth D. Merry  *
46d3c7b9a0SKenneth D. Merry  *  Date      Version   Description
47d3c7b9a0SKenneth D. Merry  *  --------  --------  ------------------------------------------------------
48d3c7b9a0SKenneth D. Merry  *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
49d3c7b9a0SKenneth D. Merry  *  06-04-07  02.00.01  In IOCFacts Reply structure, renamed MaxDevices to
50d3c7b9a0SKenneth D. Merry  *                      MaxTargets.
51d3c7b9a0SKenneth D. Merry  *                      Added TotalImageSize field to FWDownload Request.
52d3c7b9a0SKenneth D. Merry  *                      Added reserved words to FWUpload Request.
53d3c7b9a0SKenneth D. Merry  *  06-26-07  02.00.02  Added IR Configuration Change List Event.
54d3c7b9a0SKenneth D. Merry  *  08-31-07  02.00.03  Removed SystemReplyQueueDepth field from the IOCInit
55d3c7b9a0SKenneth D. Merry  *                      request and replaced it with
56d3c7b9a0SKenneth D. Merry  *                      ReplyDescriptorPostQueueDepth and ReplyFreeQueueDepth.
57d3c7b9a0SKenneth D. Merry  *                      Replaced the MinReplyQueueDepth field of the IOCFacts
58d3c7b9a0SKenneth D. Merry  *                      reply with MaxReplyDescriptorPostQueueDepth.
59d3c7b9a0SKenneth D. Merry  *                      Added MPI2_RDPQ_DEPTH_MIN define to specify the minimum
60d3c7b9a0SKenneth D. Merry  *                      depth for the Reply Descriptor Post Queue.
61d3c7b9a0SKenneth D. Merry  *                      Added SASAddress field to Initiator Device Table
62d3c7b9a0SKenneth D. Merry  *                      Overflow Event data.
63d3c7b9a0SKenneth D. Merry  *  10-31-07  02.00.04  Added ReasonCode MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING
64d3c7b9a0SKenneth D. Merry  *                      for SAS Initiator Device Status Change Event data.
65d3c7b9a0SKenneth D. Merry  *                      Modified Reason Code defines for SAS Topology Change
66d3c7b9a0SKenneth D. Merry  *                      List Event data, including adding a bit for PHY Vacant
67d3c7b9a0SKenneth D. Merry  *                      status, and adding a mask for the Reason Code.
68d3c7b9a0SKenneth D. Merry  *                      Added define for
69d3c7b9a0SKenneth D. Merry  *                      MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING.
70d3c7b9a0SKenneth D. Merry  *                      Added define for MPI2_EXT_IMAGE_TYPE_MEGARAID.
71d3c7b9a0SKenneth D. Merry  *  12-18-07  02.00.05  Added Boot Status defines for the IOCExceptions field of
72d3c7b9a0SKenneth D. Merry  *                      the IOCFacts Reply.
73d3c7b9a0SKenneth D. Merry  *                      Removed MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
74d3c7b9a0SKenneth D. Merry  *                      Moved MPI2_VERSION_UNION to mpi2.h.
75d3c7b9a0SKenneth D. Merry  *                      Changed MPI2_EVENT_NOTIFICATION_REQUEST to use masks
76d3c7b9a0SKenneth D. Merry  *                      instead of enables, and added SASBroadcastPrimitiveMasks
77d3c7b9a0SKenneth D. Merry  *                      field.
78d3c7b9a0SKenneth D. Merry  *                      Added Log Entry Added Event and related structure.
79d3c7b9a0SKenneth D. Merry  *  02-29-08  02.00.06  Added define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID.
80d3c7b9a0SKenneth D. Merry  *                      Removed define MPI2_IOCFACTS_PROTOCOL_SMP_TARGET.
81d3c7b9a0SKenneth D. Merry  *                      Added MaxVolumes and MaxPersistentEntries fields to
82d3c7b9a0SKenneth D. Merry  *                      IOCFacts reply.
83d3c7b9a0SKenneth D. Merry  *                      Added ProtocalFlags and IOCCapabilities fields to
84d3c7b9a0SKenneth D. Merry  *                      MPI2_FW_IMAGE_HEADER.
85d3c7b9a0SKenneth D. Merry  *                      Removed MPI2_PORTENABLE_FLAGS_ENABLE_SINGLE_PORT.
86d3c7b9a0SKenneth D. Merry  *  03-03-08  02.00.07  Fixed MPI2_FW_IMAGE_HEADER by changing Reserved26 to
87d3c7b9a0SKenneth D. Merry  *                      a U16 (from a U32).
88d3c7b9a0SKenneth D. Merry  *                      Removed extra 's' from EventMasks name.
89d3c7b9a0SKenneth D. Merry  *  06-27-08  02.00.08  Fixed an offset in a comment.
90d3c7b9a0SKenneth D. Merry  *  10-02-08  02.00.09  Removed SystemReplyFrameSize from MPI2_IOC_INIT_REQUEST.
91d3c7b9a0SKenneth D. Merry  *                      Removed CurReplyFrameSize from MPI2_IOC_FACTS_REPLY and
92d3c7b9a0SKenneth D. Merry  *                      renamed MinReplyFrameSize to ReplyFrameSize.
93d3c7b9a0SKenneth D. Merry  *                      Added MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX.
94d3c7b9a0SKenneth D. Merry  *                      Added two new RAIDOperation values for Integrated RAID
95d3c7b9a0SKenneth D. Merry  *                      Operations Status Event data.
96d3c7b9a0SKenneth D. Merry  *                      Added four new IR Configuration Change List Event data
97d3c7b9a0SKenneth D. Merry  *                      ReasonCode values.
98d3c7b9a0SKenneth D. Merry  *                      Added two new ReasonCode defines for SAS Device Status
99d3c7b9a0SKenneth D. Merry  *                      Change Event data.
100d3c7b9a0SKenneth D. Merry  *                      Added three new DiscoveryStatus bits for the SAS
101d3c7b9a0SKenneth D. Merry  *                      Discovery event data.
102d3c7b9a0SKenneth D. Merry  *                      Added Multiplexing Status Change bit to the PhyStatus
103d3c7b9a0SKenneth D. Merry  *                      field of the SAS Topology Change List event data.
104d3c7b9a0SKenneth D. Merry  *                      Removed define for MPI2_INIT_IMAGE_BOOTFLAGS_XMEMCOPY.
105d3c7b9a0SKenneth D. Merry  *                      BootFlags are now product-specific.
106d3c7b9a0SKenneth D. Merry  *                      Added defines for the indivdual signature bytes
107d3c7b9a0SKenneth D. Merry  *                      for MPI2_INIT_IMAGE_FOOTER.
108d3c7b9a0SKenneth D. Merry  *  01-19-09  02.00.10  Added MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY define.
109d3c7b9a0SKenneth D. Merry  *                      Added MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR
110d3c7b9a0SKenneth D. Merry  *                      define.
111d3c7b9a0SKenneth D. Merry  *                      Added MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE
112d3c7b9a0SKenneth D. Merry  *                      define.
113d3c7b9a0SKenneth D. Merry  *                      Removed MPI2_EVENT_SAS_DISC_DS_SATA_INIT_FAILURE define.
114d3c7b9a0SKenneth D. Merry  *  05-06-09  02.00.11  Added MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR define.
115d3c7b9a0SKenneth D. Merry  *                      Added MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX define.
116d3c7b9a0SKenneth D. Merry  *                      Added two new reason codes for SAS Device Status Change
117d3c7b9a0SKenneth D. Merry  *                      Event.
118d3c7b9a0SKenneth D. Merry  *                      Added new event: SAS PHY Counter.
119d3c7b9a0SKenneth D. Merry  *  07-30-09  02.00.12  Added GPIO Interrupt event define and structure.
120d3c7b9a0SKenneth D. Merry  *                      Added MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
121d3c7b9a0SKenneth D. Merry  *                      Added new product id family for 2208.
122d3c7b9a0SKenneth D. Merry  *  10-28-09  02.00.13  Added HostMSIxVectors field to MPI2_IOC_INIT_REQUEST.
123d3c7b9a0SKenneth D. Merry  *                      Added MaxMSIxVectors field to MPI2_IOC_FACTS_REPLY.
124d3c7b9a0SKenneth D. Merry  *                      Added MinDevHandle field to MPI2_IOC_FACTS_REPLY.
125d3c7b9a0SKenneth D. Merry  *                      Added MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY.
126d3c7b9a0SKenneth D. Merry  *                      Added MPI2_EVENT_HOST_BASED_DISCOVERY_PHY define.
127d3c7b9a0SKenneth D. Merry  *                      Added MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER define.
128d3c7b9a0SKenneth D. Merry  *                      Added Host Based Discovery Phy Event data.
129d3c7b9a0SKenneth D. Merry  *                      Added defines for ProductID Product field
130d3c7b9a0SKenneth D. Merry  *                      (MPI2_FW_HEADER_PID_).
131d3c7b9a0SKenneth D. Merry  *                      Modified values for SAS ProductID Family
132d3c7b9a0SKenneth D. Merry  *                      (MPI2_FW_HEADER_PID_FAMILY_).
133d043c564SKenneth D. Merry  *  02-10-10  02.00.14  Added SAS Quiesce Event structure and defines.
134d043c564SKenneth D. Merry  *                      Added PowerManagementControl Request structures and
135d043c564SKenneth D. Merry  *                      defines.
136d043c564SKenneth D. Merry  *  05-12-10  02.00.15  Marked Task Set Full Event as obsolete.
137d043c564SKenneth D. Merry  *                      Added MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY define.
138d043c564SKenneth D. Merry  *  11-10-10  02.00.16  Added MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC.
139d3c7b9a0SKenneth D. Merry  *  --------------------------------------------------------------------------
140d3c7b9a0SKenneth D. Merry  */
141d3c7b9a0SKenneth D. Merry 
142d3c7b9a0SKenneth D. Merry #ifndef MPI2_IOC_H
143d3c7b9a0SKenneth D. Merry #define MPI2_IOC_H
144d3c7b9a0SKenneth D. Merry 
145d3c7b9a0SKenneth D. Merry /*****************************************************************************
146d3c7b9a0SKenneth D. Merry *
147d3c7b9a0SKenneth D. Merry *               IOC Messages
148d3c7b9a0SKenneth D. Merry *
149d3c7b9a0SKenneth D. Merry *****************************************************************************/
150d3c7b9a0SKenneth D. Merry 
151d3c7b9a0SKenneth D. Merry /****************************************************************************
152d3c7b9a0SKenneth D. Merry *  IOCInit message
153d3c7b9a0SKenneth D. Merry ****************************************************************************/
154d3c7b9a0SKenneth D. Merry 
155d3c7b9a0SKenneth D. Merry /* IOCInit Request message */
156d3c7b9a0SKenneth D. Merry typedef struct _MPI2_IOC_INIT_REQUEST
157d3c7b9a0SKenneth D. Merry {
158d3c7b9a0SKenneth D. Merry     U8                      WhoInit;                        /* 0x00 */
159d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                      /* 0x01 */
160d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
161d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
162d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
163d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
164d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
165d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
166d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
167d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
168d3c7b9a0SKenneth D. Merry     U16                     MsgVersion;                     /* 0x0C */
169d3c7b9a0SKenneth D. Merry     U16                     HeaderVersion;                  /* 0x0E */
170d3c7b9a0SKenneth D. Merry     U32                     Reserved5;                      /* 0x10 */
171d3c7b9a0SKenneth D. Merry     U16                     Reserved6;                      /* 0x14 */
172d3c7b9a0SKenneth D. Merry     U8                      Reserved7;                      /* 0x16 */
173d3c7b9a0SKenneth D. Merry     U8                      HostMSIxVectors;                /* 0x17 */
174d3c7b9a0SKenneth D. Merry     U16                     Reserved8;                      /* 0x18 */
175d3c7b9a0SKenneth D. Merry     U16                     SystemRequestFrameSize;         /* 0x1A */
176d3c7b9a0SKenneth D. Merry     U16                     ReplyDescriptorPostQueueDepth;  /* 0x1C */
177d3c7b9a0SKenneth D. Merry     U16                     ReplyFreeQueueDepth;            /* 0x1E */
178d3c7b9a0SKenneth D. Merry     U32                     SenseBufferAddressHigh;         /* 0x20 */
179d3c7b9a0SKenneth D. Merry     U32                     SystemReplyAddressHigh;         /* 0x24 */
180d3c7b9a0SKenneth D. Merry     U64                     SystemRequestFrameBaseAddress;  /* 0x28 */
181d3c7b9a0SKenneth D. Merry     U64                     ReplyDescriptorPostQueueAddress;/* 0x30 */
182d3c7b9a0SKenneth D. Merry     U64                     ReplyFreeQueueAddress;          /* 0x38 */
183d3c7b9a0SKenneth D. Merry     U64                     TimeStamp;                      /* 0x40 */
184d3c7b9a0SKenneth D. Merry } MPI2_IOC_INIT_REQUEST, MPI2_POINTER PTR_MPI2_IOC_INIT_REQUEST,
185d3c7b9a0SKenneth D. Merry   Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest_t;
186d3c7b9a0SKenneth D. Merry 
187d3c7b9a0SKenneth D. Merry /* WhoInit values */
188d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_NOT_INITIALIZED            (0x00)
189d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_SYSTEM_BIOS                (0x01)
190d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_ROM_BIOS                   (0x02)
191d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_PCI_PEER                   (0x03)
192d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_HOST_DRIVER                (0x04)
193d3c7b9a0SKenneth D. Merry #define MPI2_WHOINIT_MANUFACTURER               (0x05)
194d3c7b9a0SKenneth D. Merry 
195d3c7b9a0SKenneth D. Merry /* MsgVersion */
196d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_MSGVERSION_MAJOR_MASK      (0xFF00)
197d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_MSGVERSION_MAJOR_SHIFT     (8)
198d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_MSGVERSION_MINOR_MASK      (0x00FF)
199d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_MSGVERSION_MINOR_SHIFT     (0)
200d3c7b9a0SKenneth D. Merry 
201d3c7b9a0SKenneth D. Merry /* HeaderVersion */
202d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_HDRVERSION_UNIT_MASK       (0xFF00)
203d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_HDRVERSION_UNIT_SHIFT      (8)
204d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_HDRVERSION_DEV_MASK        (0x00FF)
205d3c7b9a0SKenneth D. Merry #define MPI2_IOCINIT_HDRVERSION_DEV_SHIFT       (0)
206d3c7b9a0SKenneth D. Merry 
207d3c7b9a0SKenneth D. Merry /* minimum depth for the Reply Descriptor Post Queue */
208d3c7b9a0SKenneth D. Merry #define MPI2_RDPQ_DEPTH_MIN                     (16)
209d3c7b9a0SKenneth D. Merry 
210d3c7b9a0SKenneth D. Merry /* IOCInit Reply message */
211d3c7b9a0SKenneth D. Merry typedef struct _MPI2_IOC_INIT_REPLY
212d3c7b9a0SKenneth D. Merry {
213d3c7b9a0SKenneth D. Merry     U8                      WhoInit;                        /* 0x00 */
214d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                      /* 0x01 */
215d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
216d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
217d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
218d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
219d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
220d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
221d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
222d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
223d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                      /* 0x0C */
224d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
225d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
226d3c7b9a0SKenneth D. Merry } MPI2_IOC_INIT_REPLY, MPI2_POINTER PTR_MPI2_IOC_INIT_REPLY,
227d3c7b9a0SKenneth D. Merry   Mpi2IOCInitReply_t, MPI2_POINTER pMpi2IOCInitReply_t;
228d3c7b9a0SKenneth D. Merry 
229d3c7b9a0SKenneth D. Merry /****************************************************************************
230d3c7b9a0SKenneth D. Merry *  IOCFacts message
231d3c7b9a0SKenneth D. Merry ****************************************************************************/
232d3c7b9a0SKenneth D. Merry 
233d3c7b9a0SKenneth D. Merry /* IOCFacts Request message */
234d3c7b9a0SKenneth D. Merry typedef struct _MPI2_IOC_FACTS_REQUEST
235d3c7b9a0SKenneth D. Merry {
236d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
237d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
238d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
239d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
240d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
241d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
242d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
243d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
244d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
245d3c7b9a0SKenneth D. Merry } MPI2_IOC_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_IOC_FACTS_REQUEST,
246d3c7b9a0SKenneth D. Merry   Mpi2IOCFactsRequest_t, MPI2_POINTER pMpi2IOCFactsRequest_t;
247d3c7b9a0SKenneth D. Merry 
248d3c7b9a0SKenneth D. Merry /* IOCFacts Reply message */
249d3c7b9a0SKenneth D. Merry typedef struct _MPI2_IOC_FACTS_REPLY
250d3c7b9a0SKenneth D. Merry {
251d3c7b9a0SKenneth D. Merry     U16                     MsgVersion;                     /* 0x00 */
252d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
253d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
254d3c7b9a0SKenneth D. Merry     U16                     HeaderVersion;                  /* 0x04 */
255d3c7b9a0SKenneth D. Merry     U8                      IOCNumber;                      /* 0x06 */
256d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
257d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
258d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
259d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x0A */
260d3c7b9a0SKenneth D. Merry     U16                     IOCExceptions;                  /* 0x0C */
261d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
262d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
263d3c7b9a0SKenneth D. Merry     U8                      MaxChainDepth;                  /* 0x14 */
264d3c7b9a0SKenneth D. Merry     U8                      WhoInit;                        /* 0x15 */
265d3c7b9a0SKenneth D. Merry     U8                      NumberOfPorts;                  /* 0x16 */
266d3c7b9a0SKenneth D. Merry     U8                      MaxMSIxVectors;                 /* 0x17 */
267d3c7b9a0SKenneth D. Merry     U16                     RequestCredit;                  /* 0x18 */
268d3c7b9a0SKenneth D. Merry     U16                     ProductID;                      /* 0x1A */
269d3c7b9a0SKenneth D. Merry     U32                     IOCCapabilities;                /* 0x1C */
270d3c7b9a0SKenneth D. Merry     MPI2_VERSION_UNION      FWVersion;                      /* 0x20 */
271d3c7b9a0SKenneth D. Merry     U16                     IOCRequestFrameSize;            /* 0x24 */
272d3c7b9a0SKenneth D. Merry     U16                     Reserved3;                      /* 0x26 */
273d3c7b9a0SKenneth D. Merry     U16                     MaxInitiators;                  /* 0x28 */
274d3c7b9a0SKenneth D. Merry     U16                     MaxTargets;                     /* 0x2A */
275d3c7b9a0SKenneth D. Merry     U16                     MaxSasExpanders;                /* 0x2C */
276d3c7b9a0SKenneth D. Merry     U16                     MaxEnclosures;                  /* 0x2E */
277d3c7b9a0SKenneth D. Merry     U16                     ProtocolFlags;                  /* 0x30 */
278d3c7b9a0SKenneth D. Merry     U16                     HighPriorityCredit;             /* 0x32 */
279d3c7b9a0SKenneth D. Merry     U16                     MaxReplyDescriptorPostQueueDepth; /* 0x34 */
280d3c7b9a0SKenneth D. Merry     U8                      ReplyFrameSize;                 /* 0x36 */
281d3c7b9a0SKenneth D. Merry     U8                      MaxVolumes;                     /* 0x37 */
282d3c7b9a0SKenneth D. Merry     U16                     MaxDevHandle;                   /* 0x38 */
283d3c7b9a0SKenneth D. Merry     U16                     MaxPersistentEntries;           /* 0x3A */
284d3c7b9a0SKenneth D. Merry     U16                     MinDevHandle;                   /* 0x3C */
285d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x3E */
286d3c7b9a0SKenneth D. Merry } MPI2_IOC_FACTS_REPLY, MPI2_POINTER PTR_MPI2_IOC_FACTS_REPLY,
287d3c7b9a0SKenneth D. Merry   Mpi2IOCFactsReply_t, MPI2_POINTER pMpi2IOCFactsReply_t;
288d3c7b9a0SKenneth D. Merry 
289d3c7b9a0SKenneth D. Merry /* MsgVersion */
290d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK             (0xFF00)
291d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT            (8)
292d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_MSGVERSION_MINOR_MASK             (0x00FF)
293d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT            (0)
294d3c7b9a0SKenneth D. Merry 
295d3c7b9a0SKenneth D. Merry /* HeaderVersion */
296d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_HDRVERSION_UNIT_MASK              (0xFF00)
297d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_HDRVERSION_UNIT_SHIFT             (8)
298d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_HDRVERSION_DEV_MASK               (0x00FF)
299d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_HDRVERSION_DEV_SHIFT              (0)
300d3c7b9a0SKenneth D. Merry 
301d3c7b9a0SKenneth D. Merry /* IOCExceptions */
302d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX      (0x0100)
303d3c7b9a0SKenneth D. Merry 
304d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_MASK              (0x00E0)
305d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_GOOD              (0x0000)
306d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_BACKUP            (0x0020)
307d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_RESTORED          (0x0040)
308d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_CORRUPT_BACKUP    (0x0060)
309d3c7b9a0SKenneth D. Merry 
310d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED       (0x0010)
311d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL     (0x0008)
312d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL           (0x0004)
313d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID        (0x0002)
314d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL       (0x0001)
315d3c7b9a0SKenneth D. Merry 
316d3c7b9a0SKenneth D. Merry /* defines for WhoInit field are after the IOCInit Request */
317d3c7b9a0SKenneth D. Merry 
318d3c7b9a0SKenneth D. Merry /* ProductID field uses MPI2_FW_HEADER_PID_ */
319d3c7b9a0SKenneth D. Merry 
320d3c7b9a0SKenneth D. Merry /* IOCCapabilities */
321d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY   (0x00010000)
322d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX            (0x00008000)
323d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR       (0x00004000)
324d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY           (0x00002000)
325d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID        (0x00001000)
326d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_TLR                    (0x00000800)
327d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_MULTICAST              (0x00000100)
328d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET   (0x00000080)
329d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_EEDP                   (0x00000040)
330d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER        (0x00000020)
331d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER        (0x00000010)
332d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER      (0x00000008)
333d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING (0x00000004)
334d3c7b9a0SKenneth D. Merry 
335d3c7b9a0SKenneth D. Merry /* ProtocolFlags */
336d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET              (0x0001)
337d3c7b9a0SKenneth D. Merry #define MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR           (0x0002)
338d3c7b9a0SKenneth D. Merry 
339d3c7b9a0SKenneth D. Merry /****************************************************************************
340d3c7b9a0SKenneth D. Merry *  PortFacts message
341d3c7b9a0SKenneth D. Merry ****************************************************************************/
342d3c7b9a0SKenneth D. Merry 
343d3c7b9a0SKenneth D. Merry /* PortFacts Request message */
344d3c7b9a0SKenneth D. Merry typedef struct _MPI2_PORT_FACTS_REQUEST
345d3c7b9a0SKenneth D. Merry {
346d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
347d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
348d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
349d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
350d3c7b9a0SKenneth D. Merry     U8                      PortNumber;                     /* 0x06 */
351d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
352d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
353d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
354d3c7b9a0SKenneth D. Merry     U16                     Reserved3;                      /* 0x0A */
355d3c7b9a0SKenneth D. Merry } MPI2_PORT_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_PORT_FACTS_REQUEST,
356d3c7b9a0SKenneth D. Merry   Mpi2PortFactsRequest_t, MPI2_POINTER pMpi2PortFactsRequest_t;
357d3c7b9a0SKenneth D. Merry 
358d3c7b9a0SKenneth D. Merry /* PortFacts Reply message */
359d3c7b9a0SKenneth D. Merry typedef struct _MPI2_PORT_FACTS_REPLY
360d3c7b9a0SKenneth D. Merry {
361d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
362d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
363d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
364d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
365d3c7b9a0SKenneth D. Merry     U8                      PortNumber;                     /* 0x06 */
366d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
367d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
368d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
369d3c7b9a0SKenneth D. Merry     U16                     Reserved3;                      /* 0x0A */
370d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0C */
371d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
372d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
373d3c7b9a0SKenneth D. Merry     U8                      Reserved5;                      /* 0x14 */
374d3c7b9a0SKenneth D. Merry     U8                      PortType;                       /* 0x15 */
375d3c7b9a0SKenneth D. Merry     U16                     Reserved6;                      /* 0x16 */
376d3c7b9a0SKenneth D. Merry     U16                     MaxPostedCmdBuffers;            /* 0x18 */
377d3c7b9a0SKenneth D. Merry     U16                     Reserved7;                      /* 0x1A */
378d3c7b9a0SKenneth D. Merry } MPI2_PORT_FACTS_REPLY, MPI2_POINTER PTR_MPI2_PORT_FACTS_REPLY,
379d3c7b9a0SKenneth D. Merry   Mpi2PortFactsReply_t, MPI2_POINTER pMpi2PortFactsReply_t;
380d3c7b9a0SKenneth D. Merry 
381d3c7b9a0SKenneth D. Merry /* PortType values */
382d3c7b9a0SKenneth D. Merry #define MPI2_PORTFACTS_PORTTYPE_INACTIVE            (0x00)
383d3c7b9a0SKenneth D. Merry #define MPI2_PORTFACTS_PORTTYPE_FC                  (0x10)
384d3c7b9a0SKenneth D. Merry #define MPI2_PORTFACTS_PORTTYPE_ISCSI               (0x20)
385d3c7b9a0SKenneth D. Merry #define MPI2_PORTFACTS_PORTTYPE_SAS_PHYSICAL        (0x30)
386d3c7b9a0SKenneth D. Merry #define MPI2_PORTFACTS_PORTTYPE_SAS_VIRTUAL         (0x31)
387d3c7b9a0SKenneth D. Merry 
388d3c7b9a0SKenneth D. Merry /****************************************************************************
389d3c7b9a0SKenneth D. Merry *  PortEnable message
390d3c7b9a0SKenneth D. Merry ****************************************************************************/
391d3c7b9a0SKenneth D. Merry 
392d3c7b9a0SKenneth D. Merry /* PortEnable Request message */
393d3c7b9a0SKenneth D. Merry typedef struct _MPI2_PORT_ENABLE_REQUEST
394d3c7b9a0SKenneth D. Merry {
395d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
396d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
397d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
398d3c7b9a0SKenneth D. Merry     U8                      Reserved2;                      /* 0x04 */
399d3c7b9a0SKenneth D. Merry     U8                      PortFlags;                      /* 0x05 */
400d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
401d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
402d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
403d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
404d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
405d3c7b9a0SKenneth D. Merry } MPI2_PORT_ENABLE_REQUEST, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REQUEST,
406d3c7b9a0SKenneth D. Merry   Mpi2PortEnableRequest_t, MPI2_POINTER pMpi2PortEnableRequest_t;
407d3c7b9a0SKenneth D. Merry 
408d3c7b9a0SKenneth D. Merry /* PortEnable Reply message */
409d3c7b9a0SKenneth D. Merry typedef struct _MPI2_PORT_ENABLE_REPLY
410d3c7b9a0SKenneth D. Merry {
411d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
412d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
413d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
414d3c7b9a0SKenneth D. Merry     U8                      Reserved2;                      /* 0x04 */
415d3c7b9a0SKenneth D. Merry     U8                      PortFlags;                      /* 0x05 */
416d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
417d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
418d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
419d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
420d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
421d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                      /* 0x0C */
422d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
423d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
424d3c7b9a0SKenneth D. Merry } MPI2_PORT_ENABLE_REPLY, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REPLY,
425d3c7b9a0SKenneth D. Merry   Mpi2PortEnableReply_t, MPI2_POINTER pMpi2PortEnableReply_t;
426d3c7b9a0SKenneth D. Merry 
427d3c7b9a0SKenneth D. Merry /****************************************************************************
428d3c7b9a0SKenneth D. Merry *  EventNotification message
429d3c7b9a0SKenneth D. Merry ****************************************************************************/
430d3c7b9a0SKenneth D. Merry 
431d3c7b9a0SKenneth D. Merry /* EventNotification Request message */
432d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_NOTIFY_EVENTMASK_WORDS           (4)
433d3c7b9a0SKenneth D. Merry 
434d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_NOTIFICATION_REQUEST
435d3c7b9a0SKenneth D. Merry {
436d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
437d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
438d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
439d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
440d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
441d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
442d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
443d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
444d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
445d3c7b9a0SKenneth D. Merry     U32                     Reserved5;                      /* 0x0C */
446d3c7b9a0SKenneth D. Merry     U32                     Reserved6;                      /* 0x10 */
447d3c7b9a0SKenneth D. Merry     U32                     EventMasks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];/* 0x14 */
448d3c7b9a0SKenneth D. Merry     U16                     SASBroadcastPrimitiveMasks;     /* 0x24 */
449d3c7b9a0SKenneth D. Merry     U16                     Reserved7;                      /* 0x26 */
450d3c7b9a0SKenneth D. Merry     U32                     Reserved8;                      /* 0x28 */
451d3c7b9a0SKenneth D. Merry } MPI2_EVENT_NOTIFICATION_REQUEST,
452d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REQUEST,
453d3c7b9a0SKenneth D. Merry   Mpi2EventNotificationRequest_t, MPI2_POINTER pMpi2EventNotificationRequest_t;
454d3c7b9a0SKenneth D. Merry 
455d3c7b9a0SKenneth D. Merry /* EventNotification Reply message */
456d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_NOTIFICATION_REPLY
457d3c7b9a0SKenneth D. Merry {
458d3c7b9a0SKenneth D. Merry     U16                     EventDataLength;                /* 0x00 */
459d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
460d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
461d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x04 */
462d3c7b9a0SKenneth D. Merry     U8                      AckRequired;                    /* 0x06 */
463d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
464d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
465d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
466d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x0A */
467d3c7b9a0SKenneth D. Merry     U16                     Reserved3;                      /* 0x0C */
468d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
469d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
470d3c7b9a0SKenneth D. Merry     U16                     Event;                          /* 0x14 */
471d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x16 */
472d3c7b9a0SKenneth D. Merry     U32                     EventContext;                   /* 0x18 */
473d3c7b9a0SKenneth D. Merry     U32                     EventData[1];                   /* 0x1C */
474d3c7b9a0SKenneth D. Merry } MPI2_EVENT_NOTIFICATION_REPLY, MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REPLY,
475d3c7b9a0SKenneth D. Merry   Mpi2EventNotificationReply_t, MPI2_POINTER pMpi2EventNotificationReply_t;
476d3c7b9a0SKenneth D. Merry 
477d3c7b9a0SKenneth D. Merry /* AckRequired */
478d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_NOTIFICATION_ACK_NOT_REQUIRED    (0x00)
479d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_NOTIFICATION_ACK_REQUIRED        (0x01)
480d3c7b9a0SKenneth D. Merry 
481d3c7b9a0SKenneth D. Merry /* Event */
482d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_LOG_DATA                         (0x0001)
483d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_STATE_CHANGE                     (0x0002)
484d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_HARD_RESET_RECEIVED              (0x0005)
485d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_EVENT_CHANGE                     (0x000A)
486d043c564SKenneth D. Merry #define MPI2_EVENT_TASK_SET_FULL                    (0x000E) /* obsolete */
487d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE         (0x000F)
488d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_OPERATION_STATUS              (0x0014)
489d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISCOVERY                    (0x0016)
490d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_BROADCAST_PRIMITIVE          (0x0017)
491d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE    (0x0018)
492d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_INIT_TABLE_OVERFLOW          (0x0019)
493d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST         (0x001C)
494d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE    (0x001D)
495d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_VOLUME                        (0x001E)
496d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_PHYSICAL_DISK                 (0x001F)
497d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST     (0x0020)
498d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_LOG_ENTRY_ADDED                  (0x0021)
499d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_PHY_COUNTER                  (0x0022)
500d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_GPIO_INTERRUPT                   (0x0023)
501d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_HOST_BASED_DISCOVERY_PHY         (0x0024)
502d043c564SKenneth D. Merry #define MPI2_EVENT_SAS_QUIESCE                      (0x0025)
503d3c7b9a0SKenneth D. Merry 
504d3c7b9a0SKenneth D. Merry /* Log Entry Added Event data */
505d3c7b9a0SKenneth D. Merry 
506d3c7b9a0SKenneth D. Merry /* the following structure matches MPI2_LOG_0_ENTRY in mpi2_cnfg.h */
507d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_DATA_LOG_DATA_LENGTH             (0x1C)
508d3c7b9a0SKenneth D. Merry 
509d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_LOG_ENTRY_ADDED
510d3c7b9a0SKenneth D. Merry {
511d3c7b9a0SKenneth D. Merry     U64         TimeStamp;                          /* 0x00 */
512d3c7b9a0SKenneth D. Merry     U32         Reserved1;                          /* 0x08 */
513d3c7b9a0SKenneth D. Merry     U16         LogSequence;                        /* 0x0C */
514d3c7b9a0SKenneth D. Merry     U16         LogEntryQualifier;                  /* 0x0E */
515d3c7b9a0SKenneth D. Merry     U8          VP_ID;                              /* 0x10 */
516d3c7b9a0SKenneth D. Merry     U8          VF_ID;                              /* 0x11 */
517d3c7b9a0SKenneth D. Merry     U16         Reserved2;                          /* 0x12 */
518d3c7b9a0SKenneth D. Merry     U8          LogData[MPI2_EVENT_DATA_LOG_DATA_LENGTH];/* 0x14 */
519d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
520d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
521d3c7b9a0SKenneth D. Merry   Mpi2EventDataLogEntryAdded_t, MPI2_POINTER pMpi2EventDataLogEntryAdded_t;
522d3c7b9a0SKenneth D. Merry 
523d3c7b9a0SKenneth D. Merry /* GPIO Interrupt Event data */
524d3c7b9a0SKenneth D. Merry 
525d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_GPIO_INTERRUPT
526d3c7b9a0SKenneth D. Merry {
527d3c7b9a0SKenneth D. Merry     U8          GPIONum;                            /* 0x00 */
528d3c7b9a0SKenneth D. Merry     U8          Reserved1;                          /* 0x01 */
529d3c7b9a0SKenneth D. Merry     U16         Reserved2;                          /* 0x02 */
530d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_GPIO_INTERRUPT,
531d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_GPIO_INTERRUPT,
532d3c7b9a0SKenneth D. Merry   Mpi2EventDataGpioInterrupt_t, MPI2_POINTER pMpi2EventDataGpioInterrupt_t;
533d3c7b9a0SKenneth D. Merry 
534d3c7b9a0SKenneth D. Merry /* Hard Reset Received Event data */
535d3c7b9a0SKenneth D. Merry 
536d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_HARD_RESET_RECEIVED
537d3c7b9a0SKenneth D. Merry {
538d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                      /* 0x00 */
539d3c7b9a0SKenneth D. Merry     U8                      Port;                           /* 0x01 */
540d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x02 */
541d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
542d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
543d3c7b9a0SKenneth D. Merry   Mpi2EventDataHardResetReceived_t,
544d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataHardResetReceived_t;
545d3c7b9a0SKenneth D. Merry 
546d3c7b9a0SKenneth D. Merry /* Task Set Full Event data */
547d043c564SKenneth D. Merry /*   this event is obsolete */
548d3c7b9a0SKenneth D. Merry 
549d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_TASK_SET_FULL
550d3c7b9a0SKenneth D. Merry {
551d3c7b9a0SKenneth D. Merry     U16                     DevHandle;                      /* 0x00 */
552d3c7b9a0SKenneth D. Merry     U16                     CurrentDepth;                   /* 0x02 */
553d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_TASK_SET_FULL, MPI2_POINTER PTR_MPI2_EVENT_DATA_TASK_SET_FULL,
554d3c7b9a0SKenneth D. Merry   Mpi2EventDataTaskSetFull_t, MPI2_POINTER pMpi2EventDataTaskSetFull_t;
555d3c7b9a0SKenneth D. Merry 
556d3c7b9a0SKenneth D. Merry /* SAS Device Status Change Event data */
557d3c7b9a0SKenneth D. Merry 
558d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
559d3c7b9a0SKenneth D. Merry {
560d3c7b9a0SKenneth D. Merry     U16                     TaskTag;                        /* 0x00 */
561d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                     /* 0x02 */
562d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                      /* 0x03 */
563d3c7b9a0SKenneth D. Merry     U8                      ASC;                            /* 0x04 */
564d3c7b9a0SKenneth D. Merry     U8                      ASCQ;                           /* 0x05 */
565d3c7b9a0SKenneth D. Merry     U16                     DevHandle;                      /* 0x06 */
566d3c7b9a0SKenneth D. Merry     U32                     Reserved2;                      /* 0x08 */
567d3c7b9a0SKenneth D. Merry     U64                     SASAddress;                     /* 0x0C */
568d3c7b9a0SKenneth D. Merry     U8                      LUN[8];                         /* 0x14 */
569d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
570d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
571d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasDeviceStatusChange_t,
572d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasDeviceStatusChange_t;
573d3c7b9a0SKenneth D. Merry 
574d3c7b9a0SKenneth D. Merry /* SAS Device Status Change Event data ReasonCode values */
575d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA                           (0x05)
576d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED                          (0x07)
577d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET                (0x08)
578d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL                  (0x09)
579d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL              (0x0A)
580d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL              (0x0B)
581d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL                  (0x0C)
582d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION                   (0x0D)
583d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET               (0x0E)
584d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_TASK_ABORT_INTERNAL              (0x0F)
585d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE                    (0x10)
586d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_EXPANDER_REDUCED_FUNCTIONALITY       (0x11)
587d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_EXPANDER_REDUCED_FUNCTIONALITY   (0x12)
588d3c7b9a0SKenneth D. Merry 
589d3c7b9a0SKenneth D. Merry /* Integrated RAID Operation Status Event data */
590d3c7b9a0SKenneth D. Merry 
591d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_IR_OPERATION_STATUS
592d3c7b9a0SKenneth D. Merry {
593d3c7b9a0SKenneth D. Merry     U16                     VolDevHandle;               /* 0x00 */
594d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                  /* 0x02 */
595d3c7b9a0SKenneth D. Merry     U8                      RAIDOperation;              /* 0x04 */
596d3c7b9a0SKenneth D. Merry     U8                      PercentComplete;            /* 0x05 */
597d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x06 */
598d3c7b9a0SKenneth D. Merry     U32                     Resereved3;                 /* 0x08 */
599d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_IR_OPERATION_STATUS,
600d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_OPERATION_STATUS,
601d3c7b9a0SKenneth D. Merry   Mpi2EventDataIrOperationStatus_t,
602d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataIrOperationStatus_t;
603d3c7b9a0SKenneth D. Merry 
604d3c7b9a0SKenneth D. Merry /* Integrated RAID Operation Status Event data RAIDOperation values */
605d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_RAIDOP_RESYNC                     (0x00)
606d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_RAIDOP_ONLINE_CAP_EXPANSION       (0x01)
607d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_RAIDOP_CONSISTENCY_CHECK          (0x02)
608d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_RAIDOP_BACKGROUND_INIT            (0x03)
609d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_RAIDOP_MAKE_DATA_CONSISTENT       (0x04)
610d3c7b9a0SKenneth D. Merry 
611d3c7b9a0SKenneth D. Merry /* Integrated RAID Volume Event data */
612d3c7b9a0SKenneth D. Merry 
613d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_IR_VOLUME
614d3c7b9a0SKenneth D. Merry {
615d3c7b9a0SKenneth D. Merry     U16                     VolDevHandle;               /* 0x00 */
616d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x02 */
617d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x03 */
618d3c7b9a0SKenneth D. Merry     U32                     NewValue;                   /* 0x04 */
619d3c7b9a0SKenneth D. Merry     U32                     PreviousValue;              /* 0x08 */
620d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_IR_VOLUME, MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_VOLUME,
621d3c7b9a0SKenneth D. Merry   Mpi2EventDataIrVolume_t, MPI2_POINTER pMpi2EventDataIrVolume_t;
622d3c7b9a0SKenneth D. Merry 
623d3c7b9a0SKenneth D. Merry /* Integrated RAID Volume Event data ReasonCode values */
624d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_VOLUME_RC_SETTINGS_CHANGED        (0x01)
625d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_VOLUME_RC_STATUS_FLAGS_CHANGED    (0x02)
626d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_VOLUME_RC_STATE_CHANGED           (0x03)
627d3c7b9a0SKenneth D. Merry 
628d3c7b9a0SKenneth D. Merry /* Integrated RAID Physical Disk Event data */
629d3c7b9a0SKenneth D. Merry 
630d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_IR_PHYSICAL_DISK
631d3c7b9a0SKenneth D. Merry {
632d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                  /* 0x00 */
633d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x02 */
634d3c7b9a0SKenneth D. Merry     U8                      PhysDiskNum;                /* 0x03 */
635d3c7b9a0SKenneth D. Merry     U16                     PhysDiskDevHandle;          /* 0x04 */
636d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x06 */
637d3c7b9a0SKenneth D. Merry     U16                     Slot;                       /* 0x08 */
638d3c7b9a0SKenneth D. Merry     U16                     EnclosureHandle;            /* 0x0A */
639d3c7b9a0SKenneth D. Merry     U32                     NewValue;                   /* 0x0C */
640d3c7b9a0SKenneth D. Merry     U32                     PreviousValue;              /* 0x10 */
641d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
642d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
643d3c7b9a0SKenneth D. Merry   Mpi2EventDataIrPhysicalDisk_t, MPI2_POINTER pMpi2EventDataIrPhysicalDisk_t;
644d3c7b9a0SKenneth D. Merry 
645d3c7b9a0SKenneth D. Merry /* Integrated RAID Physical Disk Event data ReasonCode values */
646d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_PHYSDISK_RC_SETTINGS_CHANGED      (0x01)
647d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_PHYSDISK_RC_STATUS_FLAGS_CHANGED  (0x02)
648d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED         (0x03)
649d3c7b9a0SKenneth D. Merry 
650d3c7b9a0SKenneth D. Merry /* Integrated RAID Configuration Change List Event data */
651d3c7b9a0SKenneth D. Merry 
652d3c7b9a0SKenneth D. Merry /*
653d3c7b9a0SKenneth D. Merry  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
654d3c7b9a0SKenneth D. Merry  * one and check NumElements at runtime.
655d3c7b9a0SKenneth D. Merry  */
656d3c7b9a0SKenneth D. Merry #ifndef MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT
657d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT          (1)
658d3c7b9a0SKenneth D. Merry #endif
659d3c7b9a0SKenneth D. Merry 
660d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_IR_CONFIG_ELEMENT
661d3c7b9a0SKenneth D. Merry {
662d3c7b9a0SKenneth D. Merry     U16                     ElementFlags;               /* 0x00 */
663d3c7b9a0SKenneth D. Merry     U16                     VolDevHandle;               /* 0x02 */
664d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x04 */
665d3c7b9a0SKenneth D. Merry     U8                      PhysDiskNum;                /* 0x05 */
666d3c7b9a0SKenneth D. Merry     U16                     PhysDiskDevHandle;          /* 0x06 */
667d3c7b9a0SKenneth D. Merry } MPI2_EVENT_IR_CONFIG_ELEMENT, MPI2_POINTER PTR_MPI2_EVENT_IR_CONFIG_ELEMENT,
668d3c7b9a0SKenneth D. Merry   Mpi2EventIrConfigElement_t, MPI2_POINTER pMpi2EventIrConfigElement_t;
669d3c7b9a0SKenneth D. Merry 
670d3c7b9a0SKenneth D. Merry /* IR Configuration Change List Event data ElementFlags values */
671d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_EFLAGS_ELEMENT_TYPE_MASK   (0x000F)
672d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLUME_ELEMENT      (0x0000)
673d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLPHYSDISK_ELEMENT (0x0001)
674d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_EFLAGS_HOTSPARE_ELEMENT    (0x0002)
675d3c7b9a0SKenneth D. Merry 
676d3c7b9a0SKenneth D. Merry /* IR Configuration Change List Event data ReasonCode values */
677d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_ADDED                   (0x01)
678d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_REMOVED                 (0x02)
679d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_NO_CHANGE               (0x03)
680d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_HIDE                    (0x04)
681d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_UNHIDE                  (0x05)
682d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED          (0x06)
683d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED          (0x07)
684d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_PD_CREATED              (0x08)
685d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_RC_PD_DELETED              (0x09)
686d3c7b9a0SKenneth D. Merry 
687d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST
688d3c7b9a0SKenneth D. Merry {
689d3c7b9a0SKenneth D. Merry     U8                              NumElements;        /* 0x00 */
690d3c7b9a0SKenneth D. Merry     U8                              Reserved1;          /* 0x01 */
691d3c7b9a0SKenneth D. Merry     U8                              Reserved2;          /* 0x02 */
692d3c7b9a0SKenneth D. Merry     U8                              ConfigNum;          /* 0x03 */
693d3c7b9a0SKenneth D. Merry     U32                             Flags;              /* 0x04 */
694d3c7b9a0SKenneth D. Merry     MPI2_EVENT_IR_CONFIG_ELEMENT    ConfigElement[MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT];    /* 0x08 */
695d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
696d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
697d3c7b9a0SKenneth D. Merry   Mpi2EventDataIrConfigChangeList_t,
698d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataIrConfigChangeList_t;
699d3c7b9a0SKenneth D. Merry 
700d3c7b9a0SKenneth D. Merry /* IR Configuration Change List Event data Flags values */
701d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG   (0x00000001)
702d3c7b9a0SKenneth D. Merry 
703d3c7b9a0SKenneth D. Merry /* SAS Discovery Event data */
704d3c7b9a0SKenneth D. Merry 
705d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_DISCOVERY
706d3c7b9a0SKenneth D. Merry {
707d3c7b9a0SKenneth D. Merry     U8                      Flags;                      /* 0x00 */
708d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x01 */
709d3c7b9a0SKenneth D. Merry     U8                      PhysicalPort;               /* 0x02 */
710d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x03 */
711d3c7b9a0SKenneth D. Merry     U32                     DiscoveryStatus;            /* 0x04 */
712d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_DISCOVERY,
713d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DISCOVERY,
714d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasDiscovery_t, MPI2_POINTER pMpi2EventDataSasDiscovery_t;
715d3c7b9a0SKenneth D. Merry 
716d3c7b9a0SKenneth D. Merry /* SAS Discovery Event data Flags values */
717d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DEVICE_CHANGE                   (0x02)
718d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_IN_PROGRESS                     (0x01)
719d3c7b9a0SKenneth D. Merry 
720d3c7b9a0SKenneth D. Merry /* SAS Discovery Event data ReasonCode values */
721d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_RC_STARTED                      (0x01)
722d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_RC_COMPLETED                    (0x02)
723d3c7b9a0SKenneth D. Merry 
724d3c7b9a0SKenneth D. Merry /* SAS Discovery Event data DiscoveryStatus values */
725d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MAX_ENCLOSURES_EXCEED            (0x80000000)
726d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MAX_EXPANDERS_EXCEED             (0x40000000)
727d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MAX_DEVICES_EXCEED               (0x20000000)
728d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MAX_TOPO_PHYS_EXCEED             (0x10000000)
729d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR             (0x08000000)
730d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE    (0x00008000)
731d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_EXP_MULTI_SUBTRACTIVE            (0x00004000)
732d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MULTI_PORT_DOMAIN                (0x00002000)
733d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_TABLE_TO_SUBTRACTIVE_LINK        (0x00001000)
734d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_UNSUPPORTED_DEVICE               (0x00000800)
735d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_TABLE_LINK                       (0x00000400)
736d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_SUBTRACTIVE_LINK                 (0x00000200)
737d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_SMP_CRC_ERROR                    (0x00000100)
738d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_SMP_FUNCTION_FAILED              (0x00000080)
739d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_INDEX_NOT_EXIST                  (0x00000040)
740d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_OUT_ROUTE_ENTRIES                (0x00000020)
741d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_SMP_TIMEOUT                      (0x00000010)
742d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_MULTIPLE_PORTS                   (0x00000004)
743d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_UNADDRESSABLE_DEVICE             (0x00000002)
744d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_DISC_DS_LOOP_DETECTED                    (0x00000001)
745d3c7b9a0SKenneth D. Merry 
746d3c7b9a0SKenneth D. Merry /* SAS Broadcast Primitive Event data */
747d3c7b9a0SKenneth D. Merry 
748d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE
749d3c7b9a0SKenneth D. Merry {
750d3c7b9a0SKenneth D. Merry     U8                      PhyNum;                     /* 0x00 */
751d3c7b9a0SKenneth D. Merry     U8                      Port;                       /* 0x01 */
752d3c7b9a0SKenneth D. Merry     U8                      PortWidth;                  /* 0x02 */
753d3c7b9a0SKenneth D. Merry     U8                      Primitive;                  /* 0x03 */
754d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
755d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
756d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasBroadcastPrimitive_t,
757d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasBroadcastPrimitive_t;
758d3c7b9a0SKenneth D. Merry 
759d3c7b9a0SKenneth D. Merry /* defines for the Primitive field */
760d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_CHANGE                         (0x01)
761d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_SES                            (0x02)
762d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_EXPANDER                       (0x03)
763d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT             (0x04)
764d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_RESERVED3                      (0x05)
765d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_RESERVED4                      (0x06)
766d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_CHANGE0_RESERVED               (0x07)
767d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_PRIMITIVE_CHANGE1_RESERVED               (0x08)
768d3c7b9a0SKenneth D. Merry 
769d3c7b9a0SKenneth D. Merry /* SAS Initiator Device Status Change Event data */
770d3c7b9a0SKenneth D. Merry 
771d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
772d3c7b9a0SKenneth D. Merry {
773d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x00 */
774d3c7b9a0SKenneth D. Merry     U8                      PhysicalPort;               /* 0x01 */
775d3c7b9a0SKenneth D. Merry     U16                     DevHandle;                  /* 0x02 */
776d3c7b9a0SKenneth D. Merry     U64                     SASAddress;                 /* 0x04 */
777d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
778d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
779d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasInitDevStatusChange_t,
780d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasInitDevStatusChange_t;
781d3c7b9a0SKenneth D. Merry 
782d3c7b9a0SKenneth D. Merry /* SAS Initiator Device Status Change event ReasonCode values */
783d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_INIT_RC_ADDED                (0x01)
784d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING       (0x02)
785d3c7b9a0SKenneth D. Merry 
786d3c7b9a0SKenneth D. Merry /* SAS Initiator Device Table Overflow Event data */
787d3c7b9a0SKenneth D. Merry 
788d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
789d3c7b9a0SKenneth D. Merry {
790d3c7b9a0SKenneth D. Merry     U16                     MaxInit;                    /* 0x00 */
791d3c7b9a0SKenneth D. Merry     U16                     CurrentInit;                /* 0x02 */
792d3c7b9a0SKenneth D. Merry     U64                     SASAddress;                 /* 0x04 */
793d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
794d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
795d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasInitTableOverflow_t,
796d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasInitTableOverflow_t;
797d3c7b9a0SKenneth D. Merry 
798d3c7b9a0SKenneth D. Merry /* SAS Topology Change List Event data */
799d3c7b9a0SKenneth D. Merry 
800d3c7b9a0SKenneth D. Merry /*
801d3c7b9a0SKenneth D. Merry  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
802d3c7b9a0SKenneth D. Merry  * one and check NumEntries at runtime.
803d3c7b9a0SKenneth D. Merry  */
804d3c7b9a0SKenneth D. Merry #ifndef MPI2_EVENT_SAS_TOPO_PHY_COUNT
805d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_PHY_COUNT           (1)
806d3c7b9a0SKenneth D. Merry #endif
807d3c7b9a0SKenneth D. Merry 
808d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_SAS_TOPO_PHY_ENTRY
809d3c7b9a0SKenneth D. Merry {
810d3c7b9a0SKenneth D. Merry     U16                     AttachedDevHandle;          /* 0x00 */
811d3c7b9a0SKenneth D. Merry     U8                      LinkRate;                   /* 0x02 */
812d3c7b9a0SKenneth D. Merry     U8                      PhyStatus;                  /* 0x03 */
813d3c7b9a0SKenneth D. Merry } MPI2_EVENT_SAS_TOPO_PHY_ENTRY, MPI2_POINTER PTR_MPI2_EVENT_SAS_TOPO_PHY_ENTRY,
814d3c7b9a0SKenneth D. Merry   Mpi2EventSasTopoPhyEntry_t, MPI2_POINTER pMpi2EventSasTopoPhyEntry_t;
815d3c7b9a0SKenneth D. Merry 
816d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST
817d3c7b9a0SKenneth D. Merry {
818d3c7b9a0SKenneth D. Merry     U16                             EnclosureHandle;            /* 0x00 */
819d3c7b9a0SKenneth D. Merry     U16                             ExpanderDevHandle;          /* 0x02 */
820d3c7b9a0SKenneth D. Merry     U8                              NumPhys;                    /* 0x04 */
821d3c7b9a0SKenneth D. Merry     U8                              Reserved1;                  /* 0x05 */
822d3c7b9a0SKenneth D. Merry     U16                             Reserved2;                  /* 0x06 */
823d3c7b9a0SKenneth D. Merry     U8                              NumEntries;                 /* 0x08 */
824d3c7b9a0SKenneth D. Merry     U8                              StartPhyNum;                /* 0x09 */
825d3c7b9a0SKenneth D. Merry     U8                              ExpStatus;                  /* 0x0A */
826d3c7b9a0SKenneth D. Merry     U8                              PhysicalPort;               /* 0x0B */
827d3c7b9a0SKenneth D. Merry     MPI2_EVENT_SAS_TOPO_PHY_ENTRY   PHY[MPI2_EVENT_SAS_TOPO_PHY_COUNT]; /* 0x0C*/
828d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
829d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
830d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasTopologyChangeList_t,
831d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasTopologyChangeList_t;
832d3c7b9a0SKenneth D. Merry 
833d3c7b9a0SKenneth D. Merry /* values for the ExpStatus field */
834d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER                  (0x00)
835d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_ES_ADDED                        (0x01)
836d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_ES_NOT_RESPONDING               (0x02)
837d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_ES_RESPONDING                   (0x03)
838d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING         (0x04)
839d3c7b9a0SKenneth D. Merry 
840d3c7b9a0SKenneth D. Merry /* defines for the LinkRate field */
841d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_MASK                 (0xF0)
842d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_SHIFT                (4)
843d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_PREV_MASK                    (0x0F)
844d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_PREV_SHIFT                   (0)
845d3c7b9a0SKenneth D. Merry 
846d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE            (0x00)
847d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_PHY_DISABLED                 (0x01)
848d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED           (0x02)
849d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE            (0x03)
850d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_PORT_SELECTOR                (0x04)
851d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS        (0x05)
852d043c564SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY              (0x06)
853d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_RATE_1_5                     (0x08)
854d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_RATE_3_0                     (0x09)
855d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_LR_RATE_6_0                     (0x0A)
856d3c7b9a0SKenneth D. Merry 
857d3c7b9a0SKenneth D. Merry /* values for the PhyStatus field */
858d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT                (0x80)
859d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_PS_MULTIPLEX_CHANGE             (0x10)
860d3c7b9a0SKenneth D. Merry /* values for the PhyStatus ReasonCode sub-field */
861d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_MASK                         (0x0F)
862d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED                   (0x01)
863d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING          (0x02)
864d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED                  (0x03)
865d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE                    (0x04)
866d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING         (0x05)
867d3c7b9a0SKenneth D. Merry 
868d3c7b9a0SKenneth D. Merry /* SAS Enclosure Device Status Change Event data */
869d3c7b9a0SKenneth D. Merry 
870d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE
871d3c7b9a0SKenneth D. Merry {
872d3c7b9a0SKenneth D. Merry     U16                     EnclosureHandle;            /* 0x00 */
873d3c7b9a0SKenneth D. Merry     U8                      ReasonCode;                 /* 0x02 */
874d3c7b9a0SKenneth D. Merry     U8                      PhysicalPort;               /* 0x03 */
875d3c7b9a0SKenneth D. Merry     U64                     EnclosureLogicalID;         /* 0x04 */
876d3c7b9a0SKenneth D. Merry     U16                     NumSlots;                   /* 0x0C */
877d3c7b9a0SKenneth D. Merry     U16                     StartSlot;                  /* 0x0E */
878d3c7b9a0SKenneth D. Merry     U32                     PhyBits;                    /* 0x10 */
879d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
880d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
881d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasEnclDevStatusChange_t,
882d3c7b9a0SKenneth D. Merry   MPI2_POINTER pMpi2EventDataSasEnclDevStatusChange_t;
883d3c7b9a0SKenneth D. Merry 
884d3c7b9a0SKenneth D. Merry /* SAS Enclosure Device Status Change event ReasonCode values */
885d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_ENCL_RC_ADDED                (0x01)
886d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_SAS_ENCL_RC_NOT_RESPONDING       (0x02)
887d3c7b9a0SKenneth D. Merry 
888d3c7b9a0SKenneth D. Merry /* SAS PHY Counter Event data */
889d3c7b9a0SKenneth D. Merry 
890d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_PHY_COUNTER
891d3c7b9a0SKenneth D. Merry {
892d3c7b9a0SKenneth D. Merry     U64         TimeStamp;          /* 0x00 */
893d3c7b9a0SKenneth D. Merry     U32         Reserved1;          /* 0x08 */
894d3c7b9a0SKenneth D. Merry     U8          PhyEventCode;       /* 0x0C */
895d3c7b9a0SKenneth D. Merry     U8          PhyNum;             /* 0x0D */
896d3c7b9a0SKenneth D. Merry     U16         Reserved2;          /* 0x0E */
897d3c7b9a0SKenneth D. Merry     U32         PhyEventInfo;       /* 0x10 */
898d3c7b9a0SKenneth D. Merry     U8          CounterType;        /* 0x14 */
899d3c7b9a0SKenneth D. Merry     U8          ThresholdWindow;    /* 0x15 */
900d3c7b9a0SKenneth D. Merry     U8          TimeUnits;          /* 0x16 */
901d3c7b9a0SKenneth D. Merry     U8          Reserved3;          /* 0x17 */
902d3c7b9a0SKenneth D. Merry     U32         EventThreshold;     /* 0x18 */
903d3c7b9a0SKenneth D. Merry     U16         ThresholdFlags;     /* 0x1C */
904d3c7b9a0SKenneth D. Merry     U16         Reserved4;          /* 0x1E */
905d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_SAS_PHY_COUNTER,
906d3c7b9a0SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_PHY_COUNTER,
907d3c7b9a0SKenneth D. Merry   Mpi2EventDataSasPhyCounter_t, MPI2_POINTER pMpi2EventDataSasPhyCounter_t;
908d3c7b9a0SKenneth D. Merry 
909d3c7b9a0SKenneth D. Merry /* use MPI2_SASPHY3_EVENT_CODE_ values from mpi2_cnfg.h for the PhyEventCode field */
910d3c7b9a0SKenneth D. Merry 
911d3c7b9a0SKenneth D. Merry /* use MPI2_SASPHY3_COUNTER_TYPE_ values from mpi2_cnfg.h for the CounterType field */
912d3c7b9a0SKenneth D. Merry 
913d3c7b9a0SKenneth D. Merry /* use MPI2_SASPHY3_TIME_UNITS_ values from mpi2_cnfg.h for the TimeUnits field */
914d3c7b9a0SKenneth D. Merry 
915d3c7b9a0SKenneth D. Merry /* use MPI2_SASPHY3_TFLAGS_ values from mpi2_cnfg.h for the ThresholdFlags field */
916d3c7b9a0SKenneth D. Merry 
917d043c564SKenneth D. Merry /* SAS Quiesce Event data */
918d043c564SKenneth D. Merry 
919d043c564SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_SAS_QUIESCE
920d043c564SKenneth D. Merry {
921d043c564SKenneth D. Merry     U8                      ReasonCode;                 /* 0x00 */
922d043c564SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
923d043c564SKenneth D. Merry     U16                     Reserved2;                  /* 0x02 */
924d043c564SKenneth D. Merry     U32                     Reserved3;                  /* 0x04 */
925d043c564SKenneth D. Merry } MPI2_EVENT_DATA_SAS_QUIESCE,
926d043c564SKenneth D. Merry   MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_QUIESCE,
927d043c564SKenneth D. Merry   Mpi2EventDataSasQuiesce_t, MPI2_POINTER pMpi2EventDataSasQuiesce_t;
928d043c564SKenneth D. Merry 
929d043c564SKenneth D. Merry /* SAS Quiesce Event data ReasonCode values */
930d043c564SKenneth D. Merry #define MPI2_EVENT_SAS_QUIESCE_RC_STARTED                   (0x01)
931d043c564SKenneth D. Merry #define MPI2_EVENT_SAS_QUIESCE_RC_COMPLETED                 (0x02)
932d043c564SKenneth D. Merry 
933d3c7b9a0SKenneth D. Merry /* Host Based Discovery Phy Event data */
934d3c7b9a0SKenneth D. Merry 
935d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_HBD_PHY_SAS
936d3c7b9a0SKenneth D. Merry {
937d3c7b9a0SKenneth D. Merry     U8          Flags;                      /* 0x00 */
938d3c7b9a0SKenneth D. Merry     U8          NegotiatedLinkRate;         /* 0x01 */
939d3c7b9a0SKenneth D. Merry     U8          PhyNum;                     /* 0x02 */
940d3c7b9a0SKenneth D. Merry     U8          PhysicalPort;               /* 0x03 */
941d3c7b9a0SKenneth D. Merry     U32         Reserved1;                  /* 0x04 */
942d3c7b9a0SKenneth D. Merry     U8          InitialFrame[28];           /* 0x08 */
943d3c7b9a0SKenneth D. Merry } MPI2_EVENT_HBD_PHY_SAS, MPI2_POINTER PTR_MPI2_EVENT_HBD_PHY_SAS,
944d3c7b9a0SKenneth D. Merry   Mpi2EventHbdPhySas_t, MPI2_POINTER pMpi2EventHbdPhySas_t;
945d3c7b9a0SKenneth D. Merry 
946d3c7b9a0SKenneth D. Merry /* values for the Flags field */
947d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_HBD_SAS_FLAGS_FRAME_VALID        (0x02)
948d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_HBD_SAS_FLAGS_SATA_FRAME         (0x01)
949d3c7b9a0SKenneth D. Merry 
950d3c7b9a0SKenneth D. Merry /* use MPI2_SAS_NEG_LINK_RATE_ defines from mpi2_cnfg.h for the NegotiatedLinkRate field */
951d3c7b9a0SKenneth D. Merry 
952d3c7b9a0SKenneth D. Merry typedef union _MPI2_EVENT_HBD_DESCRIPTOR
953d3c7b9a0SKenneth D. Merry {
954d3c7b9a0SKenneth D. Merry     MPI2_EVENT_HBD_PHY_SAS      Sas;
955d3c7b9a0SKenneth D. Merry } MPI2_EVENT_HBD_DESCRIPTOR, MPI2_POINTER PTR_MPI2_EVENT_HBD_DESCRIPTOR,
956d3c7b9a0SKenneth D. Merry   Mpi2EventHbdDescriptor_t, MPI2_POINTER pMpi2EventHbdDescriptor_t;
957d3c7b9a0SKenneth D. Merry 
958d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_DATA_HBD_PHY
959d3c7b9a0SKenneth D. Merry {
960d3c7b9a0SKenneth D. Merry     U8                          DescriptorType;     /* 0x00 */
961d3c7b9a0SKenneth D. Merry     U8                          Reserved1;          /* 0x01 */
962d3c7b9a0SKenneth D. Merry     U16                         Reserved2;          /* 0x02 */
963d3c7b9a0SKenneth D. Merry     U32                         Reserved3;          /* 0x04 */
964d3c7b9a0SKenneth D. Merry     MPI2_EVENT_HBD_DESCRIPTOR   Descriptor;         /* 0x08 */
965d3c7b9a0SKenneth D. Merry } MPI2_EVENT_DATA_HBD_PHY, MPI2_POINTER PTR_MPI2_EVENT_DATA_HBD_PHY,
966d3c7b9a0SKenneth D. Merry   Mpi2EventDataHbdPhy_t, MPI2_POINTER pMpi2EventDataMpi2EventDataHbdPhy_t;
967d3c7b9a0SKenneth D. Merry 
968d3c7b9a0SKenneth D. Merry /* values for the DescriptorType field */
969d3c7b9a0SKenneth D. Merry #define MPI2_EVENT_HBD_DT_SAS               (0x01)
970d3c7b9a0SKenneth D. Merry 
971d3c7b9a0SKenneth D. Merry /****************************************************************************
972d3c7b9a0SKenneth D. Merry *  EventAck message
973d3c7b9a0SKenneth D. Merry ****************************************************************************/
974d3c7b9a0SKenneth D. Merry 
975d3c7b9a0SKenneth D. Merry /* EventAck Request message */
976d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_ACK_REQUEST
977d3c7b9a0SKenneth D. Merry {
978d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
979d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                    /* 0x02 */
980d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
981d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
982d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
983d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
984d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
985d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
986d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
987d3c7b9a0SKenneth D. Merry     U16                     Event;                          /* 0x0C */
988d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                      /* 0x0E */
989d3c7b9a0SKenneth D. Merry     U32                     EventContext;                   /* 0x10 */
990d3c7b9a0SKenneth D. Merry } MPI2_EVENT_ACK_REQUEST, MPI2_POINTER PTR_MPI2_EVENT_ACK_REQUEST,
991d3c7b9a0SKenneth D. Merry   Mpi2EventAckRequest_t, MPI2_POINTER pMpi2EventAckRequest_t;
992d3c7b9a0SKenneth D. Merry 
993d3c7b9a0SKenneth D. Merry /* EventAck Reply message */
994d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EVENT_ACK_REPLY
995d3c7b9a0SKenneth D. Merry {
996d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                      /* 0x00 */
997d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                      /* 0x02 */
998d3c7b9a0SKenneth D. Merry     U8                      Function;                       /* 0x03 */
999d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                      /* 0x04 */
1000d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                      /* 0x06 */
1001d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                       /* 0x07 */
1002d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                          /* 0x08 */
1003d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                          /* 0x09 */
1004d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                      /* 0x0A */
1005d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                      /* 0x0C */
1006d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                      /* 0x0E */
1007d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                     /* 0x10 */
1008d3c7b9a0SKenneth D. Merry } MPI2_EVENT_ACK_REPLY, MPI2_POINTER PTR_MPI2_EVENT_ACK_REPLY,
1009d3c7b9a0SKenneth D. Merry   Mpi2EventAckReply_t, MPI2_POINTER pMpi2EventAckReply_t;
1010d3c7b9a0SKenneth D. Merry 
1011d3c7b9a0SKenneth D. Merry /****************************************************************************
1012d3c7b9a0SKenneth D. Merry *  FWDownload message
1013d3c7b9a0SKenneth D. Merry ****************************************************************************/
1014d3c7b9a0SKenneth D. Merry 
1015d3c7b9a0SKenneth D. Merry /* FWDownload Request message */
1016d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_DOWNLOAD_REQUEST
1017d3c7b9a0SKenneth D. Merry {
1018d3c7b9a0SKenneth D. Merry     U8                      ImageType;                  /* 0x00 */
1019d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1020d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                /* 0x02 */
1021d3c7b9a0SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1022d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1023d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1024d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1025d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1026d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1027d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1028d3c7b9a0SKenneth D. Merry     U32                     TotalImageSize;             /* 0x0C */
1029d3c7b9a0SKenneth D. Merry     U32                     Reserved5;                  /* 0x10 */
1030d3c7b9a0SKenneth D. Merry     MPI2_MPI_SGE_UNION      SGL;                        /* 0x14 */
1031d3c7b9a0SKenneth D. Merry } MPI2_FW_DOWNLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REQUEST,
1032d3c7b9a0SKenneth D. Merry   Mpi2FWDownloadRequest, MPI2_POINTER pMpi2FWDownloadRequest;
1033d3c7b9a0SKenneth D. Merry 
1034d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT   (0x01)
1035d3c7b9a0SKenneth D. Merry 
1036d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_FW                   (0x01)
1037d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_BIOS                 (0x02)
1038d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_MANUFACTURING        (0x06)
1039d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_1             (0x07)
1040d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_2             (0x08)
1041d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_MEGARAID             (0x09)
1042d043c564SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_COMPLETE             (0x0A)
1043d3c7b9a0SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK    (0x0B)
1044d043c564SKenneth D. Merry #define MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC (0xF0)
1045d3c7b9a0SKenneth D. Merry 
1046d3c7b9a0SKenneth D. Merry /* FWDownload TransactionContext Element */
1047d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_DOWNLOAD_TCSGE
1048d3c7b9a0SKenneth D. Merry {
1049d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x00 */
1050d3c7b9a0SKenneth D. Merry     U8                      ContextSize;                /* 0x01 */
1051d3c7b9a0SKenneth D. Merry     U8                      DetailsLength;              /* 0x02 */
1052d3c7b9a0SKenneth D. Merry     U8                      Flags;                      /* 0x03 */
1053d3c7b9a0SKenneth D. Merry     U32                     Reserved2;                  /* 0x04 */
1054d3c7b9a0SKenneth D. Merry     U32                     ImageOffset;                /* 0x08 */
1055d3c7b9a0SKenneth D. Merry     U32                     ImageSize;                  /* 0x0C */
1056d3c7b9a0SKenneth D. Merry } MPI2_FW_DOWNLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_TCSGE,
1057d3c7b9a0SKenneth D. Merry   Mpi2FWDownloadTCSGE_t, MPI2_POINTER pMpi2FWDownloadTCSGE_t;
1058d3c7b9a0SKenneth D. Merry 
1059d3c7b9a0SKenneth D. Merry /* FWDownload Reply message */
1060d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_DOWNLOAD_REPLY
1061d3c7b9a0SKenneth D. Merry {
1062d3c7b9a0SKenneth D. Merry     U8                      ImageType;                  /* 0x00 */
1063d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1064d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                  /* 0x02 */
1065d3c7b9a0SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1066d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1067d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1068d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1069d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1070d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1071d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1072d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                  /* 0x0C */
1073d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                  /* 0x0E */
1074d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                 /* 0x10 */
1075d3c7b9a0SKenneth D. Merry } MPI2_FW_DOWNLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REPLY,
1076d3c7b9a0SKenneth D. Merry   Mpi2FWDownloadReply_t, MPI2_POINTER pMpi2FWDownloadReply_t;
1077d3c7b9a0SKenneth D. Merry 
1078d3c7b9a0SKenneth D. Merry /****************************************************************************
1079d3c7b9a0SKenneth D. Merry *  FWUpload message
1080d3c7b9a0SKenneth D. Merry ****************************************************************************/
1081d3c7b9a0SKenneth D. Merry 
1082d3c7b9a0SKenneth D. Merry /* FWUpload Request message */
1083d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_UPLOAD_REQUEST
1084d3c7b9a0SKenneth D. Merry {
1085d3c7b9a0SKenneth D. Merry     U8                      ImageType;                  /* 0x00 */
1086d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1087d3c7b9a0SKenneth D. Merry     U8                      ChainOffset;                /* 0x02 */
1088d3c7b9a0SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1089d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1090d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1091d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1092d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1093d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1094d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1095d3c7b9a0SKenneth D. Merry     U32                     Reserved5;                  /* 0x0C */
1096d3c7b9a0SKenneth D. Merry     U32                     Reserved6;                  /* 0x10 */
1097d3c7b9a0SKenneth D. Merry     MPI2_MPI_SGE_UNION      SGL;                        /* 0x14 */
1098d3c7b9a0SKenneth D. Merry } MPI2_FW_UPLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REQUEST,
1099d3c7b9a0SKenneth D. Merry   Mpi2FWUploadRequest_t, MPI2_POINTER pMpi2FWUploadRequest_t;
1100d3c7b9a0SKenneth D. Merry 
1101d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_FW_CURRENT         (0x00)
1102d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_FW_FLASH           (0x01)
1103d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_BIOS_FLASH         (0x02)
1104d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_FW_BACKUP          (0x05)
1105d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_MANUFACTURING      (0x06)
1106d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_CONFIG_1           (0x07)
1107d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_CONFIG_2           (0x08)
1108d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_MEGARAID           (0x09)
1109d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_COMPLETE           (0x0A)
1110d3c7b9a0SKenneth D. Merry #define MPI2_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK  (0x0B)
1111d3c7b9a0SKenneth D. Merry 
1112d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_UPLOAD_TCSGE
1113d3c7b9a0SKenneth D. Merry {
1114d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x00 */
1115d3c7b9a0SKenneth D. Merry     U8                      ContextSize;                /* 0x01 */
1116d3c7b9a0SKenneth D. Merry     U8                      DetailsLength;              /* 0x02 */
1117d3c7b9a0SKenneth D. Merry     U8                      Flags;                      /* 0x03 */
1118d3c7b9a0SKenneth D. Merry     U32                     Reserved2;                  /* 0x04 */
1119d3c7b9a0SKenneth D. Merry     U32                     ImageOffset;                /* 0x08 */
1120d3c7b9a0SKenneth D. Merry     U32                     ImageSize;                  /* 0x0C */
1121d3c7b9a0SKenneth D. Merry } MPI2_FW_UPLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_UPLOAD_TCSGE,
1122d3c7b9a0SKenneth D. Merry   Mpi2FWUploadTCSGE_t, MPI2_POINTER pMpi2FWUploadTCSGE_t;
1123d3c7b9a0SKenneth D. Merry 
1124d3c7b9a0SKenneth D. Merry /* FWUpload Reply message */
1125d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_UPLOAD_REPLY
1126d3c7b9a0SKenneth D. Merry {
1127d3c7b9a0SKenneth D. Merry     U8                      ImageType;                  /* 0x00 */
1128d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1129d3c7b9a0SKenneth D. Merry     U8                      MsgLength;                  /* 0x02 */
1130d3c7b9a0SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1131d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1132d3c7b9a0SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1133d3c7b9a0SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1134d3c7b9a0SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1135d3c7b9a0SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1136d3c7b9a0SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1137d3c7b9a0SKenneth D. Merry     U16                     Reserved5;                  /* 0x0C */
1138d3c7b9a0SKenneth D. Merry     U16                     IOCStatus;                  /* 0x0E */
1139d3c7b9a0SKenneth D. Merry     U32                     IOCLogInfo;                 /* 0x10 */
1140d3c7b9a0SKenneth D. Merry     U32                     ActualImageSize;            /* 0x14 */
1141d3c7b9a0SKenneth D. Merry } MPI2_FW_UPLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REPLY,
1142d3c7b9a0SKenneth D. Merry   Mpi2FWUploadReply_t, MPI2_POINTER pMPi2FWUploadReply_t;
1143d3c7b9a0SKenneth D. Merry 
1144d3c7b9a0SKenneth D. Merry /* FW Image Header */
1145d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FW_IMAGE_HEADER
1146d3c7b9a0SKenneth D. Merry {
1147d3c7b9a0SKenneth D. Merry     U32                     Signature;                  /* 0x00 */
1148d3c7b9a0SKenneth D. Merry     U32                     Signature0;                 /* 0x04 */
1149d3c7b9a0SKenneth D. Merry     U32                     Signature1;                 /* 0x08 */
1150d3c7b9a0SKenneth D. Merry     U32                     Signature2;                 /* 0x0C */
1151d3c7b9a0SKenneth D. Merry     MPI2_VERSION_UNION      MPIVersion;                 /* 0x10 */
1152d3c7b9a0SKenneth D. Merry     MPI2_VERSION_UNION      FWVersion;                  /* 0x14 */
1153d3c7b9a0SKenneth D. Merry     MPI2_VERSION_UNION      NVDATAVersion;              /* 0x18 */
1154d3c7b9a0SKenneth D. Merry     MPI2_VERSION_UNION      PackageVersion;             /* 0x1C */
1155d3c7b9a0SKenneth D. Merry     U16                     VendorID;                   /* 0x20 */
1156d3c7b9a0SKenneth D. Merry     U16                     ProductID;                  /* 0x22 */
1157d3c7b9a0SKenneth D. Merry     U16                     ProtocolFlags;              /* 0x24 */
1158d3c7b9a0SKenneth D. Merry     U16                     Reserved26;                 /* 0x26 */
1159d3c7b9a0SKenneth D. Merry     U32                     IOCCapabilities;            /* 0x28 */
1160d3c7b9a0SKenneth D. Merry     U32                     ImageSize;                  /* 0x2C */
1161d3c7b9a0SKenneth D. Merry     U32                     NextImageHeaderOffset;      /* 0x30 */
1162d3c7b9a0SKenneth D. Merry     U32                     Checksum;                   /* 0x34 */
1163d3c7b9a0SKenneth D. Merry     U32                     Reserved38;                 /* 0x38 */
1164d3c7b9a0SKenneth D. Merry     U32                     Reserved3C;                 /* 0x3C */
1165d3c7b9a0SKenneth D. Merry     U32                     Reserved40;                 /* 0x40 */
1166d3c7b9a0SKenneth D. Merry     U32                     Reserved44;                 /* 0x44 */
1167d3c7b9a0SKenneth D. Merry     U32                     Reserved48;                 /* 0x48 */
1168d3c7b9a0SKenneth D. Merry     U32                     Reserved4C;                 /* 0x4C */
1169d3c7b9a0SKenneth D. Merry     U32                     Reserved50;                 /* 0x50 */
1170d3c7b9a0SKenneth D. Merry     U32                     Reserved54;                 /* 0x54 */
1171d3c7b9a0SKenneth D. Merry     U32                     Reserved58;                 /* 0x58 */
1172d3c7b9a0SKenneth D. Merry     U32                     Reserved5C;                 /* 0x5C */
1173d3c7b9a0SKenneth D. Merry     U32                     Reserved60;                 /* 0x60 */
1174d3c7b9a0SKenneth D. Merry     U32                     FirmwareVersionNameWhat;    /* 0x64 */
1175d3c7b9a0SKenneth D. Merry     U8                      FirmwareVersionName[32];    /* 0x68 */
1176d3c7b9a0SKenneth D. Merry     U32                     VendorNameWhat;             /* 0x88 */
1177d3c7b9a0SKenneth D. Merry     U8                      VendorName[32];             /* 0x8C */
1178d3c7b9a0SKenneth D. Merry     U32                     PackageNameWhat;            /* 0x88 */
1179d3c7b9a0SKenneth D. Merry     U8                      PackageName[32];            /* 0x8C */
1180d3c7b9a0SKenneth D. Merry     U32                     ReservedD0;                 /* 0xD0 */
1181d3c7b9a0SKenneth D. Merry     U32                     ReservedD4;                 /* 0xD4 */
1182d3c7b9a0SKenneth D. Merry     U32                     ReservedD8;                 /* 0xD8 */
1183d3c7b9a0SKenneth D. Merry     U32                     ReservedDC;                 /* 0xDC */
1184d3c7b9a0SKenneth D. Merry     U32                     ReservedE0;                 /* 0xE0 */
1185d3c7b9a0SKenneth D. Merry     U32                     ReservedE4;                 /* 0xE4 */
1186d3c7b9a0SKenneth D. Merry     U32                     ReservedE8;                 /* 0xE8 */
1187d3c7b9a0SKenneth D. Merry     U32                     ReservedEC;                 /* 0xEC */
1188d3c7b9a0SKenneth D. Merry     U32                     ReservedF0;                 /* 0xF0 */
1189d3c7b9a0SKenneth D. Merry     U32                     ReservedF4;                 /* 0xF4 */
1190d3c7b9a0SKenneth D. Merry     U32                     ReservedF8;                 /* 0xF8 */
1191d3c7b9a0SKenneth D. Merry     U32                     ReservedFC;                 /* 0xFC */
1192d3c7b9a0SKenneth D. Merry } MPI2_FW_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_FW_IMAGE_HEADER,
1193d3c7b9a0SKenneth D. Merry   Mpi2FWImageHeader_t, MPI2_POINTER pMpi2FWImageHeader_t;
1194d3c7b9a0SKenneth D. Merry 
1195d3c7b9a0SKenneth D. Merry /* Signature field */
1196d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE_OFFSET         (0x00)
1197d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE_MASK           (0xFF000000)
1198d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE                (0xEA000000)
1199d3c7b9a0SKenneth D. Merry 
1200d3c7b9a0SKenneth D. Merry /* Signature0 field */
1201d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE0_OFFSET        (0x04)
1202d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE0               (0x5AFAA55A)
1203d3c7b9a0SKenneth D. Merry 
1204d3c7b9a0SKenneth D. Merry /* Signature1 field */
1205d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE1_OFFSET        (0x08)
1206d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE1               (0xA55AFAA5)
1207d3c7b9a0SKenneth D. Merry 
1208d3c7b9a0SKenneth D. Merry /* Signature2 field */
1209d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE2_OFFSET        (0x0C)
1210d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIGNATURE2               (0x5AA55AFA)
1211d3c7b9a0SKenneth D. Merry 
1212d3c7b9a0SKenneth D. Merry /* defines for using the ProductID field */
1213d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_TYPE_MASK            (0xF000)
1214d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_TYPE_SAS             (0x2000)
1215d3c7b9a0SKenneth D. Merry 
1216d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_PROD_MASK                    (0x0F00)
1217d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_PROD_A                       (0x0000)
1218d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI   (0x0200)
1219d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_PROD_IR_SCSI                 (0x0700)
1220d3c7b9a0SKenneth D. Merry 
1221d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_FAMILY_MASK          (0x00FF)
1222d3c7b9a0SKenneth D. Merry /* SAS */
1223d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_FAMILY_2108_SAS      (0x0013)
1224d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_PID_FAMILY_2208_SAS      (0x0014)
1225d3c7b9a0SKenneth D. Merry 
1226d3c7b9a0SKenneth D. Merry /* use MPI2_IOCFACTS_PROTOCOL_ defines for ProtocolFlags field */
1227d3c7b9a0SKenneth D. Merry 
1228d3c7b9a0SKenneth D. Merry /* use MPI2_IOCFACTS_CAPABILITY_ defines for IOCCapabilities field */
1229d3c7b9a0SKenneth D. Merry 
1230d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_IMAGESIZE_OFFSET         (0x2C)
1231d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_NEXTIMAGE_OFFSET         (0x30)
1232d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_VERNMHWAT_OFFSET         (0x64)
1233d3c7b9a0SKenneth D. Merry 
1234d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_WHAT_SIGNATURE           (0x29232840)
1235d3c7b9a0SKenneth D. Merry 
1236d3c7b9a0SKenneth D. Merry #define MPI2_FW_HEADER_SIZE                     (0x100)
1237d3c7b9a0SKenneth D. Merry 
1238d3c7b9a0SKenneth D. Merry /* Extended Image Header */
1239d3c7b9a0SKenneth D. Merry typedef struct _MPI2_EXT_IMAGE_HEADER
1240d3c7b9a0SKenneth D. Merry 
1241d3c7b9a0SKenneth D. Merry {
1242d3c7b9a0SKenneth D. Merry     U8                      ImageType;                  /* 0x00 */
1243d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1244d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x02 */
1245d3c7b9a0SKenneth D. Merry     U32                     Checksum;                   /* 0x04 */
1246d3c7b9a0SKenneth D. Merry     U32                     ImageSize;                  /* 0x08 */
1247d3c7b9a0SKenneth D. Merry     U32                     NextImageHeaderOffset;      /* 0x0C */
1248d3c7b9a0SKenneth D. Merry     U32                     PackageVersion;             /* 0x10 */
1249d3c7b9a0SKenneth D. Merry     U32                     Reserved3;                  /* 0x14 */
1250d3c7b9a0SKenneth D. Merry     U32                     Reserved4;                  /* 0x18 */
1251d3c7b9a0SKenneth D. Merry     U32                     Reserved5;                  /* 0x1C */
1252d3c7b9a0SKenneth D. Merry     U8                      IdentifyString[32];         /* 0x20 */
1253d3c7b9a0SKenneth D. Merry } MPI2_EXT_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_EXT_IMAGE_HEADER,
1254d3c7b9a0SKenneth D. Merry   Mpi2ExtImageHeader_t, MPI2_POINTER pMpi2ExtImageHeader_t;
1255d3c7b9a0SKenneth D. Merry 
1256d3c7b9a0SKenneth D. Merry /* useful offsets */
1257d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_IMAGETYPE_OFFSET         (0x00)
1258d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_IMAGESIZE_OFFSET         (0x08)
1259d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_NEXTIMAGE_OFFSET         (0x0C)
1260d3c7b9a0SKenneth D. Merry 
1261d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_HEADER_SIZE              (0x40)
1262d3c7b9a0SKenneth D. Merry 
1263d3c7b9a0SKenneth D. Merry /* defines for the ImageType field */
1264d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_UNSPECIFIED         (0x00)
1265d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_FW                  (0x01)
1266d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_NVDATA              (0x03)
1267d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_BOOTLOADER          (0x04)
1268d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_INITIALIZATION      (0x05)
1269d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_FLASH_LAYOUT        (0x06)
1270d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_SUPPORTED_DEVICES   (0x07)
1271d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_MEGARAID            (0x08)
1272d3c7b9a0SKenneth D. Merry 
1273d3c7b9a0SKenneth D. Merry #define MPI2_EXT_IMAGE_TYPE_MAX                 (MPI2_EXT_IMAGE_TYPE_MEGARAID)
1274d3c7b9a0SKenneth D. Merry 
1275d3c7b9a0SKenneth D. Merry /* FLASH Layout Extended Image Data */
1276d3c7b9a0SKenneth D. Merry 
1277d3c7b9a0SKenneth D. Merry /*
1278d3c7b9a0SKenneth D. Merry  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1279d3c7b9a0SKenneth D. Merry  * one and check RegionsPerLayout at runtime.
1280d3c7b9a0SKenneth D. Merry  */
1281d3c7b9a0SKenneth D. Merry #ifndef MPI2_FLASH_NUMBER_OF_REGIONS
1282d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_NUMBER_OF_REGIONS        (1)
1283d3c7b9a0SKenneth D. Merry #endif
1284d3c7b9a0SKenneth D. Merry 
1285d3c7b9a0SKenneth D. Merry /*
1286d3c7b9a0SKenneth D. Merry  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1287d3c7b9a0SKenneth D. Merry  * one and check NumberOfLayouts at runtime.
1288d3c7b9a0SKenneth D. Merry  */
1289d3c7b9a0SKenneth D. Merry #ifndef MPI2_FLASH_NUMBER_OF_LAYOUTS
1290d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_NUMBER_OF_LAYOUTS        (1)
1291d3c7b9a0SKenneth D. Merry #endif
1292d3c7b9a0SKenneth D. Merry 
1293d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FLASH_REGION
1294d3c7b9a0SKenneth D. Merry {
1295d3c7b9a0SKenneth D. Merry     U8                      RegionType;                 /* 0x00 */
1296d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1297d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x02 */
1298d3c7b9a0SKenneth D. Merry     U32                     RegionOffset;               /* 0x04 */
1299d3c7b9a0SKenneth D. Merry     U32                     RegionSize;                 /* 0x08 */
1300d3c7b9a0SKenneth D. Merry     U32                     Reserved3;                  /* 0x0C */
1301d3c7b9a0SKenneth D. Merry } MPI2_FLASH_REGION, MPI2_POINTER PTR_MPI2_FLASH_REGION,
1302d3c7b9a0SKenneth D. Merry   Mpi2FlashRegion_t, MPI2_POINTER pMpi2FlashRegion_t;
1303d3c7b9a0SKenneth D. Merry 
1304d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FLASH_LAYOUT
1305d3c7b9a0SKenneth D. Merry {
1306d3c7b9a0SKenneth D. Merry     U32                     FlashSize;                  /* 0x00 */
1307d3c7b9a0SKenneth D. Merry     U32                     Reserved1;                  /* 0x04 */
1308d3c7b9a0SKenneth D. Merry     U32                     Reserved2;                  /* 0x08 */
1309d3c7b9a0SKenneth D. Merry     U32                     Reserved3;                  /* 0x0C */
1310d3c7b9a0SKenneth D. Merry     MPI2_FLASH_REGION       Region[MPI2_FLASH_NUMBER_OF_REGIONS];/* 0x10 */
1311d3c7b9a0SKenneth D. Merry } MPI2_FLASH_LAYOUT, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT,
1312d3c7b9a0SKenneth D. Merry   Mpi2FlashLayout_t, MPI2_POINTER pMpi2FlashLayout_t;
1313d3c7b9a0SKenneth D. Merry 
1314d3c7b9a0SKenneth D. Merry typedef struct _MPI2_FLASH_LAYOUT_DATA
1315d3c7b9a0SKenneth D. Merry {
1316d3c7b9a0SKenneth D. Merry     U8                      ImageRevision;              /* 0x00 */
1317d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1318d3c7b9a0SKenneth D. Merry     U8                      SizeOfRegion;               /* 0x02 */
1319d3c7b9a0SKenneth D. Merry     U8                      Reserved2;                  /* 0x03 */
1320d3c7b9a0SKenneth D. Merry     U16                     NumberOfLayouts;            /* 0x04 */
1321d3c7b9a0SKenneth D. Merry     U16                     RegionsPerLayout;           /* 0x06 */
1322d3c7b9a0SKenneth D. Merry     U16                     MinimumSectorAlignment;     /* 0x08 */
1323d3c7b9a0SKenneth D. Merry     U16                     Reserved3;                  /* 0x0A */
1324d3c7b9a0SKenneth D. Merry     U32                     Reserved4;                  /* 0x0C */
1325d3c7b9a0SKenneth D. Merry     MPI2_FLASH_LAYOUT       Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS];/* 0x10 */
1326d3c7b9a0SKenneth D. Merry } MPI2_FLASH_LAYOUT_DATA, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT_DATA,
1327d3c7b9a0SKenneth D. Merry   Mpi2FlashLayoutData_t, MPI2_POINTER pMpi2FlashLayoutData_t;
1328d3c7b9a0SKenneth D. Merry 
1329d3c7b9a0SKenneth D. Merry /* defines for the RegionType field */
1330d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_UNUSED                (0x00)
1331d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_FIRMWARE              (0x01)
1332d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_BIOS                  (0x02)
1333d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_NVDATA                (0x03)
1334d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_FIRMWARE_BACKUP       (0x05)
1335d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_MFG_INFORMATION       (0x06)
1336d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_CONFIG_1              (0x07)
1337d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_CONFIG_2              (0x08)
1338d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_MEGARAID              (0x09)
1339d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_REGION_INIT                  (0x0A)
1340d3c7b9a0SKenneth D. Merry 
1341d3c7b9a0SKenneth D. Merry /* ImageRevision */
1342d3c7b9a0SKenneth D. Merry #define MPI2_FLASH_LAYOUT_IMAGE_REVISION        (0x00)
1343d3c7b9a0SKenneth D. Merry 
1344d3c7b9a0SKenneth D. Merry /* Supported Devices Extended Image Data */
1345d3c7b9a0SKenneth D. Merry 
1346d3c7b9a0SKenneth D. Merry /*
1347d3c7b9a0SKenneth D. Merry  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1348d3c7b9a0SKenneth D. Merry  * one and check NumberOfDevices at runtime.
1349d3c7b9a0SKenneth D. Merry  */
1350d3c7b9a0SKenneth D. Merry #ifndef MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES
1351d3c7b9a0SKenneth D. Merry #define MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES    (1)
1352d3c7b9a0SKenneth D. Merry #endif
1353d3c7b9a0SKenneth D. Merry 
1354d3c7b9a0SKenneth D. Merry typedef struct _MPI2_SUPPORTED_DEVICE
1355d3c7b9a0SKenneth D. Merry {
1356d3c7b9a0SKenneth D. Merry     U16                     DeviceID;                   /* 0x00 */
1357d3c7b9a0SKenneth D. Merry     U16                     VendorID;                   /* 0x02 */
1358d3c7b9a0SKenneth D. Merry     U16                     DeviceIDMask;               /* 0x04 */
1359d3c7b9a0SKenneth D. Merry     U16                     Reserved1;                  /* 0x06 */
1360d3c7b9a0SKenneth D. Merry     U8                      LowPCIRev;                  /* 0x08 */
1361d3c7b9a0SKenneth D. Merry     U8                      HighPCIRev;                 /* 0x09 */
1362d3c7b9a0SKenneth D. Merry     U16                     Reserved2;                  /* 0x0A */
1363d3c7b9a0SKenneth D. Merry     U32                     Reserved3;                  /* 0x0C */
1364d3c7b9a0SKenneth D. Merry } MPI2_SUPPORTED_DEVICE, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICE,
1365d3c7b9a0SKenneth D. Merry   Mpi2SupportedDevice_t, MPI2_POINTER pMpi2SupportedDevice_t;
1366d3c7b9a0SKenneth D. Merry 
1367d3c7b9a0SKenneth D. Merry typedef struct _MPI2_SUPPORTED_DEVICES_DATA
1368d3c7b9a0SKenneth D. Merry {
1369d3c7b9a0SKenneth D. Merry     U8                      ImageRevision;              /* 0x00 */
1370d3c7b9a0SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1371d3c7b9a0SKenneth D. Merry     U8                      NumberOfDevices;            /* 0x02 */
1372d3c7b9a0SKenneth D. Merry     U8                      Reserved2;                  /* 0x03 */
1373d3c7b9a0SKenneth D. Merry     U32                     Reserved3;                  /* 0x04 */
1374d3c7b9a0SKenneth D. Merry     MPI2_SUPPORTED_DEVICE   SupportedDevice[MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES]; /* 0x08 */
1375d3c7b9a0SKenneth D. Merry } MPI2_SUPPORTED_DEVICES_DATA, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICES_DATA,
1376d3c7b9a0SKenneth D. Merry   Mpi2SupportedDevicesData_t, MPI2_POINTER pMpi2SupportedDevicesData_t;
1377d3c7b9a0SKenneth D. Merry 
1378d3c7b9a0SKenneth D. Merry /* ImageRevision */
1379d3c7b9a0SKenneth D. Merry #define MPI2_SUPPORTED_DEVICES_IMAGE_REVISION   (0x00)
1380d3c7b9a0SKenneth D. Merry 
1381d3c7b9a0SKenneth D. Merry /* Init Extended Image Data */
1382d3c7b9a0SKenneth D. Merry 
1383d3c7b9a0SKenneth D. Merry typedef struct _MPI2_INIT_IMAGE_FOOTER
1384d3c7b9a0SKenneth D. Merry 
1385d3c7b9a0SKenneth D. Merry {
1386d3c7b9a0SKenneth D. Merry     U32                     BootFlags;                  /* 0x00 */
1387d3c7b9a0SKenneth D. Merry     U32                     ImageSize;                  /* 0x04 */
1388d3c7b9a0SKenneth D. Merry     U32                     Signature0;                 /* 0x08 */
1389d3c7b9a0SKenneth D. Merry     U32                     Signature1;                 /* 0x0C */
1390d3c7b9a0SKenneth D. Merry     U32                     Signature2;                 /* 0x10 */
1391d3c7b9a0SKenneth D. Merry     U32                     ResetVector;                /* 0x14 */
1392d3c7b9a0SKenneth D. Merry } MPI2_INIT_IMAGE_FOOTER, MPI2_POINTER PTR_MPI2_INIT_IMAGE_FOOTER,
1393d3c7b9a0SKenneth D. Merry   Mpi2InitImageFooter_t, MPI2_POINTER pMpi2InitImageFooter_t;
1394d3c7b9a0SKenneth D. Merry 
1395d3c7b9a0SKenneth D. Merry /* defines for the BootFlags field */
1396d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_BOOTFLAGS_OFFSET        (0x00)
1397d3c7b9a0SKenneth D. Merry 
1398d3c7b9a0SKenneth D. Merry /* defines for the ImageSize field */
1399d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_IMAGESIZE_OFFSET        (0x04)
1400d3c7b9a0SKenneth D. Merry 
1401d3c7b9a0SKenneth D. Merry /* defines for the Signature0 field */
1402d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE0_OFFSET       (0x08)
1403d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE0              (0x5AA55AEA)
1404d3c7b9a0SKenneth D. Merry 
1405d3c7b9a0SKenneth D. Merry /* defines for the Signature1 field */
1406d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE1_OFFSET       (0x0C)
1407d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE1              (0xA55AEAA5)
1408d3c7b9a0SKenneth D. Merry 
1409d3c7b9a0SKenneth D. Merry /* defines for the Signature2 field */
1410d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE2_OFFSET       (0x10)
1411d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE2              (0x5AEAA55A)
1412d3c7b9a0SKenneth D. Merry 
1413d3c7b9a0SKenneth D. Merry /* Signature fields as individual bytes */
1414d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_0        (0xEA)
1415d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_1        (0x5A)
1416d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_2        (0xA5)
1417d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_3        (0x5A)
1418d3c7b9a0SKenneth D. Merry 
1419d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_4        (0xA5)
1420d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_5        (0xEA)
1421d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_6        (0x5A)
1422d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_7        (0xA5)
1423d3c7b9a0SKenneth D. Merry 
1424d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_8        (0x5A)
1425d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_9        (0xA5)
1426d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_A        (0xEA)
1427d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_B        (0x5A)
1428d3c7b9a0SKenneth D. Merry 
1429d3c7b9a0SKenneth D. Merry /* defines for the ResetVector field */
1430d3c7b9a0SKenneth D. Merry #define MPI2_INIT_IMAGE_RESETVECTOR_OFFSET      (0x14)
1431d3c7b9a0SKenneth D. Merry 
1432d043c564SKenneth D. Merry /****************************************************************************
1433d043c564SKenneth D. Merry *  PowerManagementControl message
1434d043c564SKenneth D. Merry ****************************************************************************/
1435d043c564SKenneth D. Merry 
1436d043c564SKenneth D. Merry /* PowerManagementControl Request message */
1437d043c564SKenneth D. Merry typedef struct _MPI2_PWR_MGMT_CONTROL_REQUEST
1438d043c564SKenneth D. Merry {
1439d043c564SKenneth D. Merry     U8                      Feature;                    /* 0x00 */
1440d043c564SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1441d043c564SKenneth D. Merry     U8                      ChainOffset;                /* 0x02 */
1442d043c564SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1443d043c564SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1444d043c564SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1445d043c564SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1446d043c564SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1447d043c564SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1448d043c564SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1449d043c564SKenneth D. Merry     U8                      Parameter1;                 /* 0x0C */
1450d043c564SKenneth D. Merry     U8                      Parameter2;                 /* 0x0D */
1451d043c564SKenneth D. Merry     U8                      Parameter3;                 /* 0x0E */
1452d043c564SKenneth D. Merry     U8                      Parameter4;                 /* 0x0F */
1453d043c564SKenneth D. Merry     U32                     Reserved5;                  /* 0x10 */
1454d043c564SKenneth D. Merry     U32                     Reserved6;                  /* 0x14 */
1455d043c564SKenneth D. Merry } MPI2_PWR_MGMT_CONTROL_REQUEST, MPI2_POINTER PTR_MPI2_PWR_MGMT_CONTROL_REQUEST,
1456d043c564SKenneth D. Merry   Mpi2PwrMgmtControlRequest_t, MPI2_POINTER pMpi2PwrMgmtControlRequest_t;
1457d043c564SKenneth D. Merry 
1458d043c564SKenneth D. Merry /* defines for the Feature field */
1459d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND       (0x01)
1460d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION   (0x02)
1461d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_PCIE_LINK               (0x03)
1462d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_IOC_SPEED               (0x04)
1463d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_MIN_PRODUCT_SPECIFIC    (0x80)
1464d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_FEATURE_MAX_PRODUCT_SPECIFIC    (0xFF)
1465d043c564SKenneth D. Merry 
1466d043c564SKenneth D. Merry /* parameter usage for the MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND Feature */
1467d043c564SKenneth D. Merry /* Parameter1 contains a PHY number */
1468d043c564SKenneth D. Merry /* Parameter2 indicates power condition action using these defines */
1469d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_PARTIAL                  (0x01)
1470d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_SLUMBER                  (0x02)
1471d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_EXIT_PWR_MGMT            (0x03)
1472d043c564SKenneth D. Merry /* Parameter3 and Parameter4 are reserved */
1473d043c564SKenneth D. Merry 
1474d043c564SKenneth D. Merry /* parameter usage for the MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION Feature */
1475d043c564SKenneth D. Merry /* Parameter1 contains SAS port width modulation group number */
1476d043c564SKenneth D. Merry /* Parameter2 indicates IOC action using these defines */
1477d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_REQUEST_OWNERSHIP        (0x01)
1478d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_CHANGE_MODULATION        (0x02)
1479d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_RELINQUISH_OWNERSHIP     (0x03)
1480d043c564SKenneth D. Merry /* Parameter3 indicates desired modulation level using these defines */
1481d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM3_25_PERCENT               (0x00)
1482d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM3_50_PERCENT               (0x01)
1483d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM3_75_PERCENT               (0x02)
1484d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM3_100_PERCENT              (0x03)
1485d043c564SKenneth D. Merry /* Parameter4 is reserved */
1486d043c564SKenneth D. Merry 
1487d043c564SKenneth D. Merry /* parameter usage for the MPI2_PM_CONTROL_FEATURE_PCIE_LINK Feature */
1488d043c564SKenneth D. Merry /* Parameter1 indicates desired PCIe link speed using these defines */
1489d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_PCIE_2_5_GBPS            (0x00)
1490d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_PCIE_5_0_GBPS            (0x01)
1491d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_PCIE_8_0_GBPS            (0x02)
1492d043c564SKenneth D. Merry /* Parameter2 indicates desired PCIe link width using these defines */
1493d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_WIDTH_X1                 (0x01)
1494d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_WIDTH_X2                 (0x02)
1495d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_WIDTH_X4                 (0x04)
1496d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM2_WIDTH_X8                 (0x08)
1497d043c564SKenneth D. Merry /* Parameter3 and Parameter4 are reserved */
1498d043c564SKenneth D. Merry 
1499d043c564SKenneth D. Merry /* parameter usage for the MPI2_PM_CONTROL_FEATURE_IOC_SPEED Feature */
1500d043c564SKenneth D. Merry /* Parameter1 indicates desired IOC hardware clock speed using these defines */
1501d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_FULL_IOC_SPEED           (0x01)
1502d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_HALF_IOC_SPEED           (0x02)
1503d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_QUARTER_IOC_SPEED        (0x04)
1504d043c564SKenneth D. Merry #define MPI2_PM_CONTROL_PARAM1_EIGHTH_IOC_SPEED         (0x08)
1505d043c564SKenneth D. Merry /* Parameter2, Parameter3, and Parameter4 are reserved */
1506d043c564SKenneth D. Merry 
1507d043c564SKenneth D. Merry /* PowerManagementControl Reply message */
1508d043c564SKenneth D. Merry typedef struct _MPI2_PWR_MGMT_CONTROL_REPLY
1509d043c564SKenneth D. Merry {
1510d043c564SKenneth D. Merry     U8                      Feature;                    /* 0x00 */
1511d043c564SKenneth D. Merry     U8                      Reserved1;                  /* 0x01 */
1512d043c564SKenneth D. Merry     U8                      MsgLength;                  /* 0x02 */
1513d043c564SKenneth D. Merry     U8                      Function;                   /* 0x03 */
1514d043c564SKenneth D. Merry     U16                     Reserved2;                  /* 0x04 */
1515d043c564SKenneth D. Merry     U8                      Reserved3;                  /* 0x06 */
1516d043c564SKenneth D. Merry     U8                      MsgFlags;                   /* 0x07 */
1517d043c564SKenneth D. Merry     U8                      VP_ID;                      /* 0x08 */
1518d043c564SKenneth D. Merry     U8                      VF_ID;                      /* 0x09 */
1519d043c564SKenneth D. Merry     U16                     Reserved4;                  /* 0x0A */
1520d043c564SKenneth D. Merry     U16                     Reserved5;                  /* 0x0C */
1521d043c564SKenneth D. Merry     U16                     IOCStatus;                  /* 0x0E */
1522d043c564SKenneth D. Merry     U32                     IOCLogInfo;                 /* 0x10 */
1523d043c564SKenneth D. Merry } MPI2_PWR_MGMT_CONTROL_REPLY, MPI2_POINTER PTR_MPI2_PWR_MGMT_CONTROL_REPLY,
1524d043c564SKenneth D. Merry   Mpi2PwrMgmtControlReply_t, MPI2_POINTER pMpi2PwrMgmtControlReply_t;
1525d043c564SKenneth D. Merry 
1526d3c7b9a0SKenneth D. Merry #endif
1527