18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2000-2008 LSI Corporation. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Name: mpi_ioc.h 78c2ecf20Sopenharmony_ci * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 88c2ecf20Sopenharmony_ci * Creation Date: August 11, 2000 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * mpi_ioc.h Version: 01.05.16 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Version History 138c2ecf20Sopenharmony_ci * --------------- 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * Date Version Description 168c2ecf20Sopenharmony_ci * -------- -------- ------------------------------------------------------ 178c2ecf20Sopenharmony_ci * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 188c2ecf20Sopenharmony_ci * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure. 198c2ecf20Sopenharmony_ci * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY. 208c2ecf20Sopenharmony_ci * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure. 218c2ecf20Sopenharmony_ci * Added _MSG_EVENT_ACK_REPLY structure. 228c2ecf20Sopenharmony_ci * Added _MSG_FW_DOWNLOAD_REPLY structure. 238c2ecf20Sopenharmony_ci * Added _MSG_TOOLBOX_REPLY structure. 248c2ecf20Sopenharmony_ci * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure. 258c2ecf20Sopenharmony_ci * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI, 268c2ecf20Sopenharmony_ci * _LINK_STATUS, _LOOP_STATE and _LOGOUT. 278c2ecf20Sopenharmony_ci * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in 288c2ecf20Sopenharmony_ci * _MSG_EVENT_ACK_REPLY structure to match specification. 298c2ecf20Sopenharmony_ci * 11-02-00 01.01.01 Original release for post 1.0 work. 308c2ecf20Sopenharmony_ci * Added a value for Manufacturer to WhoInit. 318c2ecf20Sopenharmony_ci * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and 328c2ecf20Sopenharmony_ci * removed toolbox message. 338c2ecf20Sopenharmony_ci * 01-09-01 01.01.03 Added event enabled and disabled defines. 348c2ecf20Sopenharmony_ci * Added structures for FwHeader and DataHeader. 358c2ecf20Sopenharmony_ci * Added ImageType to FwUpload reply. 368c2ecf20Sopenharmony_ci * 02-20-01 01.01.04 Started using MPI_POINTER. 378c2ecf20Sopenharmony_ci * 02-27-01 01.01.05 Added event for RAID status change and its event data. 388c2ecf20Sopenharmony_ci * Added IocNumber field to MSG_IOC_FACTS_REPLY. 398c2ecf20Sopenharmony_ci * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER. 408c2ecf20Sopenharmony_ci * Added structure offset comments. 418c2ecf20Sopenharmony_ci * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE. 428c2ecf20Sopenharmony_ci * 08-08-01 01.02.01 Original release for v1.2 work. 438c2ecf20Sopenharmony_ci * New format for FWVersion and ProductId in 448c2ecf20Sopenharmony_ci * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. 458c2ecf20Sopenharmony_ci * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and 468c2ecf20Sopenharmony_ci * related structure and defines. 478c2ecf20Sopenharmony_ci * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. 488c2ecf20Sopenharmony_ci * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. 498c2ecf20Sopenharmony_ci * Replaced a reserved field in MSG_IOC_FACTS_REPLY with 508c2ecf20Sopenharmony_ci * IOCExceptions and changed DataImageSize to reserved. 518c2ecf20Sopenharmony_ci * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and 528c2ecf20Sopenharmony_ci * MPI_FW_UPLOAD_ITYPE_NVDATA. 538c2ecf20Sopenharmony_ci * 09-28-01 01.02.03 Modified Event Data for Integrated RAID. 548c2ecf20Sopenharmony_ci * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. 558c2ecf20Sopenharmony_ci * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY. 568c2ecf20Sopenharmony_ci * 05-31-02 01.02.06 Added define for 578c2ecf20Sopenharmony_ci * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID. 588c2ecf20Sopenharmony_ci * Added AliasIndex to EVENT_DATA_LOGOUT structure. 598c2ecf20Sopenharmony_ci * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_. 608c2ecf20Sopenharmony_ci * 06-26-03 01.02.08 Added new values to the product family defines. 618c2ecf20Sopenharmony_ci * 04-29-04 01.02.09 Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and 628c2ecf20Sopenharmony_ci * added related defines. 638c2ecf20Sopenharmony_ci * 05-11-04 01.03.01 Original release for MPI v1.3. 648c2ecf20Sopenharmony_ci * 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT. 658c2ecf20Sopenharmony_ci * Added three new fields to MSG_IOC_FACTS_REPLY. 668c2ecf20Sopenharmony_ci * Defined four new bits for the IOCCapabilities field of 678c2ecf20Sopenharmony_ci * the IOCFacts reply. 688c2ecf20Sopenharmony_ci * Added two new PortTypes for the PortFacts reply. 698c2ecf20Sopenharmony_ci * Added six new events along with their EventData 708c2ecf20Sopenharmony_ci * structures. 718c2ecf20Sopenharmony_ci * Added a new MsgFlag to the FwDownload request to 728c2ecf20Sopenharmony_ci * indicate last segment. 738c2ecf20Sopenharmony_ci * Defined a new image type of boot loader. 748c2ecf20Sopenharmony_ci * Added FW family codes for SAS product families. 758c2ecf20Sopenharmony_ci * 10-05-04 01.05.02 Added ReplyFifoHostSignalingAddr field to 768c2ecf20Sopenharmony_ci * MSG_IOC_FACTS_REPLY. 778c2ecf20Sopenharmony_ci * 12-07-04 01.05.03 Added more defines for SAS Discovery Error event. 788c2ecf20Sopenharmony_ci * 12-09-04 01.05.04 Added Unsupported device to SAS Device event. 798c2ecf20Sopenharmony_ci * 01-15-05 01.05.05 Added event data for SAS SES Event. 808c2ecf20Sopenharmony_ci * 02-09-05 01.05.06 Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define. 818c2ecf20Sopenharmony_ci * 02-22-05 01.05.07 Added Host Page Buffer Persistent flag to IOC Facts 828c2ecf20Sopenharmony_ci * Reply and IOC Init Request. 838c2ecf20Sopenharmony_ci * 03-11-05 01.05.08 Added family code for 1068E family. 848c2ecf20Sopenharmony_ci * Removed IOCFacts Reply EEDP Capability bit. 858c2ecf20Sopenharmony_ci * 06-24-05 01.05.09 Added 5 new IOCFacts Reply IOCCapabilities bits. 868c2ecf20Sopenharmony_ci * Added Max SATA Targets to SAS Discovery Error event. 878c2ecf20Sopenharmony_ci * 08-30-05 01.05.10 Added 4 new events and their event data structures. 888c2ecf20Sopenharmony_ci * Added new ReasonCode value for SAS Device Status Change 898c2ecf20Sopenharmony_ci * event. 908c2ecf20Sopenharmony_ci * Added new family code for FC949E. 918c2ecf20Sopenharmony_ci * 03-27-06 01.05.11 Added MPI_IOCFACTS_CAPABILITY_TLR. 928c2ecf20Sopenharmony_ci * Added additional Reason Codes and more event data fields 938c2ecf20Sopenharmony_ci * to EVENT_DATA_SAS_DEVICE_STATUS_CHANGE. 948c2ecf20Sopenharmony_ci * Added EVENT_DATA_SAS_BROADCAST_PRIMITIVE structure and 958c2ecf20Sopenharmony_ci * new event. 968c2ecf20Sopenharmony_ci * Added MPI_EVENT_SAS_SMP_ERROR and event data structure. 978c2ecf20Sopenharmony_ci * Added MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE and event 988c2ecf20Sopenharmony_ci * data structure. 998c2ecf20Sopenharmony_ci * Added MPI_EVENT_SAS_INIT_TABLE_OVERFLOW and event 1008c2ecf20Sopenharmony_ci * data structure. 1018c2ecf20Sopenharmony_ci * Added MPI_EXT_IMAGE_TYPE_INITIALIZATION. 1028c2ecf20Sopenharmony_ci * 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED. 1038c2ecf20Sopenharmony_ci * Added MaxInitiators field to PortFacts reply. 1048c2ecf20Sopenharmony_ci * Added SAS Device Status Change ReasonCode for 1058c2ecf20Sopenharmony_ci * asynchronous notificaiton. 1068c2ecf20Sopenharmony_ci * Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event 1078c2ecf20Sopenharmony_ci * data structure. 1088c2ecf20Sopenharmony_ci * Added new ImageType values for FWDownload and FWUpload 1098c2ecf20Sopenharmony_ci * requests. 1108c2ecf20Sopenharmony_ci * 02-28-07 01.05.13 Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS 1118c2ecf20Sopenharmony_ci * Broadcast Event Data (replacing _RESERVED2). 1128c2ecf20Sopenharmony_ci * For Discovery Error Event Data DiscoveryStatus field, 1138c2ecf20Sopenharmony_ci * replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and 1148c2ecf20Sopenharmony_ci * added _MULTI_PORT_DOMAIN. 1158c2ecf20Sopenharmony_ci * 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request. 1168c2ecf20Sopenharmony_ci * Added Common Boot Block type to FWUpload Request. 1178c2ecf20Sopenharmony_ci * 08-07-07 01.05.15 Added MPI_EVENT_SAS_INIT_RC_REMOVED define. 1188c2ecf20Sopenharmony_ci * Added MPI_EVENT_IR2_RC_DUAL_PORT_ADDED and 1198c2ecf20Sopenharmony_ci * MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED for IR2 event data. 1208c2ecf20Sopenharmony_ci * Added SASAddress field to SAS Initiator Device Table 1218c2ecf20Sopenharmony_ci * Overflow event data structure. 1228c2ecf20Sopenharmony_ci * 03-28-08 01.05.16 Added two new ReasonCode values to SAS Device Status 1238c2ecf20Sopenharmony_ci * Change Event data to indicate completion of internally 1248c2ecf20Sopenharmony_ci * generated task management. 1258c2ecf20Sopenharmony_ci * Added MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE define. 1268c2ecf20Sopenharmony_ci * Added MPI_EVENT_SAS_INIT_RC_INACCESSIBLE define. 1278c2ecf20Sopenharmony_ci * -------------------------------------------------------------------------- 1288c2ecf20Sopenharmony_ci */ 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci#ifndef MPI_IOC_H 1318c2ecf20Sopenharmony_ci#define MPI_IOC_H 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci/***************************************************************************** 1358c2ecf20Sopenharmony_ci* 1368c2ecf20Sopenharmony_ci* I O C M e s s a g e s 1378c2ecf20Sopenharmony_ci* 1388c2ecf20Sopenharmony_ci*****************************************************************************/ 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci/****************************************************************************/ 1418c2ecf20Sopenharmony_ci/* IOCInit message */ 1428c2ecf20Sopenharmony_ci/****************************************************************************/ 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_citypedef struct _MSG_IOC_INIT 1458c2ecf20Sopenharmony_ci{ 1468c2ecf20Sopenharmony_ci U8 WhoInit; /* 00h */ 1478c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 1488c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 1498c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1508c2ecf20Sopenharmony_ci U8 Flags; /* 04h */ 1518c2ecf20Sopenharmony_ci U8 MaxDevices; /* 05h */ 1528c2ecf20Sopenharmony_ci U8 MaxBuses; /* 06h */ 1538c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 1548c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 1558c2ecf20Sopenharmony_ci U16 ReplyFrameSize; /* 0Ch */ 1568c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 0Eh */ 1578c2ecf20Sopenharmony_ci U32 HostMfaHighAddr; /* 10h */ 1588c2ecf20Sopenharmony_ci U32 SenseBufferHighAddr; /* 14h */ 1598c2ecf20Sopenharmony_ci U32 ReplyFifoHostSignalingAddr; /* 18h */ 1608c2ecf20Sopenharmony_ci SGE_SIMPLE_UNION HostPageBufferSGE; /* 1Ch */ 1618c2ecf20Sopenharmony_ci U16 MsgVersion; /* 28h */ 1628c2ecf20Sopenharmony_ci U16 HeaderVersion; /* 2Ah */ 1638c2ecf20Sopenharmony_ci} MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT, 1648c2ecf20Sopenharmony_ci IOCInit_t, MPI_POINTER pIOCInit_t; 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci/* WhoInit values */ 1678c2ecf20Sopenharmony_ci#define MPI_WHOINIT_NO_ONE (0x00) 1688c2ecf20Sopenharmony_ci#define MPI_WHOINIT_SYSTEM_BIOS (0x01) 1698c2ecf20Sopenharmony_ci#define MPI_WHOINIT_ROM_BIOS (0x02) 1708c2ecf20Sopenharmony_ci#define MPI_WHOINIT_PCI_PEER (0x03) 1718c2ecf20Sopenharmony_ci#define MPI_WHOINIT_HOST_DRIVER (0x04) 1728c2ecf20Sopenharmony_ci#define MPI_WHOINIT_MANUFACTURER (0x05) 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci/* Flags values */ 1758c2ecf20Sopenharmony_ci#define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04) 1768c2ecf20Sopenharmony_ci#define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02) 1778c2ecf20Sopenharmony_ci#define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01) 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci/* MsgVersion */ 1808c2ecf20Sopenharmony_ci#define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00) 1818c2ecf20Sopenharmony_ci#define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8) 1828c2ecf20Sopenharmony_ci#define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF) 1838c2ecf20Sopenharmony_ci#define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0) 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci/* HeaderVersion */ 1868c2ecf20Sopenharmony_ci#define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00) 1878c2ecf20Sopenharmony_ci#define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8) 1888c2ecf20Sopenharmony_ci#define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF) 1898c2ecf20Sopenharmony_ci#define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0) 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_citypedef struct _MSG_IOC_INIT_REPLY 1938c2ecf20Sopenharmony_ci{ 1948c2ecf20Sopenharmony_ci U8 WhoInit; /* 00h */ 1958c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 1968c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 1978c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 1988c2ecf20Sopenharmony_ci U8 Flags; /* 04h */ 1998c2ecf20Sopenharmony_ci U8 MaxDevices; /* 05h */ 2008c2ecf20Sopenharmony_ci U8 MaxBuses; /* 06h */ 2018c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 2028c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 2038c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 2048c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 2058c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 2068c2ecf20Sopenharmony_ci} MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY, 2078c2ecf20Sopenharmony_ci IOCInitReply_t, MPI_POINTER pIOCInitReply_t; 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/****************************************************************************/ 2128c2ecf20Sopenharmony_ci/* IOC Facts message */ 2138c2ecf20Sopenharmony_ci/****************************************************************************/ 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_citypedef struct _MSG_IOC_FACTS 2168c2ecf20Sopenharmony_ci{ 2178c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 2188c2ecf20Sopenharmony_ci U8 ChainOffset; /* 01h */ 2198c2ecf20Sopenharmony_ci U8 Function; /* 02h */ 2208c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 03h */ 2218c2ecf20Sopenharmony_ci U8 MsgFlags; /* 04h */ 2228c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 2238c2ecf20Sopenharmony_ci} MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS, 2248c2ecf20Sopenharmony_ci IOCFacts_t, MPI_POINTER pIOCFacts_t; 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_citypedef struct _MPI_FW_VERSION_STRUCT 2278c2ecf20Sopenharmony_ci{ 2288c2ecf20Sopenharmony_ci U8 Dev; /* 00h */ 2298c2ecf20Sopenharmony_ci U8 Unit; /* 01h */ 2308c2ecf20Sopenharmony_ci U8 Minor; /* 02h */ 2318c2ecf20Sopenharmony_ci U8 Major; /* 03h */ 2328c2ecf20Sopenharmony_ci} MPI_FW_VERSION_STRUCT; 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_citypedef union _MPI_FW_VERSION 2358c2ecf20Sopenharmony_ci{ 2368c2ecf20Sopenharmony_ci MPI_FW_VERSION_STRUCT Struct; 2378c2ecf20Sopenharmony_ci U32 Word; 2388c2ecf20Sopenharmony_ci} MPI_FW_VERSION; 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci/* IOC Facts Reply */ 2418c2ecf20Sopenharmony_citypedef struct _MSG_IOC_FACTS_REPLY 2428c2ecf20Sopenharmony_ci{ 2438c2ecf20Sopenharmony_ci U16 MsgVersion; /* 00h */ 2448c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 2458c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 2468c2ecf20Sopenharmony_ci U16 HeaderVersion; /* 04h */ 2478c2ecf20Sopenharmony_ci U8 IOCNumber; /* 06h */ 2488c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 2498c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 2508c2ecf20Sopenharmony_ci U16 IOCExceptions; /* 0Ch */ 2518c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 2528c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 2538c2ecf20Sopenharmony_ci U8 MaxChainDepth; /* 14h */ 2548c2ecf20Sopenharmony_ci U8 WhoInit; /* 15h */ 2558c2ecf20Sopenharmony_ci U8 BlockSize; /* 16h */ 2568c2ecf20Sopenharmony_ci U8 Flags; /* 17h */ 2578c2ecf20Sopenharmony_ci U16 ReplyQueueDepth; /* 18h */ 2588c2ecf20Sopenharmony_ci U16 RequestFrameSize; /* 1Ah */ 2598c2ecf20Sopenharmony_ci U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */ 2608c2ecf20Sopenharmony_ci U16 ProductID; /* 1Eh */ 2618c2ecf20Sopenharmony_ci U32 CurrentHostMfaHighAddr; /* 20h */ 2628c2ecf20Sopenharmony_ci U16 GlobalCredits; /* 24h */ 2638c2ecf20Sopenharmony_ci U8 NumberOfPorts; /* 26h */ 2648c2ecf20Sopenharmony_ci U8 EventState; /* 27h */ 2658c2ecf20Sopenharmony_ci U32 CurrentSenseBufferHighAddr; /* 28h */ 2668c2ecf20Sopenharmony_ci U16 CurReplyFrameSize; /* 2Ch */ 2678c2ecf20Sopenharmony_ci U8 MaxDevices; /* 2Eh */ 2688c2ecf20Sopenharmony_ci U8 MaxBuses; /* 2Fh */ 2698c2ecf20Sopenharmony_ci U32 FWImageSize; /* 30h */ 2708c2ecf20Sopenharmony_ci U32 IOCCapabilities; /* 34h */ 2718c2ecf20Sopenharmony_ci MPI_FW_VERSION FWVersion; /* 38h */ 2728c2ecf20Sopenharmony_ci U16 HighPriorityQueueDepth; /* 3Ch */ 2738c2ecf20Sopenharmony_ci U16 Reserved2; /* 3Eh */ 2748c2ecf20Sopenharmony_ci SGE_SIMPLE_UNION HostPageBufferSGE; /* 40h */ 2758c2ecf20Sopenharmony_ci U32 ReplyFifoHostSignalingAddr; /* 4Ch */ 2768c2ecf20Sopenharmony_ci} MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY, 2778c2ecf20Sopenharmony_ci IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t; 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) 2808c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8) 2818c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) 2828c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT (0) 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00) 2858c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT (8) 2868c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF) 2878c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT (0) 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) 2908c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002) 2918c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004) 2928c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008) 2938c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010) 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) 2968c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02) 2978c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04) 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00) 3008c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01) 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001) 3038c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002) 3048c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004) 3058c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008) 3068c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010) 3078c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020) 3088c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040) 3098c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL (0x00000080) 3108c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100) 3118c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200) 3128c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400) 3138c2ecf20Sopenharmony_ci#define MPI_IOCFACTS_CAPABILITY_TLR (0x00000800) 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci/***************************************************************************** 3178c2ecf20Sopenharmony_ci* 3188c2ecf20Sopenharmony_ci* P o r t M e s s a g e s 3198c2ecf20Sopenharmony_ci* 3208c2ecf20Sopenharmony_ci*****************************************************************************/ 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_ci/****************************************************************************/ 3238c2ecf20Sopenharmony_ci/* Port Facts message and Reply */ 3248c2ecf20Sopenharmony_ci/****************************************************************************/ 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_citypedef struct _MSG_PORT_FACTS 3278c2ecf20Sopenharmony_ci{ 3288c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 3298c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 3308c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3318c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 04h */ 3328c2ecf20Sopenharmony_ci U8 PortNumber; /* 06h */ 3338c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3348c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3358c2ecf20Sopenharmony_ci} MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS, 3368c2ecf20Sopenharmony_ci PortFacts_t, MPI_POINTER pPortFacts_t; 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_citypedef struct _MSG_PORT_FACTS_REPLY 3398c2ecf20Sopenharmony_ci{ 3408c2ecf20Sopenharmony_ci U16 Reserved; /* 00h */ 3418c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 3428c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3438c2ecf20Sopenharmony_ci U16 Reserved1; /* 04h */ 3448c2ecf20Sopenharmony_ci U8 PortNumber; /* 06h */ 3458c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3468c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3478c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 3488c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 3498c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 3508c2ecf20Sopenharmony_ci U8 Reserved3; /* 14h */ 3518c2ecf20Sopenharmony_ci U8 PortType; /* 15h */ 3528c2ecf20Sopenharmony_ci U16 MaxDevices; /* 16h */ 3538c2ecf20Sopenharmony_ci U16 PortSCSIID; /* 18h */ 3548c2ecf20Sopenharmony_ci U16 ProtocolFlags; /* 1Ah */ 3558c2ecf20Sopenharmony_ci U16 MaxPostedCmdBuffers; /* 1Ch */ 3568c2ecf20Sopenharmony_ci U16 MaxPersistentIDs; /* 1Eh */ 3578c2ecf20Sopenharmony_ci U16 MaxLanBuckets; /* 20h */ 3588c2ecf20Sopenharmony_ci U8 MaxInitiators; /* 22h */ 3598c2ecf20Sopenharmony_ci U8 Reserved4; /* 23h */ 3608c2ecf20Sopenharmony_ci U32 Reserved5; /* 24h */ 3618c2ecf20Sopenharmony_ci} MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY, 3628c2ecf20Sopenharmony_ci PortFactsReply_t, MPI_POINTER pPortFactsReply_t; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci/* PortTypes values */ 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00) 3688c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PORTTYPE_SCSI (0x01) 3698c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PORTTYPE_FC (0x10) 3708c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20) 3718c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PORTTYPE_SAS (0x30) 3728c2ecf20Sopenharmony_ci 3738c2ecf20Sopenharmony_ci/* ProtocolFlags values */ 3748c2ecf20Sopenharmony_ci 3758c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01) 3768c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PROTOCOL_LAN (0x02) 3778c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PROTOCOL_TARGET (0x04) 3788c2ecf20Sopenharmony_ci#define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08) 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ci/****************************************************************************/ 3828c2ecf20Sopenharmony_ci/* Port Enable Message */ 3838c2ecf20Sopenharmony_ci/****************************************************************************/ 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_citypedef struct _MSG_PORT_ENABLE 3868c2ecf20Sopenharmony_ci{ 3878c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 3888c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 3898c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 3908c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 04h */ 3918c2ecf20Sopenharmony_ci U8 PortNumber; /* 06h */ 3928c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 3938c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 3948c2ecf20Sopenharmony_ci} MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE, 3958c2ecf20Sopenharmony_ci PortEnable_t, MPI_POINTER pPortEnable_t; 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_citypedef struct _MSG_PORT_ENABLE_REPLY 3988c2ecf20Sopenharmony_ci{ 3998c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 4008c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 4018c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4028c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 04h */ 4038c2ecf20Sopenharmony_ci U8 PortNumber; /* 05h */ 4048c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4058c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4068c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 4078c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 4088c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 4098c2ecf20Sopenharmony_ci} MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY, 4108c2ecf20Sopenharmony_ci PortEnableReply_t, MPI_POINTER pPortEnableReply_t; 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci/***************************************************************************** 4148c2ecf20Sopenharmony_ci* 4158c2ecf20Sopenharmony_ci* E v e n t M e s s a g e s 4168c2ecf20Sopenharmony_ci* 4178c2ecf20Sopenharmony_ci*****************************************************************************/ 4188c2ecf20Sopenharmony_ci 4198c2ecf20Sopenharmony_ci/****************************************************************************/ 4208c2ecf20Sopenharmony_ci/* Event Notification messages */ 4218c2ecf20Sopenharmony_ci/****************************************************************************/ 4228c2ecf20Sopenharmony_ci 4238c2ecf20Sopenharmony_citypedef struct _MSG_EVENT_NOTIFY 4248c2ecf20Sopenharmony_ci{ 4258c2ecf20Sopenharmony_ci U8 Switch; /* 00h */ 4268c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 4278c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 4288c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4298c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 4308c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4318c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4328c2ecf20Sopenharmony_ci} MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY, 4338c2ecf20Sopenharmony_ci EventNotification_t, MPI_POINTER pEventNotification_t; 4348c2ecf20Sopenharmony_ci 4358c2ecf20Sopenharmony_ci/* Event Notification Reply */ 4368c2ecf20Sopenharmony_ci 4378c2ecf20Sopenharmony_citypedef struct _MSG_EVENT_NOTIFY_REPLY 4388c2ecf20Sopenharmony_ci{ 4398c2ecf20Sopenharmony_ci U16 EventDataLength; /* 00h */ 4408c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 4418c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4428c2ecf20Sopenharmony_ci U8 Reserved1[2]; /* 04h */ 4438c2ecf20Sopenharmony_ci U8 AckRequired; /* 06h */ 4448c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4458c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4468c2ecf20Sopenharmony_ci U8 Reserved2[2]; /* 0Ch */ 4478c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 4488c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 4498c2ecf20Sopenharmony_ci U32 Event; /* 14h */ 4508c2ecf20Sopenharmony_ci U32 EventContext; /* 18h */ 4518c2ecf20Sopenharmony_ci U32 Data[1]; /* 1Ch */ 4528c2ecf20Sopenharmony_ci} MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY, 4538c2ecf20Sopenharmony_ci EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t; 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_ci/* Event Acknowledge */ 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_citypedef struct _MSG_EVENT_ACK 4588c2ecf20Sopenharmony_ci{ 4598c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 4608c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 4618c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4628c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 4638c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4648c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4658c2ecf20Sopenharmony_ci U32 Event; /* 0Ch */ 4668c2ecf20Sopenharmony_ci U32 EventContext; /* 10h */ 4678c2ecf20Sopenharmony_ci} MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK, 4688c2ecf20Sopenharmony_ci EventAck_t, MPI_POINTER pEventAck_t; 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_citypedef struct _MSG_EVENT_ACK_REPLY 4718c2ecf20Sopenharmony_ci{ 4728c2ecf20Sopenharmony_ci U8 Reserved[2]; /* 00h */ 4738c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 4748c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 4758c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 4768c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 4778c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 4788c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 4798c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 4808c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 4818c2ecf20Sopenharmony_ci} MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY, 4828c2ecf20Sopenharmony_ci EventAckReply_t, MPI_POINTER pEventAckReply_t; 4838c2ecf20Sopenharmony_ci 4848c2ecf20Sopenharmony_ci/* Switch */ 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ci#define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00) 4878c2ecf20Sopenharmony_ci#define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01) 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_ci/* Event */ 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci#define MPI_EVENT_NONE (0x00000000) 4928c2ecf20Sopenharmony_ci#define MPI_EVENT_LOG_DATA (0x00000001) 4938c2ecf20Sopenharmony_ci#define MPI_EVENT_STATE_CHANGE (0x00000002) 4948c2ecf20Sopenharmony_ci#define MPI_EVENT_UNIT_ATTENTION (0x00000003) 4958c2ecf20Sopenharmony_ci#define MPI_EVENT_IOC_BUS_RESET (0x00000004) 4968c2ecf20Sopenharmony_ci#define MPI_EVENT_EXT_BUS_RESET (0x00000005) 4978c2ecf20Sopenharmony_ci#define MPI_EVENT_RESCAN (0x00000006) 4988c2ecf20Sopenharmony_ci#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) 4998c2ecf20Sopenharmony_ci#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) 5008c2ecf20Sopenharmony_ci#define MPI_EVENT_LOGOUT (0x00000009) 5018c2ecf20Sopenharmony_ci#define MPI_EVENT_EVENT_CHANGE (0x0000000A) 5028c2ecf20Sopenharmony_ci#define MPI_EVENT_INTEGRATED_RAID (0x0000000B) 5038c2ecf20Sopenharmony_ci#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) 5048c2ecf20Sopenharmony_ci#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) 5058c2ecf20Sopenharmony_ci#define MPI_EVENT_QUEUE_FULL (0x0000000E) 5068c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F) 5078c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SES (0x00000010) 5088c2ecf20Sopenharmony_ci#define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011) 5098c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012) 5108c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013) 5118c2ecf20Sopenharmony_ci#define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014) 5128c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2 (0x00000015) 5138c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DISCOVERY (0x00000016) 5148c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_BROADCAST_PRIMITIVE (0x00000017) 5158c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x00000018) 5168c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW (0x00000019) 5178c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_ERROR (0x0000001A) 5188c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE (0x0000001B) 5198c2ecf20Sopenharmony_ci#define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021) 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci/* AckRequired field values */ 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_ci#define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00) 5248c2ecf20Sopenharmony_ci#define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01) 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci/* EventChange Event data */ 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_EVENT_CHANGE 5298c2ecf20Sopenharmony_ci{ 5308c2ecf20Sopenharmony_ci U8 EventState; /* 00h */ 5318c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 5328c2ecf20Sopenharmony_ci U16 Reserved1; /* 02h */ 5338c2ecf20Sopenharmony_ci} EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE, 5348c2ecf20Sopenharmony_ci EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t; 5358c2ecf20Sopenharmony_ci 5368c2ecf20Sopenharmony_ci/* LogEntryAdded Event data */ 5378c2ecf20Sopenharmony_ci 5388c2ecf20Sopenharmony_ci/* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */ 5398c2ecf20Sopenharmony_ci#define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH (0x1C) 5408c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_LOG_ENTRY 5418c2ecf20Sopenharmony_ci{ 5428c2ecf20Sopenharmony_ci U32 TimeStamp; /* 00h */ 5438c2ecf20Sopenharmony_ci U32 Reserved1; /* 04h */ 5448c2ecf20Sopenharmony_ci U16 LogSequence; /* 08h */ 5458c2ecf20Sopenharmony_ci U16 LogEntryQualifier; /* 0Ah */ 5468c2ecf20Sopenharmony_ci U8 LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */ 5478c2ecf20Sopenharmony_ci} EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY, 5488c2ecf20Sopenharmony_ci MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t; 5498c2ecf20Sopenharmony_ci 5508c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_LOG_ENTRY_ADDED 5518c2ecf20Sopenharmony_ci{ 5528c2ecf20Sopenharmony_ci U16 LogSequence; /* 00h */ 5538c2ecf20Sopenharmony_ci U16 Reserved1; /* 02h */ 5548c2ecf20Sopenharmony_ci U32 Reserved2; /* 04h */ 5558c2ecf20Sopenharmony_ci EVENT_DATA_LOG_ENTRY LogEntry; /* 08h */ 5568c2ecf20Sopenharmony_ci} EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED, 5578c2ecf20Sopenharmony_ci MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t; 5588c2ecf20Sopenharmony_ci 5598c2ecf20Sopenharmony_ci/* SCSI Event data for Port, Bus and Device forms */ 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SCSI 5628c2ecf20Sopenharmony_ci{ 5638c2ecf20Sopenharmony_ci U8 TargetID; /* 00h */ 5648c2ecf20Sopenharmony_ci U8 BusPort; /* 01h */ 5658c2ecf20Sopenharmony_ci U16 Reserved; /* 02h */ 5668c2ecf20Sopenharmony_ci} EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI, 5678c2ecf20Sopenharmony_ci EventDataScsi_t, MPI_POINTER pEventDataScsi_t; 5688c2ecf20Sopenharmony_ci 5698c2ecf20Sopenharmony_ci/* SCSI Device Status Change Event data */ 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE 5728c2ecf20Sopenharmony_ci{ 5738c2ecf20Sopenharmony_ci U8 TargetID; /* 00h */ 5748c2ecf20Sopenharmony_ci U8 Bus; /* 01h */ 5758c2ecf20Sopenharmony_ci U8 ReasonCode; /* 02h */ 5768c2ecf20Sopenharmony_ci U8 LUN; /* 03h */ 5778c2ecf20Sopenharmony_ci U8 ASC; /* 04h */ 5788c2ecf20Sopenharmony_ci U8 ASCQ; /* 05h */ 5798c2ecf20Sopenharmony_ci U16 Reserved; /* 06h */ 5808c2ecf20Sopenharmony_ci} EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 5818c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 5828c2ecf20Sopenharmony_ci MpiEventDataScsiDeviceStatusChange_t, 5838c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t; 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_ci/* MPI SCSI Device Status Change Event data ReasonCode values */ 5868c2ecf20Sopenharmony_ci#define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03) 5878c2ecf20Sopenharmony_ci#define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04) 5888c2ecf20Sopenharmony_ci#define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05) 5898c2ecf20Sopenharmony_ci 5908c2ecf20Sopenharmony_ci/* SAS Device Status Change Event data */ 5918c2ecf20Sopenharmony_ci 5928c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE 5938c2ecf20Sopenharmony_ci{ 5948c2ecf20Sopenharmony_ci U8 TargetID; /* 00h */ 5958c2ecf20Sopenharmony_ci U8 Bus; /* 01h */ 5968c2ecf20Sopenharmony_ci U8 ReasonCode; /* 02h */ 5978c2ecf20Sopenharmony_ci U8 Reserved; /* 03h */ 5988c2ecf20Sopenharmony_ci U8 ASC; /* 04h */ 5998c2ecf20Sopenharmony_ci U8 ASCQ; /* 05h */ 6008c2ecf20Sopenharmony_ci U16 DevHandle; /* 06h */ 6018c2ecf20Sopenharmony_ci U32 DeviceInfo; /* 08h */ 6028c2ecf20Sopenharmony_ci U16 ParentDevHandle; /* 0Ch */ 6038c2ecf20Sopenharmony_ci U8 PhyNum; /* 0Eh */ 6048c2ecf20Sopenharmony_ci U8 Reserved1; /* 0Fh */ 6058c2ecf20Sopenharmony_ci U64 SASAddress; /* 10h */ 6068c2ecf20Sopenharmony_ci U8 LUN[8]; /* 18h */ 6078c2ecf20Sopenharmony_ci U16 TaskTag; /* 20h */ 6088c2ecf20Sopenharmony_ci U16 Reserved2; /* 22h */ 6098c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, 6108c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, 6118c2ecf20Sopenharmony_ci MpiEventDataSasDeviceStatusChange_t, 6128c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataSasDeviceStatusChange_t; 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci/* MPI SAS Device Status Change Event data ReasonCode values */ 6158c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03) 6168c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04) 6178c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05) 6188c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06) 6198c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07) 6208c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08) 6218c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09) 6228c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A) 6238c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B) 6248c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C) 6258c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D) 6268c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET (0x0E) 6278c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL (0x0F) 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_ci/* SCSI Event data for Queue Full event */ 6318c2ecf20Sopenharmony_ci 6328c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_QUEUE_FULL 6338c2ecf20Sopenharmony_ci{ 6348c2ecf20Sopenharmony_ci U8 TargetID; /* 00h */ 6358c2ecf20Sopenharmony_ci U8 Bus; /* 01h */ 6368c2ecf20Sopenharmony_ci U16 CurrentDepth; /* 02h */ 6378c2ecf20Sopenharmony_ci} EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL, 6388c2ecf20Sopenharmony_ci EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t; 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ci/* MPI Integrated RAID Event data */ 6418c2ecf20Sopenharmony_ci 6428c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_RAID 6438c2ecf20Sopenharmony_ci{ 6448c2ecf20Sopenharmony_ci U8 VolumeID; /* 00h */ 6458c2ecf20Sopenharmony_ci U8 VolumeBus; /* 01h */ 6468c2ecf20Sopenharmony_ci U8 ReasonCode; /* 02h */ 6478c2ecf20Sopenharmony_ci U8 PhysDiskNum; /* 03h */ 6488c2ecf20Sopenharmony_ci U8 ASC; /* 04h */ 6498c2ecf20Sopenharmony_ci U8 ASCQ; /* 05h */ 6508c2ecf20Sopenharmony_ci U16 Reserved; /* 06h */ 6518c2ecf20Sopenharmony_ci U32 SettingsStatus; /* 08h */ 6528c2ecf20Sopenharmony_ci} EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID, 6538c2ecf20Sopenharmony_ci MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t; 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci/* MPI Integrated RAID Event data ReasonCode values */ 6568c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00) 6578c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01) 6588c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02) 6598c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03) 6608c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04) 6618c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05) 6628c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06) 6638c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07) 6648c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08) 6658c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09) 6668c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_SMART_DATA (0x0A) 6678c2ecf20Sopenharmony_ci#define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B) 6688c2ecf20Sopenharmony_ci 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci/* MPI Integrated RAID Resync Update Event data */ 6718c2ecf20Sopenharmony_ci 6728c2ecf20Sopenharmony_citypedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE 6738c2ecf20Sopenharmony_ci{ 6748c2ecf20Sopenharmony_ci U8 VolumeID; /* 00h */ 6758c2ecf20Sopenharmony_ci U8 VolumeBus; /* 01h */ 6768c2ecf20Sopenharmony_ci U8 ResyncComplete; /* 02h */ 6778c2ecf20Sopenharmony_ci U8 Reserved1; /* 03h */ 6788c2ecf20Sopenharmony_ci U32 Reserved2; /* 04h */ 6798c2ecf20Sopenharmony_ci} MPI_EVENT_DATA_IR_RESYNC_UPDATE, 6808c2ecf20Sopenharmony_ci MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE, 6818c2ecf20Sopenharmony_ci MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t; 6828c2ecf20Sopenharmony_ci 6838c2ecf20Sopenharmony_ci/* MPI IR2 Event data */ 6848c2ecf20Sopenharmony_ci 6858c2ecf20Sopenharmony_ci/* MPI_LD_STATE or MPI_PD_STATE */ 6868c2ecf20Sopenharmony_citypedef struct _IR2_STATE_CHANGED 6878c2ecf20Sopenharmony_ci{ 6888c2ecf20Sopenharmony_ci U16 PreviousState; /* 00h */ 6898c2ecf20Sopenharmony_ci U16 NewState; /* 02h */ 6908c2ecf20Sopenharmony_ci} IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED; 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_citypedef struct _IR2_PD_INFO 6938c2ecf20Sopenharmony_ci{ 6948c2ecf20Sopenharmony_ci U16 DeviceHandle; /* 00h */ 6958c2ecf20Sopenharmony_ci U8 TruncEnclosureHandle; /* 02h */ 6968c2ecf20Sopenharmony_ci U8 TruncatedSlot; /* 03h */ 6978c2ecf20Sopenharmony_ci} IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO; 6988c2ecf20Sopenharmony_ci 6998c2ecf20Sopenharmony_citypedef union _MPI_IR2_RC_EVENT_DATA 7008c2ecf20Sopenharmony_ci{ 7018c2ecf20Sopenharmony_ci IR2_STATE_CHANGED StateChanged; 7028c2ecf20Sopenharmony_ci U32 Lba; 7038c2ecf20Sopenharmony_ci IR2_PD_INFO PdInfo; 7048c2ecf20Sopenharmony_ci} MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA; 7058c2ecf20Sopenharmony_ci 7068c2ecf20Sopenharmony_citypedef struct _MPI_EVENT_DATA_IR2 7078c2ecf20Sopenharmony_ci{ 7088c2ecf20Sopenharmony_ci U8 TargetID; /* 00h */ 7098c2ecf20Sopenharmony_ci U8 Bus; /* 01h */ 7108c2ecf20Sopenharmony_ci U8 ReasonCode; /* 02h */ 7118c2ecf20Sopenharmony_ci U8 PhysDiskNum; /* 03h */ 7128c2ecf20Sopenharmony_ci MPI_IR2_RC_EVENT_DATA IR2EventData; /* 04h */ 7138c2ecf20Sopenharmony_ci} MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2, 7148c2ecf20Sopenharmony_ci MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t; 7158c2ecf20Sopenharmony_ci 7168c2ecf20Sopenharmony_ci/* MPI IR2 Event data ReasonCode values */ 7178c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_LD_STATE_CHANGED (0x01) 7188c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_PD_STATE_CHANGED (0x02) 7198c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL (0x03) 7208c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_PD_INSERTED (0x04) 7218c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_PD_REMOVED (0x05) 7228c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06) 7238c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07) 7248c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_DUAL_PORT_ADDED (0x08) 7258c2ecf20Sopenharmony_ci#define MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED (0x09) 7268c2ecf20Sopenharmony_ci 7278c2ecf20Sopenharmony_ci/* defines for logical disk states */ 7288c2ecf20Sopenharmony_ci#define MPI_LD_STATE_OPTIMAL (0x00) 7298c2ecf20Sopenharmony_ci#define MPI_LD_STATE_DEGRADED (0x01) 7308c2ecf20Sopenharmony_ci#define MPI_LD_STATE_FAILED (0x02) 7318c2ecf20Sopenharmony_ci#define MPI_LD_STATE_MISSING (0x03) 7328c2ecf20Sopenharmony_ci#define MPI_LD_STATE_OFFLINE (0x04) 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ci/* defines for physical disk states */ 7358c2ecf20Sopenharmony_ci#define MPI_PD_STATE_ONLINE (0x00) 7368c2ecf20Sopenharmony_ci#define MPI_PD_STATE_MISSING (0x01) 7378c2ecf20Sopenharmony_ci#define MPI_PD_STATE_NOT_COMPATIBLE (0x02) 7388c2ecf20Sopenharmony_ci#define MPI_PD_STATE_FAILED (0x03) 7398c2ecf20Sopenharmony_ci#define MPI_PD_STATE_INITIALIZING (0x04) 7408c2ecf20Sopenharmony_ci#define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST (0x05) 7418c2ecf20Sopenharmony_ci#define MPI_PD_STATE_FAILED_AT_HOST_REQUEST (0x06) 7428c2ecf20Sopenharmony_ci#define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON (0xFF) 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ci/* MPI Link Status Change Event data */ 7458c2ecf20Sopenharmony_ci 7468c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_LINK_STATUS 7478c2ecf20Sopenharmony_ci{ 7488c2ecf20Sopenharmony_ci U8 State; /* 00h */ 7498c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 7508c2ecf20Sopenharmony_ci U16 Reserved1; /* 02h */ 7518c2ecf20Sopenharmony_ci U8 Reserved2; /* 04h */ 7528c2ecf20Sopenharmony_ci U8 Port; /* 05h */ 7538c2ecf20Sopenharmony_ci U16 Reserved3; /* 06h */ 7548c2ecf20Sopenharmony_ci} EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS, 7558c2ecf20Sopenharmony_ci EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t; 7568c2ecf20Sopenharmony_ci 7578c2ecf20Sopenharmony_ci#define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000) 7588c2ecf20Sopenharmony_ci#define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001) 7598c2ecf20Sopenharmony_ci 7608c2ecf20Sopenharmony_ci/* MPI Loop State Change Event data */ 7618c2ecf20Sopenharmony_ci 7628c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_LOOP_STATE 7638c2ecf20Sopenharmony_ci{ 7648c2ecf20Sopenharmony_ci U8 Character4; /* 00h */ 7658c2ecf20Sopenharmony_ci U8 Character3; /* 01h */ 7668c2ecf20Sopenharmony_ci U8 Type; /* 02h */ 7678c2ecf20Sopenharmony_ci U8 Reserved; /* 03h */ 7688c2ecf20Sopenharmony_ci U8 Reserved1; /* 04h */ 7698c2ecf20Sopenharmony_ci U8 Port; /* 05h */ 7708c2ecf20Sopenharmony_ci U16 Reserved2; /* 06h */ 7718c2ecf20Sopenharmony_ci} EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE, 7728c2ecf20Sopenharmony_ci EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t; 7738c2ecf20Sopenharmony_ci 7748c2ecf20Sopenharmony_ci#define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001) 7758c2ecf20Sopenharmony_ci#define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002) 7768c2ecf20Sopenharmony_ci#define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003) 7778c2ecf20Sopenharmony_ci 7788c2ecf20Sopenharmony_ci/* MPI LOGOUT Event data */ 7798c2ecf20Sopenharmony_ci 7808c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_LOGOUT 7818c2ecf20Sopenharmony_ci{ 7828c2ecf20Sopenharmony_ci U32 NPortID; /* 00h */ 7838c2ecf20Sopenharmony_ci U8 AliasIndex; /* 04h */ 7848c2ecf20Sopenharmony_ci U8 Port; /* 05h */ 7858c2ecf20Sopenharmony_ci U16 Reserved1; /* 06h */ 7868c2ecf20Sopenharmony_ci} EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT, 7878c2ecf20Sopenharmony_ci EventDataLogout_t, MPI_POINTER pEventDataLogout_t; 7888c2ecf20Sopenharmony_ci 7898c2ecf20Sopenharmony_ci#define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF) 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_ci/* SAS SES Event data */ 7928c2ecf20Sopenharmony_ci 7938c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_SES 7948c2ecf20Sopenharmony_ci{ 7958c2ecf20Sopenharmony_ci U8 PhyNum; /* 00h */ 7968c2ecf20Sopenharmony_ci U8 Port; /* 01h */ 7978c2ecf20Sopenharmony_ci U8 PortWidth; /* 02h */ 7988c2ecf20Sopenharmony_ci U8 Reserved1; /* 04h */ 7998c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES, 8008c2ecf20Sopenharmony_ci MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t; 8018c2ecf20Sopenharmony_ci 8028c2ecf20Sopenharmony_ci/* SAS Broadcast Primitive Event data */ 8038c2ecf20Sopenharmony_ci 8048c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE 8058c2ecf20Sopenharmony_ci{ 8068c2ecf20Sopenharmony_ci U8 PhyNum; /* 00h */ 8078c2ecf20Sopenharmony_ci U8 Port; /* 01h */ 8088c2ecf20Sopenharmony_ci U8 PortWidth; /* 02h */ 8098c2ecf20Sopenharmony_ci U8 Primitive; /* 04h */ 8108c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_BROADCAST_PRIMITIVE, 8118c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SAS_BROADCAST_PRIMITIVE, 8128c2ecf20Sopenharmony_ci MpiEventDataSasBroadcastPrimitive_t, 8138c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataSasBroadcastPrimitive_t; 8148c2ecf20Sopenharmony_ci 8158c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_CHANGE (0x01) 8168c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03) 8178c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04) 8188c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05) 8198c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06) 8208c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07) 8218c2ecf20Sopenharmony_ci#define MPI_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08) 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_ci/* SAS Phy Link Status Event data */ 8248c2ecf20Sopenharmony_ci 8258c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS 8268c2ecf20Sopenharmony_ci{ 8278c2ecf20Sopenharmony_ci U8 PhyNum; /* 00h */ 8288c2ecf20Sopenharmony_ci U8 LinkRates; /* 01h */ 8298c2ecf20Sopenharmony_ci U16 DevHandle; /* 02h */ 8308c2ecf20Sopenharmony_ci U64 SASAddress; /* 04h */ 8318c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS, 8328c2ecf20Sopenharmony_ci MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t; 8338c2ecf20Sopenharmony_ci 8348c2ecf20Sopenharmony_ci/* defines for the LinkRates field of the SAS PHY Link Status event */ 8358c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK (0xF0) 8368c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT (4) 8378c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK (0x0F) 8388c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT (0) 8398c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN (0x00) 8408c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED (0x01) 8418c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION (0x02) 8428c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03) 8438c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08) 8448c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09) 8458c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_PLS_LR_RATE_6_0 (0x0A) 8468c2ecf20Sopenharmony_ci 8478c2ecf20Sopenharmony_ci/* SAS Discovery Event data */ 8488c2ecf20Sopenharmony_ci 8498c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_DISCOVERY 8508c2ecf20Sopenharmony_ci{ 8518c2ecf20Sopenharmony_ci U32 DiscoveryStatus; /* 00h */ 8528c2ecf20Sopenharmony_ci U32 Reserved1; /* 04h */ 8538c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY, 8548c2ecf20Sopenharmony_ci EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t; 8558c2ecf20Sopenharmony_ci 8568c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DSCVRY_COMPLETE (0x00000000) 8578c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS (0x00000001) 8588c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK (0xFFFF0000) 8598c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT (16) 8608c2ecf20Sopenharmony_ci 8618c2ecf20Sopenharmony_ci/* SAS Discovery Error Event data */ 8628c2ecf20Sopenharmony_ci 8638c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_DISCOVERY_ERROR 8648c2ecf20Sopenharmony_ci{ 8658c2ecf20Sopenharmony_ci U32 DiscoveryStatus; /* 00h */ 8668c2ecf20Sopenharmony_ci U8 Port; /* 04h */ 8678c2ecf20Sopenharmony_ci U8 Reserved1; /* 05h */ 8688c2ecf20Sopenharmony_ci U16 Reserved2; /* 06h */ 8698c2ecf20Sopenharmony_ci} EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR, 8708c2ecf20Sopenharmony_ci EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t; 8718c2ecf20Sopenharmony_ci 8728c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED (0x00000001) 8738c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE (0x00000002) 8748c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS (0x00000004) 8758c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR (0x00000008) 8768c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT (0x00000010) 8778c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES (0x00000020) 8788c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST (0x00000040) 8798c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED (0x00000080) 8808c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100) 8818c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200) 8828c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400) 8838c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800) 8848c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000) 8858c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000) 8868c2ecf20Sopenharmony_ci#define MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE (0x00004000) 8878c2ecf20Sopenharmony_ci 8888c2ecf20Sopenharmony_ci/* SAS SMP Error Event data */ 8898c2ecf20Sopenharmony_ci 8908c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_SMP_ERROR 8918c2ecf20Sopenharmony_ci{ 8928c2ecf20Sopenharmony_ci U8 Status; /* 00h */ 8938c2ecf20Sopenharmony_ci U8 Port; /* 01h */ 8948c2ecf20Sopenharmony_ci U8 SMPFunctionResult; /* 02h */ 8958c2ecf20Sopenharmony_ci U8 Reserved1; /* 03h */ 8968c2ecf20Sopenharmony_ci U64 SASAddress; /* 04h */ 8978c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_SMP_ERROR, MPI_POINTER PTR_EVENT_DATA_SAS_SMP_ERROR, 8988c2ecf20Sopenharmony_ci MpiEventDataSasSmpError_t, MPI_POINTER pMpiEventDataSasSmpError_t; 8998c2ecf20Sopenharmony_ci 9008c2ecf20Sopenharmony_ci/* defines for the Status field of the SAS SMP Error event */ 9018c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID (0x00) 9028c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_CRC_ERROR (0x01) 9038c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_TIMEOUT (0x02) 9048c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_NO_DESTINATION (0x03) 9058c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_SMP_BAD_DESTINATION (0x04) 9068c2ecf20Sopenharmony_ci 9078c2ecf20Sopenharmony_ci/* SAS Initiator Device Status Change Event data */ 9088c2ecf20Sopenharmony_ci 9098c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE 9108c2ecf20Sopenharmony_ci{ 9118c2ecf20Sopenharmony_ci U8 ReasonCode; /* 00h */ 9128c2ecf20Sopenharmony_ci U8 Port; /* 01h */ 9138c2ecf20Sopenharmony_ci U16 DevHandle; /* 02h */ 9148c2ecf20Sopenharmony_ci U64 SASAddress; /* 04h */ 9158c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE, 9168c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE, 9178c2ecf20Sopenharmony_ci MpiEventDataSasInitDevStatusChange_t, 9188c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataSasInitDevStatusChange_t; 9198c2ecf20Sopenharmony_ci 9208c2ecf20Sopenharmony_ci/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */ 9218c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_INIT_RC_ADDED (0x01) 9228c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_INIT_RC_REMOVED (0x02) 9238c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_INIT_RC_INACCESSIBLE (0x03) 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_ci/* SAS Initiator Device Table Overflow Event data */ 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW 9288c2ecf20Sopenharmony_ci{ 9298c2ecf20Sopenharmony_ci U8 MaxInit; /* 00h */ 9308c2ecf20Sopenharmony_ci U8 CurrentInit; /* 01h */ 9318c2ecf20Sopenharmony_ci U16 Reserved1; /* 02h */ 9328c2ecf20Sopenharmony_ci U64 SASAddress; /* 04h */ 9338c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_INIT_TABLE_OVERFLOW, 9348c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW, 9358c2ecf20Sopenharmony_ci MpiEventDataSasInitTableOverflow_t, 9368c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataSasInitTableOverflow_t; 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_ci/* SAS Expander Status Change Event data */ 9398c2ecf20Sopenharmony_ci 9408c2ecf20Sopenharmony_citypedef struct _EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE 9418c2ecf20Sopenharmony_ci{ 9428c2ecf20Sopenharmony_ci U8 ReasonCode; /* 00h */ 9438c2ecf20Sopenharmony_ci U8 Reserved1; /* 01h */ 9448c2ecf20Sopenharmony_ci U16 Reserved2; /* 02h */ 9458c2ecf20Sopenharmony_ci U8 PhysicalPort; /* 04h */ 9468c2ecf20Sopenharmony_ci U8 Reserved3; /* 05h */ 9478c2ecf20Sopenharmony_ci U16 EnclosureHandle; /* 06h */ 9488c2ecf20Sopenharmony_ci U64 SASAddress; /* 08h */ 9498c2ecf20Sopenharmony_ci U32 DiscoveryStatus; /* 10h */ 9508c2ecf20Sopenharmony_ci U16 DevHandle; /* 14h */ 9518c2ecf20Sopenharmony_ci U16 ParentDevHandle; /* 16h */ 9528c2ecf20Sopenharmony_ci U16 ExpanderChangeCount; /* 18h */ 9538c2ecf20Sopenharmony_ci U16 ExpanderRouteIndexes; /* 1Ah */ 9548c2ecf20Sopenharmony_ci U8 NumPhys; /* 1Ch */ 9558c2ecf20Sopenharmony_ci U8 SASLevel; /* 1Dh */ 9568c2ecf20Sopenharmony_ci U8 Flags; /* 1Eh */ 9578c2ecf20Sopenharmony_ci U8 Reserved4; /* 1Fh */ 9588c2ecf20Sopenharmony_ci} EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE, 9598c2ecf20Sopenharmony_ci MPI_POINTER PTR_EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE, 9608c2ecf20Sopenharmony_ci MpiEventDataSasExpanderStatusChange_t, 9618c2ecf20Sopenharmony_ci MPI_POINTER pMpiEventDataSasExpanderStatusChange_t; 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_ci/* values for ReasonCode field of SAS Expander Status Change Event data */ 9648c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_RC_ADDED (0x00) 9658c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING (0x01) 9668c2ecf20Sopenharmony_ci 9678c2ecf20Sopenharmony_ci/* values for DiscoveryStatus field of SAS Expander Status Change Event data */ 9688c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_LOOP_DETECTED (0x00000001) 9698c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_UNADDRESSABLE_DEVICE (0x00000002) 9708c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_MULTIPLE_PORTS (0x00000004) 9718c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_EXPANDER_ERR (0x00000008) 9728c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_SMP_TIMEOUT (0x00000010) 9738c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_OUT_ROUTE_ENTRIES (0x00000020) 9748c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_INDEX_NOT_EXIST (0x00000040) 9758c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_SMP_FUNCTION_FAILED (0x00000080) 9768c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_SMP_CRC_ERROR (0x00000100) 9778c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_SUBTRACTIVE_LINK (0x00000200) 9788c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_TABLE_LINK (0x00000400) 9798c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_DS_UNSUPPORTED_DEVICE (0x00000800) 9808c2ecf20Sopenharmony_ci 9818c2ecf20Sopenharmony_ci/* values for Flags field of SAS Expander Status Change Event data */ 9828c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_FLAGS_ROUTE_TABLE_CONFIG (0x02) 9838c2ecf20Sopenharmony_ci#define MPI_EVENT_SAS_EXP_FLAGS_CONFIG_IN_PROGRESS (0x01) 9848c2ecf20Sopenharmony_ci 9858c2ecf20Sopenharmony_ci 9868c2ecf20Sopenharmony_ci 9878c2ecf20Sopenharmony_ci/***************************************************************************** 9888c2ecf20Sopenharmony_ci* 9898c2ecf20Sopenharmony_ci* F i r m w a r e L o a d M e s s a g e s 9908c2ecf20Sopenharmony_ci* 9918c2ecf20Sopenharmony_ci*****************************************************************************/ 9928c2ecf20Sopenharmony_ci 9938c2ecf20Sopenharmony_ci/****************************************************************************/ 9948c2ecf20Sopenharmony_ci/* Firmware Download message and associated structures */ 9958c2ecf20Sopenharmony_ci/****************************************************************************/ 9968c2ecf20Sopenharmony_ci 9978c2ecf20Sopenharmony_citypedef struct _MSG_FW_DOWNLOAD 9988c2ecf20Sopenharmony_ci{ 9998c2ecf20Sopenharmony_ci U8 ImageType; /* 00h */ 10008c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 10018c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 10028c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 10038c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 10048c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 10058c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 10068c2ecf20Sopenharmony_ci SGE_MPI_UNION SGL; /* 0Ch */ 10078c2ecf20Sopenharmony_ci} MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD, 10088c2ecf20Sopenharmony_ci FWDownload_t, MPI_POINTER pFWDownload_t; 10098c2ecf20Sopenharmony_ci 10108c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01) 10118c2ecf20Sopenharmony_ci 10128c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00) 10138c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_FW (0x01) 10148c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02) 10158c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03) 10168c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04) 10178c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06) 10188c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07) 10198c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08) 10208c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_MEGARAID (0x09) 10218c2ecf20Sopenharmony_ci#define MPI_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B) 10228c2ecf20Sopenharmony_ci 10238c2ecf20Sopenharmony_ci 10248c2ecf20Sopenharmony_citypedef struct _FWDownloadTCSGE 10258c2ecf20Sopenharmony_ci{ 10268c2ecf20Sopenharmony_ci U8 Reserved; /* 00h */ 10278c2ecf20Sopenharmony_ci U8 ContextSize; /* 01h */ 10288c2ecf20Sopenharmony_ci U8 DetailsLength; /* 02h */ 10298c2ecf20Sopenharmony_ci U8 Flags; /* 03h */ 10308c2ecf20Sopenharmony_ci U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */ 10318c2ecf20Sopenharmony_ci U32 ImageOffset; /* 08h */ 10328c2ecf20Sopenharmony_ci U32 ImageSize; /* 0Ch */ 10338c2ecf20Sopenharmony_ci} FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE, 10348c2ecf20Sopenharmony_ci FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t; 10358c2ecf20Sopenharmony_ci 10368c2ecf20Sopenharmony_ci/* Firmware Download reply */ 10378c2ecf20Sopenharmony_citypedef struct _MSG_FW_DOWNLOAD_REPLY 10388c2ecf20Sopenharmony_ci{ 10398c2ecf20Sopenharmony_ci U8 ImageType; /* 00h */ 10408c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 10418c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 10428c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 10438c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 10448c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 10458c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 10468c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 10478c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 10488c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 10498c2ecf20Sopenharmony_ci} MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY, 10508c2ecf20Sopenharmony_ci FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t; 10518c2ecf20Sopenharmony_ci 10528c2ecf20Sopenharmony_ci 10538c2ecf20Sopenharmony_ci/****************************************************************************/ 10548c2ecf20Sopenharmony_ci/* Firmware Upload message and associated structures */ 10558c2ecf20Sopenharmony_ci/****************************************************************************/ 10568c2ecf20Sopenharmony_ci 10578c2ecf20Sopenharmony_citypedef struct _MSG_FW_UPLOAD 10588c2ecf20Sopenharmony_ci{ 10598c2ecf20Sopenharmony_ci U8 ImageType; /* 00h */ 10608c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 10618c2ecf20Sopenharmony_ci U8 ChainOffset; /* 02h */ 10628c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 10638c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 10648c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 10658c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 10668c2ecf20Sopenharmony_ci SGE_MPI_UNION SGL; /* 0Ch */ 10678c2ecf20Sopenharmony_ci} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD, 10688c2ecf20Sopenharmony_ci FWUpload_t, MPI_POINTER pFWUpload_t; 10698c2ecf20Sopenharmony_ci 10708c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00) 10718c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01) 10728c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02) 10738c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03) 10748c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04) 10758c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05) 10768c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06) 10778c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07) 10788c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08) 10798c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09) 10808c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A) 10818c2ecf20Sopenharmony_ci#define MPI_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B) 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_citypedef struct _FWUploadTCSGE 10848c2ecf20Sopenharmony_ci{ 10858c2ecf20Sopenharmony_ci U8 Reserved; /* 00h */ 10868c2ecf20Sopenharmony_ci U8 ContextSize; /* 01h */ 10878c2ecf20Sopenharmony_ci U8 DetailsLength; /* 02h */ 10888c2ecf20Sopenharmony_ci U8 Flags; /* 03h */ 10898c2ecf20Sopenharmony_ci U32 Reserved1; /* 04h */ 10908c2ecf20Sopenharmony_ci U32 ImageOffset; /* 08h */ 10918c2ecf20Sopenharmony_ci U32 ImageSize; /* 0Ch */ 10928c2ecf20Sopenharmony_ci} FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE, 10938c2ecf20Sopenharmony_ci FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t; 10948c2ecf20Sopenharmony_ci 10958c2ecf20Sopenharmony_ci/* Firmware Upload reply */ 10968c2ecf20Sopenharmony_citypedef struct _MSG_FW_UPLOAD_REPLY 10978c2ecf20Sopenharmony_ci{ 10988c2ecf20Sopenharmony_ci U8 ImageType; /* 00h */ 10998c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 11008c2ecf20Sopenharmony_ci U8 MsgLength; /* 02h */ 11018c2ecf20Sopenharmony_ci U8 Function; /* 03h */ 11028c2ecf20Sopenharmony_ci U8 Reserved1[3]; /* 04h */ 11038c2ecf20Sopenharmony_ci U8 MsgFlags; /* 07h */ 11048c2ecf20Sopenharmony_ci U32 MsgContext; /* 08h */ 11058c2ecf20Sopenharmony_ci U16 Reserved2; /* 0Ch */ 11068c2ecf20Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 11078c2ecf20Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 11088c2ecf20Sopenharmony_ci U32 ActualImageSize; /* 14h */ 11098c2ecf20Sopenharmony_ci} MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY, 11108c2ecf20Sopenharmony_ci FWUploadReply_t, MPI_POINTER pFWUploadReply_t; 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_ci 11138c2ecf20Sopenharmony_citypedef struct _MPI_FW_HEADER 11148c2ecf20Sopenharmony_ci{ 11158c2ecf20Sopenharmony_ci U32 ArmBranchInstruction0; /* 00h */ 11168c2ecf20Sopenharmony_ci U32 Signature0; /* 04h */ 11178c2ecf20Sopenharmony_ci U32 Signature1; /* 08h */ 11188c2ecf20Sopenharmony_ci U32 Signature2; /* 0Ch */ 11198c2ecf20Sopenharmony_ci U32 ArmBranchInstruction1; /* 10h */ 11208c2ecf20Sopenharmony_ci U32 ArmBranchInstruction2; /* 14h */ 11218c2ecf20Sopenharmony_ci U32 Reserved; /* 18h */ 11228c2ecf20Sopenharmony_ci U32 Checksum; /* 1Ch */ 11238c2ecf20Sopenharmony_ci U16 VendorId; /* 20h */ 11248c2ecf20Sopenharmony_ci U16 ProductId; /* 22h */ 11258c2ecf20Sopenharmony_ci MPI_FW_VERSION FWVersion; /* 24h */ 11268c2ecf20Sopenharmony_ci U32 SeqCodeVersion; /* 28h */ 11278c2ecf20Sopenharmony_ci U32 ImageSize; /* 2Ch */ 11288c2ecf20Sopenharmony_ci U32 NextImageHeaderOffset; /* 30h */ 11298c2ecf20Sopenharmony_ci U32 LoadStartAddress; /* 34h */ 11308c2ecf20Sopenharmony_ci U32 IopResetVectorValue; /* 38h */ 11318c2ecf20Sopenharmony_ci U32 IopResetRegAddr; /* 3Ch */ 11328c2ecf20Sopenharmony_ci U32 VersionNameWhat; /* 40h */ 11338c2ecf20Sopenharmony_ci U8 VersionName[32]; /* 44h */ 11348c2ecf20Sopenharmony_ci U32 VendorNameWhat; /* 64h */ 11358c2ecf20Sopenharmony_ci U8 VendorName[32]; /* 68h */ 11368c2ecf20Sopenharmony_ci} MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER, 11378c2ecf20Sopenharmony_ci MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t; 11388c2ecf20Sopenharmony_ci 11398c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840) 11408c2ecf20Sopenharmony_ci 11418c2ecf20Sopenharmony_ci/* defines for using the ProductId field */ 11428c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_TYPE_MASK (0xF000) 11438c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000) 11448c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_TYPE_FC (0x1000) 11458c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_TYPE_SAS (0x2000) 11468c2ecf20Sopenharmony_ci 11478c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A) 11488c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5) 11498c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA) 11508c2ecf20Sopenharmony_ci 11518c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_MASK (0x0F00) 11528c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100) 11538c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200) 11548c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300) 11558c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400) 11568c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500) 11578c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600) 11588c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_PROD_IR_SCSI (0x0700) 11598c2ecf20Sopenharmony_ci 11608c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF) 11618c2ecf20Sopenharmony_ci/* SCSI */ 11628c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001) 11638c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002) 11648c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003) 11658c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004) 11668c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005) 11678c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006) 11688c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007) 11698c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008) 11708c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009) 11718c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A) 11728c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B) 11738c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C) 11748c2ecf20Sopenharmony_ci/* Fibre Channel */ 11758c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000) 11768c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) /* 919 and 929 */ 11778c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) /* 919X and 929X */ 11788c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003) /* 919XL and 929XL */ 11798c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_939X_FC (0x0004) /* 939X and 949X */ 11808c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005) 11818c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_949E_FC (0x0006) 11828c2ecf20Sopenharmony_ci/* SAS */ 11838c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001) 11848c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1068_SAS (0x0002) 11858c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_1078_SAS (0x0003) 11868c2ecf20Sopenharmony_ci#define MPI_FW_HEADER_PID_FAMILY_106xE_SAS (0x0004) /* 1068E, 1066E, and 1064E */ 11878c2ecf20Sopenharmony_ci 11888c2ecf20Sopenharmony_citypedef struct _MPI_EXT_IMAGE_HEADER 11898c2ecf20Sopenharmony_ci{ 11908c2ecf20Sopenharmony_ci U8 ImageType; /* 00h */ 11918c2ecf20Sopenharmony_ci U8 Reserved; /* 01h */ 11928c2ecf20Sopenharmony_ci U16 Reserved1; /* 02h */ 11938c2ecf20Sopenharmony_ci U32 Checksum; /* 04h */ 11948c2ecf20Sopenharmony_ci U32 ImageSize; /* 08h */ 11958c2ecf20Sopenharmony_ci U32 NextImageHeaderOffset; /* 0Ch */ 11968c2ecf20Sopenharmony_ci U32 LoadStartAddress; /* 10h */ 11978c2ecf20Sopenharmony_ci U32 Reserved2; /* 14h */ 11988c2ecf20Sopenharmony_ci} MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER, 11998c2ecf20Sopenharmony_ci MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t; 12008c2ecf20Sopenharmony_ci 12018c2ecf20Sopenharmony_ci/* defines for the ImageType field */ 12028c2ecf20Sopenharmony_ci#define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00) 12038c2ecf20Sopenharmony_ci#define MPI_EXT_IMAGE_TYPE_FW (0x01) 12048c2ecf20Sopenharmony_ci#define MPI_EXT_IMAGE_TYPE_NVDATA (0x03) 12058c2ecf20Sopenharmony_ci#define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04) 12068c2ecf20Sopenharmony_ci#define MPI_EXT_IMAGE_TYPE_INITIALIZATION (0x05) 12078c2ecf20Sopenharmony_ci 12088c2ecf20Sopenharmony_ci#endif 1209