18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2000-2020 Broadcom Inc. All rights reserved.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *          Name:  mpi2_cnfg.h
78c2ecf20Sopenharmony_ci *         Title:  MPI Configuration messages and pages
88c2ecf20Sopenharmony_ci * Creation Date:  November 10, 2006
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci *    mpi2_cnfg.h Version:  02.00.47
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
138c2ecf20Sopenharmony_ci *       prefix are for use only on MPI v2.5 products, and must not be used
148c2ecf20Sopenharmony_ci *       with MPI v2.0 products. Unless otherwise noted, names beginning with
158c2ecf20Sopenharmony_ci *       MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * Version History
188c2ecf20Sopenharmony_ci * ---------------
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci * Date      Version   Description
218c2ecf20Sopenharmony_ci * --------  --------  ------------------------------------------------------
228c2ecf20Sopenharmony_ci * 04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
238c2ecf20Sopenharmony_ci * 06-04-07  02.00.01  Added defines for SAS IO Unit Page 2 PhyFlags.
248c2ecf20Sopenharmony_ci *                     Added Manufacturing Page 11.
258c2ecf20Sopenharmony_ci *                     Added MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE
268c2ecf20Sopenharmony_ci *                     define.
278c2ecf20Sopenharmony_ci * 06-26-07  02.00.02  Adding generic structure for product-specific
288c2ecf20Sopenharmony_ci *                     Manufacturing pages: MPI2_CONFIG_PAGE_MANUFACTURING_PS.
298c2ecf20Sopenharmony_ci *                     Rework of BIOS Page 2 configuration page.
308c2ecf20Sopenharmony_ci *                     Fixed MPI2_BIOSPAGE2_BOOT_DEVICE to be a union of the
318c2ecf20Sopenharmony_ci *                     forms.
328c2ecf20Sopenharmony_ci *                     Added configuration pages IOC Page 8 and Driver
338c2ecf20Sopenharmony_ci *                     Persistent Mapping Page 0.
348c2ecf20Sopenharmony_ci * 08-31-07  02.00.03  Modified configuration pages dealing with Integrated
358c2ecf20Sopenharmony_ci *                     RAID (Manufacturing Page 4, RAID Volume Pages 0 and 1,
368c2ecf20Sopenharmony_ci *                     RAID Physical Disk Pages 0 and 1, RAID Configuration
378c2ecf20Sopenharmony_ci *                     Page 0).
388c2ecf20Sopenharmony_ci *                     Added new value for AccessStatus field of SAS Device
398c2ecf20Sopenharmony_ci *                     Page 0 (_SATA_NEEDS_INITIALIZATION).
408c2ecf20Sopenharmony_ci * 10-31-07  02.00.04  Added missing SEPDevHandle field to
418c2ecf20Sopenharmony_ci *                     MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
428c2ecf20Sopenharmony_ci * 12-18-07  02.00.05  Modified IO Unit Page 0 to use 32-bit version fields for
438c2ecf20Sopenharmony_ci *                     NVDATA.
448c2ecf20Sopenharmony_ci *                     Modified IOC Page 7 to use masks and added field for
458c2ecf20Sopenharmony_ci *                     SASBroadcastPrimitiveMasks.
468c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_PAGE_BIOS_4.
478c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_PAGE_LOG_0.
488c2ecf20Sopenharmony_ci * 02-29-08  02.00.06  Modified various names to make them 32-character unique.
498c2ecf20Sopenharmony_ci *                     Added SAS Device IDs.
508c2ecf20Sopenharmony_ci *                     Updated Integrated RAID configuration pages including
518c2ecf20Sopenharmony_ci *                     Manufacturing Page 4, IOC Page 6, and RAID Configuration
528c2ecf20Sopenharmony_ci *                     Page 0.
538c2ecf20Sopenharmony_ci * 05-21-08  02.00.07  Added define MPI2_MANPAGE4_MIX_SSD_SAS_SATA.
548c2ecf20Sopenharmony_ci *                     Added define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION.
558c2ecf20Sopenharmony_ci *                     Fixed define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING.
568c2ecf20Sopenharmony_ci *                     Added missing MaxNumRoutedSasAddresses field to
578c2ecf20Sopenharmony_ci *                     MPI2_CONFIG_PAGE_EXPANDER_0.
588c2ecf20Sopenharmony_ci *                     Added SAS Port Page 0.
598c2ecf20Sopenharmony_ci *                     Modified structure layout for
608c2ecf20Sopenharmony_ci *                     MPI2_CONFIG_PAGE_DRIVER_MAPPING_0.
618c2ecf20Sopenharmony_ci * 06-27-08  02.00.08  Changed MPI2_CONFIG_PAGE_RD_PDISK_1 to use
628c2ecf20Sopenharmony_ci *                     MPI2_RAID_PHYS_DISK1_PATH_MAX to size the array.
638c2ecf20Sopenharmony_ci * 10-02-08  02.00.09  Changed MPI2_RAID_PGAD_CONFIGNUM_MASK from 0x0000FFFF
648c2ecf20Sopenharmony_ci *                     to 0x000000FF.
658c2ecf20Sopenharmony_ci *                     Added two new values for the Physical Disk Coercion Size
668c2ecf20Sopenharmony_ci *                     bits in the Flags field of Manufacturing Page 4.
678c2ecf20Sopenharmony_ci *                     Added product-specific Manufacturing pages 16 to 31.
688c2ecf20Sopenharmony_ci *                     Modified Flags bits for controlling write cache on SATA
698c2ecf20Sopenharmony_ci *                     drives in IO Unit Page 1.
708c2ecf20Sopenharmony_ci *                     Added new bit to AdditionalControlFlags of SAS IO Unit
718c2ecf20Sopenharmony_ci *                     Page 1 to control Invalid Topology Correction.
728c2ecf20Sopenharmony_ci *                     Added additional defines for RAID Volume Page 0
738c2ecf20Sopenharmony_ci *                     VolumeStatusFlags field.
748c2ecf20Sopenharmony_ci *                     Modified meaning of RAID Volume Page 0 VolumeSettings
758c2ecf20Sopenharmony_ci *                     define for auto-configure of hot-swap drives.
768c2ecf20Sopenharmony_ci *                     Added SupportedPhysDisks field to RAID Volume Page 1 and
778c2ecf20Sopenharmony_ci *                     added related defines.
788c2ecf20Sopenharmony_ci *                     Added PhysDiskAttributes field (and related defines) to
798c2ecf20Sopenharmony_ci *                     RAID Physical Disk Page 0.
808c2ecf20Sopenharmony_ci *                     Added MPI2_SAS_PHYINFO_PHY_VACANT define.
818c2ecf20Sopenharmony_ci *                     Added three new DiscoveryStatus bits for SAS IO Unit
828c2ecf20Sopenharmony_ci *                     Page 0 and SAS Expander Page 0.
838c2ecf20Sopenharmony_ci *                     Removed multiplexing information from SAS IO Unit pages.
848c2ecf20Sopenharmony_ci *                     Added BootDeviceWaitTime field to SAS IO Unit Page 4.
858c2ecf20Sopenharmony_ci *                     Removed Zone Address Resolved bit from PhyInfo and from
868c2ecf20Sopenharmony_ci *                     Expander Page 0 Flags field.
878c2ecf20Sopenharmony_ci *                     Added two new AccessStatus values to SAS Device Page 0
888c2ecf20Sopenharmony_ci *                     for indicating routing problems. Added 3 reserved words
898c2ecf20Sopenharmony_ci *                     to this page.
908c2ecf20Sopenharmony_ci * 01-19-09  02.00.10  Fixed defines for GPIOVal field of IO Unit Page 3.
918c2ecf20Sopenharmony_ci *                     Inserted missing reserved field into structure for IOC
928c2ecf20Sopenharmony_ci *                     Page 6.
938c2ecf20Sopenharmony_ci *                     Added more pending task bits to RAID Volume Page 0
948c2ecf20Sopenharmony_ci *                     VolumeStatusFlags defines.
958c2ecf20Sopenharmony_ci *                     Added MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED define.
968c2ecf20Sopenharmony_ci *                     Added a new DiscoveryStatus bit for SAS IO Unit Page 0
978c2ecf20Sopenharmony_ci *                     and SAS Expander Page 0 to flag a downstream initiator
988c2ecf20Sopenharmony_ci *                     when in simplified routing mode.
998c2ecf20Sopenharmony_ci *                     Removed SATA Init Failure defines for DiscoveryStatus
1008c2ecf20Sopenharmony_ci *                     fields of SAS IO Unit Page 0 and SAS Expander Page 0.
1018c2ecf20Sopenharmony_ci *                     Added MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED define.
1028c2ecf20Sopenharmony_ci *                     Added PortGroups, DmaGroup, and ControlGroup fields to
1038c2ecf20Sopenharmony_ci *                     SAS Device Page 0.
1048c2ecf20Sopenharmony_ci * 05-06-09  02.00.11  Added structures and defines for IO Unit Page 5 and IO
1058c2ecf20Sopenharmony_ci *                     Unit Page 6.
1068c2ecf20Sopenharmony_ci *                     Added expander reduced functionality data to SAS
1078c2ecf20Sopenharmony_ci *                     Expander Page 0.
1088c2ecf20Sopenharmony_ci *                     Added SAS PHY Page 2 and SAS PHY Page 3.
1098c2ecf20Sopenharmony_ci * 07-30-09  02.00.12  Added IO Unit Page 7.
1108c2ecf20Sopenharmony_ci *                     Added new device ids.
1118c2ecf20Sopenharmony_ci *                     Added SAS IO Unit Page 5.
1128c2ecf20Sopenharmony_ci *                     Added partial and slumber power management capable flags
1138c2ecf20Sopenharmony_ci *                     to SAS Device Page 0 Flags field.
1148c2ecf20Sopenharmony_ci *                     Added PhyInfo defines for power condition.
1158c2ecf20Sopenharmony_ci *                     Added Ethernet configuration pages.
1168c2ecf20Sopenharmony_ci * 10-28-09  02.00.13  Added MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY.
1178c2ecf20Sopenharmony_ci *                     Added SAS PHY Page 4 structure and defines.
1188c2ecf20Sopenharmony_ci * 02-10-10  02.00.14  Modified the comments for the configuration page
1198c2ecf20Sopenharmony_ci *                     structures that contain an array of data. The host
1208c2ecf20Sopenharmony_ci *                     should use the "count" field in the page data (e.g. the
1218c2ecf20Sopenharmony_ci *                     NumPhys field) to determine the number of valid elements
1228c2ecf20Sopenharmony_ci *                     in the array.
1238c2ecf20Sopenharmony_ci *                     Added/modified some MPI2_MFGPAGE_DEVID_SAS defines.
1248c2ecf20Sopenharmony_ci *                     Added PowerManagementCapabilities to IO Unit Page 7.
1258c2ecf20Sopenharmony_ci *                     Added PortWidthModGroup field to
1268c2ecf20Sopenharmony_ci *                     MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS.
1278c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_PAGE_SASIOUNIT_6 and related defines.
1288c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_PAGE_SASIOUNIT_7 and related defines.
1298c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_PAGE_SASIOUNIT_8 and related defines.
1308c2ecf20Sopenharmony_ci * 05-12-10  02.00.15  Added MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT
1318c2ecf20Sopenharmony_ci *                     define.
1328c2ecf20Sopenharmony_ci *                     Added MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE define.
1338c2ecf20Sopenharmony_ci *                     Added MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY define.
1348c2ecf20Sopenharmony_ci * 08-11-10  02.00.16  Removed IO Unit Page 1 device path (multi-pathing)
1358c2ecf20Sopenharmony_ci *                     defines.
1368c2ecf20Sopenharmony_ci * 11-10-10  02.00.17  Added ReceptacleID field (replacing Reserved1) to
1378c2ecf20Sopenharmony_ci *                     MPI2_MANPAGE7_CONNECTOR_INFO and reworked defines for
1388c2ecf20Sopenharmony_ci *                     the Pinout field.
1398c2ecf20Sopenharmony_ci *                     Added BoardTemperature and BoardTemperatureUnits fields
1408c2ecf20Sopenharmony_ci *                     to MPI2_CONFIG_PAGE_IO_UNIT_7.
1418c2ecf20Sopenharmony_ci *                     Added MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING define
1428c2ecf20Sopenharmony_ci *                     and MPI2_CONFIG_PAGE_EXT_MAN_PS structure.
1438c2ecf20Sopenharmony_ci * 02-23-11  02.00.18  Added ProxyVF_ID field to MPI2_CONFIG_REQUEST.
1448c2ecf20Sopenharmony_ci *                     Added IO Unit Page 8, IO Unit Page 9,
1458c2ecf20Sopenharmony_ci *                     and IO Unit Page 10.
1468c2ecf20Sopenharmony_ci *                     Added SASNotifyPrimitiveMasks field to
1478c2ecf20Sopenharmony_ci *                     MPI2_CONFIG_PAGE_IOC_7.
1488c2ecf20Sopenharmony_ci * 03-09-11  02.00.19  Fixed IO Unit Page 10 (to match the spec).
1498c2ecf20Sopenharmony_ci * 05-25-11  02.00.20  Cleaned up a few comments.
1508c2ecf20Sopenharmony_ci * 08-24-11  02.00.21  Marked the IO Unit Page 7 PowerManagementCapabilities
1518c2ecf20Sopenharmony_ci *                     for PCIe link as obsolete.
1528c2ecf20Sopenharmony_ci *                     Added SpinupFlags field containing a Disable Spin-up bit
1538c2ecf20Sopenharmony_ci *                     to the MPI2_SAS_IOUNIT4_SPINUP_GROUP fields of SAS IO
1548c2ecf20Sopenharmony_ci *                     Unit Page 4.
1558c2ecf20Sopenharmony_ci * 11-18-11  02.00.22  Added define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT.
1568c2ecf20Sopenharmony_ci *                     Added UEFIVersion field to BIOS Page 1 and defined new
1578c2ecf20Sopenharmony_ci *                     BiosOptions bits.
1588c2ecf20Sopenharmony_ci *                     Incorporating additions for MPI v2.5.
1598c2ecf20Sopenharmony_ci * 11-27-12  02.00.23  Added MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER.
1608c2ecf20Sopenharmony_ci *                     Added MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID.
1618c2ecf20Sopenharmony_ci * 12-20-12  02.00.24  Marked MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION as
1628c2ecf20Sopenharmony_ci *                     obsolete for MPI v2.5 and later.
1638c2ecf20Sopenharmony_ci *                     Added some defines for 12G SAS speeds.
1648c2ecf20Sopenharmony_ci * 04-09-13  02.00.25  Added MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK.
1658c2ecf20Sopenharmony_ci *                     Fixed MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS to
1668c2ecf20Sopenharmony_ci *                     match the specification.
1678c2ecf20Sopenharmony_ci * 08-19-13  02.00.26  Added reserved words to MPI2_CONFIG_PAGE_IO_UNIT_7 for
1688c2ecf20Sopenharmony_ci *			future use.
1698c2ecf20Sopenharmony_ci * 12-05-13  02.00.27  Added MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL for
1708c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_MAN_7.
1718c2ecf20Sopenharmony_ci *		       Added EnclosureLevel and ConnectorName fields to
1728c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
1738c2ecf20Sopenharmony_ci *		       Added MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID for
1748c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
1758c2ecf20Sopenharmony_ci *		       Added EnclosureLevel field to
1768c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
1778c2ecf20Sopenharmony_ci *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
1788c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
1798c2ecf20Sopenharmony_ci * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
1808c2ecf20Sopenharmony_ci *		       MPI2_CONFIG_PAGE_BIOS_1.
1818c2ecf20Sopenharmony_ci * 06-13-14  02.00.29  Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
1828c2ecf20Sopenharmony_ci *                     more defines for the BiosOptions field.
1838c2ecf20Sopenharmony_ci * 11-18-14  02.00.30  Updated copyright information.
1848c2ecf20Sopenharmony_ci *                     Added MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG.
1858c2ecf20Sopenharmony_ci *                     Added AdapterOrderAux fields to BIOS Page 3.
1868c2ecf20Sopenharmony_ci * 03-16-15  02.00.31  Updated for MPI v2.6.
1878c2ecf20Sopenharmony_ci *                     Added Flags field to IO Unit Page 7.
1888c2ecf20Sopenharmony_ci *                     Added new SAS Phy Event codes
1898c2ecf20Sopenharmony_ci * 05-25-15  02.00.33  Added more defines for the BiosOptions field of
1908c2ecf20Sopenharmony_ci *                     MPI2_CONFIG_PAGE_BIOS_1.
1918c2ecf20Sopenharmony_ci * 08-25-15  02.00.34  Bumped Header Version.
1928c2ecf20Sopenharmony_ci * 12-18-15  02.00.35  Added SATADeviceWaitTime to SAS IO Unit Page 4.
1938c2ecf20Sopenharmony_ci * 01-21-16  02.00.36  Added/modified MPI2_MFGPAGE_DEVID_SAS defines.
1948c2ecf20Sopenharmony_ci *                     Added Link field to PCIe Link Pages
1958c2ecf20Sopenharmony_ci *                     Added EnclosureLevel and ConnectorName to PCIe
1968c2ecf20Sopenharmony_ci *                     Device Page 0.
1978c2ecf20Sopenharmony_ci *                     Added define for PCIE IoUnit page 1 max rate shift.
1988c2ecf20Sopenharmony_ci *                     Added comment for reserved ExtPageTypes.
1998c2ecf20Sopenharmony_ci *                     Added SAS 4 22.5 gbs speed support.
2008c2ecf20Sopenharmony_ci *                     Added PCIe 4 16.0 GT/sec speec support.
2018c2ecf20Sopenharmony_ci *                     Removed AHCI support.
2028c2ecf20Sopenharmony_ci *                     Removed SOP support.
2038c2ecf20Sopenharmony_ci *                     Added NegotiatedLinkRate and NegotiatedPortWidth to
2048c2ecf20Sopenharmony_ci *                     PCIe device page 0.
2058c2ecf20Sopenharmony_ci * 04-10-16  02.00.37  Fixed MPI2_MFGPAGE_DEVID_SAS3616/3708 defines
2068c2ecf20Sopenharmony_ci * 07-01-16  02.00.38  Added Manufacturing page 7 Connector types.
2078c2ecf20Sopenharmony_ci *                     Changed declaration of ConnectorName in PCIe DevicePage0
2088c2ecf20Sopenharmony_ci *                     to match SAS DevicePage 0.
2098c2ecf20Sopenharmony_ci *                     Added SATADeviceWaitTime to IO Unit Page 11.
2108c2ecf20Sopenharmony_ci *                     Added MPI26_MFGPAGE_DEVID_SAS4008
2118c2ecf20Sopenharmony_ci *                     Added x16 PCIe width to IO Unit Page 7
2128c2ecf20Sopenharmony_ci *                     Added LINKFLAGS to control SRIS in PCIe IO Unit page 1
2138c2ecf20Sopenharmony_ci *                     phy data.
2148c2ecf20Sopenharmony_ci *                     Added InitStatus to PCIe IO Unit Page 1 header.
2158c2ecf20Sopenharmony_ci * 09-01-16  02.00.39  Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related defines.
2168c2ecf20Sopenharmony_ci *                     Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and
2178c2ecf20Sopenharmony_ci *                     MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats.
2188c2ecf20Sopenharmony_ci * 02-02-17  02.00.40  Added MPI2_MANPAGE7_SLOT_UNKNOWN.
2198c2ecf20Sopenharmony_ci *                     Added ChassisSlot field to SAS Enclosure Page 0.
2208c2ecf20Sopenharmony_ci *                     Added ChassisSlot Valid bit (bit 5) to the Flags field
2218c2ecf20Sopenharmony_ci *                     in SAS Enclosure Page 0.
2228c2ecf20Sopenharmony_ci * 06-13-17  02.00.41  Added MPI26_MFGPAGE_DEVID_SAS3816 and
2238c2ecf20Sopenharmony_ci *                     MPI26_MFGPAGE_DEVID_SAS3916 defines.
2248c2ecf20Sopenharmony_ci *                     Removed MPI26_MFGPAGE_DEVID_SAS4008 define.
2258c2ecf20Sopenharmony_ci *                     Added MPI26_PCIEIOUNIT1_LINKFLAGS_SRNS_EN define.
2268c2ecf20Sopenharmony_ci *                     Renamed PI26_PCIEIOUNIT1_LINKFLAGS_EN_SRIS to
2278c2ecf20Sopenharmony_ci *                     PI26_PCIEIOUNIT1_LINKFLAGS_SRIS_EN.
2288c2ecf20Sopenharmony_ci *                     Renamed MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SRIS to
2298c2ecf20Sopenharmony_ci *                     MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SEPARATE_REFCLK.
2308c2ecf20Sopenharmony_ci * 09-29-17  02.00.42  Added ControllerResetTO field to PCIe Device Page 2.
2318c2ecf20Sopenharmony_ci *                     Added NOIOB field to PCIe Device Page 2.
2328c2ecf20Sopenharmony_ci *                     Added MPI26_PCIEDEV2_CAP_DATA_BLK_ALIGN_AND_GRAN to
2338c2ecf20Sopenharmony_ci *                     the Capabilities field of PCIe Device Page 2.
2348c2ecf20Sopenharmony_ci * 07-22-18  02.00.43  Added defines for SAS3916 and SAS3816.
2358c2ecf20Sopenharmony_ci *                     Added WRiteCache defines to IO Unit Page 1.
2368c2ecf20Sopenharmony_ci *                     Added MaxEnclosureLevel to BIOS Page 1.
2378c2ecf20Sopenharmony_ci *                     Added OEMRD to SAS Enclosure Page 1.
2388c2ecf20Sopenharmony_ci *                     Added DMDReportPCIe to PCIe IO Unit Page 1.
2398c2ecf20Sopenharmony_ci *                     Added Flags field and flags for Retimers to
2408c2ecf20Sopenharmony_ci *                     PCIe Switch Page 1.
2418c2ecf20Sopenharmony_ci * 08-02-18  02.00.44  Added Slotx2, Slotx4 to ManPage 7.
2428c2ecf20Sopenharmony_ci * 08-15-18  02.00.45  Added ProductSpecific field at end of IOC Page 1
2438c2ecf20Sopenharmony_ci * 08-28-18  02.00.46  Added NVMs Write Cache flag to IOUnitPage1
2448c2ecf20Sopenharmony_ci *                     Added DMDReport Delay Time defines to
2458c2ecf20Sopenharmony_ci *                     PCIeIOUnitPage1
2468c2ecf20Sopenharmony_ci * --------------------------------------------------------------------------
2478c2ecf20Sopenharmony_ci * 08-02-18  02.00.44  Added Slotx2, Slotx4 to ManPage 7.
2488c2ecf20Sopenharmony_ci * 08-15-18  02.00.45  Added ProductSpecific field at end of IOC Page 1
2498c2ecf20Sopenharmony_ci * 08-28-18  02.00.46  Added NVMs Write Cache flag to IOUnitPage1
2508c2ecf20Sopenharmony_ci *                     Added DMDReport Delay Time defines to PCIeIOUnitPage1
2518c2ecf20Sopenharmony_ci * 12-17-18  02.00.47  Swap locations of Slotx2 and Slotx4 in ManPage 7.
2528c2ecf20Sopenharmony_ci * 08-01-19  02.00.49  Add MPI26_MANPAGE7_FLAG_X2_X4_SLOT_INFO_VALID
2538c2ecf20Sopenharmony_ci *                     Add MPI26_IOUNITPAGE1_NVME_WRCACHE_SHIFT
2548c2ecf20Sopenharmony_ci */
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_ci#ifndef MPI2_CNFG_H
2578c2ecf20Sopenharmony_ci#define MPI2_CNFG_H
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci/*****************************************************************************
2608c2ecf20Sopenharmony_ci*  Configuration Page Header and defines
2618c2ecf20Sopenharmony_ci*****************************************************************************/
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_ci/*Config Page Header */
2648c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_HEADER {
2658c2ecf20Sopenharmony_ci	U8                 PageVersion;                /*0x00 */
2668c2ecf20Sopenharmony_ci	U8                 PageLength;                 /*0x01 */
2678c2ecf20Sopenharmony_ci	U8                 PageNumber;                 /*0x02 */
2688c2ecf20Sopenharmony_ci	U8                 PageType;                   /*0x03 */
2698c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_HEADER, *PTR_MPI2_CONFIG_PAGE_HEADER,
2708c2ecf20Sopenharmony_ci	Mpi2ConfigPageHeader_t, *pMpi2ConfigPageHeader_t;
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_citypedef union _MPI2_CONFIG_PAGE_HEADER_UNION {
2738c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER  Struct;
2748c2ecf20Sopenharmony_ci	U8                       Bytes[4];
2758c2ecf20Sopenharmony_ci	U16                      Word16[2];
2768c2ecf20Sopenharmony_ci	U32                      Word32;
2778c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_HEADER_UNION, *PTR_MPI2_CONFIG_PAGE_HEADER_UNION,
2788c2ecf20Sopenharmony_ci	Mpi2ConfigPageHeaderUnion, *pMpi2ConfigPageHeaderUnion;
2798c2ecf20Sopenharmony_ci
2808c2ecf20Sopenharmony_ci/*Extended Config Page Header */
2818c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_EXTENDED_PAGE_HEADER {
2828c2ecf20Sopenharmony_ci	U8                  PageVersion;                /*0x00 */
2838c2ecf20Sopenharmony_ci	U8                  Reserved1;                  /*0x01 */
2848c2ecf20Sopenharmony_ci	U8                  PageNumber;                 /*0x02 */
2858c2ecf20Sopenharmony_ci	U8                  PageType;                   /*0x03 */
2868c2ecf20Sopenharmony_ci	U16                 ExtPageLength;              /*0x04 */
2878c2ecf20Sopenharmony_ci	U8                  ExtPageType;                /*0x06 */
2888c2ecf20Sopenharmony_ci	U8                  Reserved2;                  /*0x07 */
2898c2ecf20Sopenharmony_ci} MPI2_CONFIG_EXTENDED_PAGE_HEADER,
2908c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_EXTENDED_PAGE_HEADER,
2918c2ecf20Sopenharmony_ci	Mpi2ConfigExtendedPageHeader_t,
2928c2ecf20Sopenharmony_ci	*pMpi2ConfigExtendedPageHeader_t;
2938c2ecf20Sopenharmony_ci
2948c2ecf20Sopenharmony_citypedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION {
2958c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER          Struct;
2968c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER Ext;
2978c2ecf20Sopenharmony_ci	U8                               Bytes[8];
2988c2ecf20Sopenharmony_ci	U16                              Word16[4];
2998c2ecf20Sopenharmony_ci	U32                              Word32[2];
3008c2ecf20Sopenharmony_ci} MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
3018c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
3028c2ecf20Sopenharmony_ci	Mpi2ConfigPageExtendedHeaderUnion,
3038c2ecf20Sopenharmony_ci	*pMpi2ConfigPageExtendedHeaderUnion;
3048c2ecf20Sopenharmony_ci
3058c2ecf20Sopenharmony_ci
3068c2ecf20Sopenharmony_ci/*PageType field values */
3078c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGEATTR_READ_ONLY              (0x00)
3088c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGEATTR_CHANGEABLE             (0x10)
3098c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGEATTR_PERSISTENT             (0x20)
3108c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGEATTR_MASK                   (0xF0)
3118c2ecf20Sopenharmony_ci
3128c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_IO_UNIT                (0x00)
3138c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_IOC                    (0x01)
3148c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_BIOS                   (0x02)
3158c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_RAID_VOLUME            (0x08)
3168c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_MANUFACTURING          (0x09)
3178c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_RAID_PHYSDISK          (0x0A)
3188c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_EXTENDED               (0x0F)
3198c2ecf20Sopenharmony_ci#define MPI2_CONFIG_PAGETYPE_MASK                   (0x0F)
3208c2ecf20Sopenharmony_ci
3218c2ecf20Sopenharmony_ci#define MPI2_CONFIG_TYPENUM_MASK                    (0x0FFF)
3228c2ecf20Sopenharmony_ci
3238c2ecf20Sopenharmony_ci
3248c2ecf20Sopenharmony_ci/*ExtPageType field values */
3258c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_SAS_IO_UNIT         (0x10)
3268c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_SAS_EXPANDER        (0x11)
3278c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_SAS_DEVICE          (0x12)
3288c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_SAS_PHY             (0x13)
3298c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_LOG                 (0x14)
3308c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_ENCLOSURE           (0x15)
3318c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_RAID_CONFIG         (0x16)
3328c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_DRIVER_MAPPING      (0x17)
3338c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT            (0x18)
3348c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_ETHERNET            (0x19)
3358c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING   (0x1A)
3368c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT        (0x1B)
3378c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH         (0x1C)
3388c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE         (0x1D)
3398c2ecf20Sopenharmony_ci#define MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK           (0x1E)
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci
3428c2ecf20Sopenharmony_ci/*****************************************************************************
3438c2ecf20Sopenharmony_ci*  PageAddress defines
3448c2ecf20Sopenharmony_ci*****************************************************************************/
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci/*RAID Volume PageAddress format */
3478c2ecf20Sopenharmony_ci#define MPI2_RAID_VOLUME_PGAD_FORM_MASK             (0xF0000000)
3488c2ecf20Sopenharmony_ci#define MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE  (0x00000000)
3498c2ecf20Sopenharmony_ci#define MPI2_RAID_VOLUME_PGAD_FORM_HANDLE           (0x10000000)
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_ci#define MPI2_RAID_VOLUME_PGAD_HANDLE_MASK           (0x0000FFFF)
3528c2ecf20Sopenharmony_ci
3538c2ecf20Sopenharmony_ci
3548c2ecf20Sopenharmony_ci/*RAID Physical Disk PageAddress format */
3558c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_FORM_MASK                    (0xF0000000)
3568c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_FORM_GET_NEXT_PHYSDISKNUM    (0x00000000)
3578c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_FORM_PHYSDISKNUM             (0x10000000)
3588c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_FORM_DEVHANDLE               (0x20000000)
3598c2ecf20Sopenharmony_ci
3608c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_PHYSDISKNUM_MASK             (0x000000FF)
3618c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK_PGAD_DEVHANDLE_MASK               (0x0000FFFF)
3628c2ecf20Sopenharmony_ci
3638c2ecf20Sopenharmony_ci
3648c2ecf20Sopenharmony_ci/*SAS Expander PageAddress format */
3658c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_FORM_MASK              (0xF0000000)
3668c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL     (0x00000000)
3678c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL_PHY_NUM      (0x10000000)
3688c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL              (0x20000000)
3698c2ecf20Sopenharmony_ci
3708c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_HANDLE_MASK            (0x0000FFFF)
3718c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_PHYNUM_MASK            (0x00FF0000)
3728c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPAND_PGAD_PHYNUM_SHIFT           (16)
3738c2ecf20Sopenharmony_ci
3748c2ecf20Sopenharmony_ci
3758c2ecf20Sopenharmony_ci/*SAS Device PageAddress format */
3768c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE_PGAD_FORM_MASK              (0xF0000000)
3778c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE   (0x00000000)
3788c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE_PGAD_FORM_HANDLE            (0x20000000)
3798c2ecf20Sopenharmony_ci
3808c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE_PGAD_HANDLE_MASK            (0x0000FFFF)
3818c2ecf20Sopenharmony_ci
3828c2ecf20Sopenharmony_ci
3838c2ecf20Sopenharmony_ci/*SAS PHY PageAddress format */
3848c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY_PGAD_FORM_MASK                 (0xF0000000)
3858c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY_PGAD_FORM_PHY_NUMBER           (0x00000000)
3868c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY_PGAD_FORM_PHY_TBL_INDEX        (0x10000000)
3878c2ecf20Sopenharmony_ci
3888c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY_PGAD_PHY_NUMBER_MASK           (0x000000FF)
3898c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY_PGAD_PHY_TBL_INDEX_MASK        (0x0000FFFF)
3908c2ecf20Sopenharmony_ci
3918c2ecf20Sopenharmony_ci
3928c2ecf20Sopenharmony_ci/*SAS Port PageAddress format */
3938c2ecf20Sopenharmony_ci#define MPI2_SASPORT_PGAD_FORM_MASK                 (0xF0000000)
3948c2ecf20Sopenharmony_ci#define MPI2_SASPORT_PGAD_FORM_GET_NEXT_PORT        (0x00000000)
3958c2ecf20Sopenharmony_ci#define MPI2_SASPORT_PGAD_FORM_PORT_NUM             (0x10000000)
3968c2ecf20Sopenharmony_ci
3978c2ecf20Sopenharmony_ci#define MPI2_SASPORT_PGAD_PORTNUMBER_MASK           (0x00000FFF)
3988c2ecf20Sopenharmony_ci
3998c2ecf20Sopenharmony_ci
4008c2ecf20Sopenharmony_ci/*SAS Enclosure PageAddress format */
4018c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLOS_PGAD_FORM_MASK              (0xF0000000)
4028c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE   (0x00000000)
4038c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE            (0x10000000)
4048c2ecf20Sopenharmony_ci
4058c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK            (0x0000FFFF)
4068c2ecf20Sopenharmony_ci
4078c2ecf20Sopenharmony_ci/*Enclosure PageAddress format */
4088c2ecf20Sopenharmony_ci#define MPI26_ENCLOS_PGAD_FORM_MASK                 (0xF0000000)
4098c2ecf20Sopenharmony_ci#define MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE      (0x00000000)
4108c2ecf20Sopenharmony_ci#define MPI26_ENCLOS_PGAD_FORM_HANDLE               (0x10000000)
4118c2ecf20Sopenharmony_ci
4128c2ecf20Sopenharmony_ci#define MPI26_ENCLOS_PGAD_HANDLE_MASK               (0x0000FFFF)
4138c2ecf20Sopenharmony_ci
4148c2ecf20Sopenharmony_ci/*RAID Configuration PageAddress format */
4158c2ecf20Sopenharmony_ci#define MPI2_RAID_PGAD_FORM_MASK                    (0xF0000000)
4168c2ecf20Sopenharmony_ci#define MPI2_RAID_PGAD_FORM_GET_NEXT_CONFIGNUM      (0x00000000)
4178c2ecf20Sopenharmony_ci#define MPI2_RAID_PGAD_FORM_CONFIGNUM               (0x10000000)
4188c2ecf20Sopenharmony_ci#define MPI2_RAID_PGAD_FORM_ACTIVE_CONFIG           (0x20000000)
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_ci#define MPI2_RAID_PGAD_CONFIGNUM_MASK               (0x000000FF)
4218c2ecf20Sopenharmony_ci
4228c2ecf20Sopenharmony_ci
4238c2ecf20Sopenharmony_ci/*Driver Persistent Mapping PageAddress format */
4248c2ecf20Sopenharmony_ci#define MPI2_DPM_PGAD_FORM_MASK                     (0xF0000000)
4258c2ecf20Sopenharmony_ci#define MPI2_DPM_PGAD_FORM_ENTRY_RANGE              (0x00000000)
4268c2ecf20Sopenharmony_ci
4278c2ecf20Sopenharmony_ci#define MPI2_DPM_PGAD_ENTRY_COUNT_MASK              (0x0FFF0000)
4288c2ecf20Sopenharmony_ci#define MPI2_DPM_PGAD_ENTRY_COUNT_SHIFT             (16)
4298c2ecf20Sopenharmony_ci#define MPI2_DPM_PGAD_START_ENTRY_MASK              (0x0000FFFF)
4308c2ecf20Sopenharmony_ci
4318c2ecf20Sopenharmony_ci
4328c2ecf20Sopenharmony_ci/*Ethernet PageAddress format */
4338c2ecf20Sopenharmony_ci#define MPI2_ETHERNET_PGAD_FORM_MASK                (0xF0000000)
4348c2ecf20Sopenharmony_ci#define MPI2_ETHERNET_PGAD_FORM_IF_NUM              (0x00000000)
4358c2ecf20Sopenharmony_ci
4368c2ecf20Sopenharmony_ci#define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK           (0x000000FF)
4378c2ecf20Sopenharmony_ci
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci/*PCIe Switch PageAddress format */
4408c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_FORM_MASK            (0xF0000000)
4418c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HNDL   (0x00000000)
4428c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_FORM_HNDL_PORTNUM    (0x10000000)
4438c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_EXPAND_PGAD_FORM_HNDL     (0x20000000)
4448c2ecf20Sopenharmony_ci
4458c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_HANDLE_MASK          (0x0000FFFF)
4468c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_MASK         (0x00FF0000)
4478c2ecf20Sopenharmony_ci#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_SHIFT        (16)
4488c2ecf20Sopenharmony_ci
4498c2ecf20Sopenharmony_ci
4508c2ecf20Sopenharmony_ci/*PCIe Device PageAddress format */
4518c2ecf20Sopenharmony_ci#define MPI26_PCIE_DEVICE_PGAD_FORM_MASK            (0xF0000000)
4528c2ecf20Sopenharmony_ci#define MPI26_PCIE_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
4538c2ecf20Sopenharmony_ci#define MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE          (0x20000000)
4548c2ecf20Sopenharmony_ci
4558c2ecf20Sopenharmony_ci#define MPI26_PCIE_DEVICE_PGAD_HANDLE_MASK          (0x0000FFFF)
4568c2ecf20Sopenharmony_ci
4578c2ecf20Sopenharmony_ci/*PCIe Link PageAddress format */
4588c2ecf20Sopenharmony_ci#define MPI26_PCIE_LINK_PGAD_FORM_MASK            (0xF0000000)
4598c2ecf20Sopenharmony_ci#define MPI26_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK   (0x00000000)
4608c2ecf20Sopenharmony_ci#define MPI26_PCIE_LINK_PGAD_FORM_LINK_NUM        (0x10000000)
4618c2ecf20Sopenharmony_ci
4628c2ecf20Sopenharmony_ci#define MPI26_PCIE_DEVICE_PGAD_LINKNUM_MASK       (0x000000FF)
4638c2ecf20Sopenharmony_ci
4648c2ecf20Sopenharmony_ci
4658c2ecf20Sopenharmony_ci
4668c2ecf20Sopenharmony_ci/****************************************************************************
4678c2ecf20Sopenharmony_ci*  Configuration messages
4688c2ecf20Sopenharmony_ci****************************************************************************/
4698c2ecf20Sopenharmony_ci
4708c2ecf20Sopenharmony_ci/*Configuration Request Message */
4718c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_REQUEST {
4728c2ecf20Sopenharmony_ci	U8                      Action;                     /*0x00 */
4738c2ecf20Sopenharmony_ci	U8                      SGLFlags;                   /*0x01 */
4748c2ecf20Sopenharmony_ci	U8                      ChainOffset;                /*0x02 */
4758c2ecf20Sopenharmony_ci	U8                      Function;                   /*0x03 */
4768c2ecf20Sopenharmony_ci	U16                     ExtPageLength;              /*0x04 */
4778c2ecf20Sopenharmony_ci	U8                      ExtPageType;                /*0x06 */
4788c2ecf20Sopenharmony_ci	U8                      MsgFlags;                   /*0x07 */
4798c2ecf20Sopenharmony_ci	U8                      VP_ID;                      /*0x08 */
4808c2ecf20Sopenharmony_ci	U8                      VF_ID;                      /*0x09 */
4818c2ecf20Sopenharmony_ci	U16                     Reserved1;                  /*0x0A */
4828c2ecf20Sopenharmony_ci	U8                      Reserved2;                  /*0x0C */
4838c2ecf20Sopenharmony_ci	U8                      ProxyVF_ID;                 /*0x0D */
4848c2ecf20Sopenharmony_ci	U16                     Reserved4;                  /*0x0E */
4858c2ecf20Sopenharmony_ci	U32                     Reserved3;                  /*0x10 */
4868c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x14 */
4878c2ecf20Sopenharmony_ci	U32                     PageAddress;                /*0x18 */
4888c2ecf20Sopenharmony_ci	MPI2_SGE_IO_UNION       PageBufferSGE;              /*0x1C */
4898c2ecf20Sopenharmony_ci} MPI2_CONFIG_REQUEST, *PTR_MPI2_CONFIG_REQUEST,
4908c2ecf20Sopenharmony_ci	Mpi2ConfigRequest_t, *pMpi2ConfigRequest_t;
4918c2ecf20Sopenharmony_ci
4928c2ecf20Sopenharmony_ci/*values for the Action field */
4938c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_HEADER              (0x00)
4948c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_READ_CURRENT        (0x01)
4958c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_WRITE_CURRENT       (0x02)
4968c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_DEFAULT             (0x03)
4978c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_WRITE_NVRAM         (0x04)
4988c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_READ_DEFAULT        (0x05)
4998c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_READ_NVRAM          (0x06)
5008c2ecf20Sopenharmony_ci#define MPI2_CONFIG_ACTION_PAGE_GET_CHANGEABLE      (0x07)
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
5038c2ecf20Sopenharmony_ci
5048c2ecf20Sopenharmony_ci
5058c2ecf20Sopenharmony_ci/*Config Reply Message */
5068c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_REPLY {
5078c2ecf20Sopenharmony_ci	U8                      Action;                     /*0x00 */
5088c2ecf20Sopenharmony_ci	U8                      SGLFlags;                   /*0x01 */
5098c2ecf20Sopenharmony_ci	U8                      MsgLength;                  /*0x02 */
5108c2ecf20Sopenharmony_ci	U8                      Function;                   /*0x03 */
5118c2ecf20Sopenharmony_ci	U16                     ExtPageLength;              /*0x04 */
5128c2ecf20Sopenharmony_ci	U8                      ExtPageType;                /*0x06 */
5138c2ecf20Sopenharmony_ci	U8                      MsgFlags;                   /*0x07 */
5148c2ecf20Sopenharmony_ci	U8                      VP_ID;                      /*0x08 */
5158c2ecf20Sopenharmony_ci	U8                      VF_ID;                      /*0x09 */
5168c2ecf20Sopenharmony_ci	U16                     Reserved1;                  /*0x0A */
5178c2ecf20Sopenharmony_ci	U16                     Reserved2;                  /*0x0C */
5188c2ecf20Sopenharmony_ci	U16                     IOCStatus;                  /*0x0E */
5198c2ecf20Sopenharmony_ci	U32                     IOCLogInfo;                 /*0x10 */
5208c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x14 */
5218c2ecf20Sopenharmony_ci} MPI2_CONFIG_REPLY, *PTR_MPI2_CONFIG_REPLY,
5228c2ecf20Sopenharmony_ci	Mpi2ConfigReply_t, *pMpi2ConfigReply_t;
5238c2ecf20Sopenharmony_ci
5248c2ecf20Sopenharmony_ci
5258c2ecf20Sopenharmony_ci
5268c2ecf20Sopenharmony_ci/*****************************************************************************
5278c2ecf20Sopenharmony_ci*
5288c2ecf20Sopenharmony_ci*              C o n f i g u r a t i o n    P a g e s
5298c2ecf20Sopenharmony_ci*
5308c2ecf20Sopenharmony_ci*****************************************************************************/
5318c2ecf20Sopenharmony_ci
5328c2ecf20Sopenharmony_ci/****************************************************************************
5338c2ecf20Sopenharmony_ci*  Manufacturing Config pages
5348c2ecf20Sopenharmony_ci****************************************************************************/
5358c2ecf20Sopenharmony_ci
5368c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_VENDORID_LSI                   (0x1000)
5378c2ecf20Sopenharmony_ci
5388c2ecf20Sopenharmony_ci/*MPI v2.0 SAS products */
5398c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2004                  (0x0070)
5408c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2008                  (0x0072)
5418c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2108_1                (0x0074)
5428c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2108_2                (0x0076)
5438c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2108_3                (0x0077)
5448c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2116_1                (0x0064)
5458c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2116_2                (0x0065)
5468c2ecf20Sopenharmony_ci
5478c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SSS6200                  (0x007E)
5488c2ecf20Sopenharmony_ci
5498c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_1                (0x0080)
5508c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_2                (0x0081)
5518c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_3                (0x0082)
5528c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_4                (0x0083)
5538c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_5                (0x0084)
5548c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2208_6                (0x0085)
5558c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2308_1                (0x0086)
5568c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2308_2                (0x0087)
5578c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SAS2308_3                (0x006E)
5588c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SWITCH_MPI_EP            (0x02B0)
5598c2ecf20Sopenharmony_ci#define MPI2_MFGPAGE_DEVID_SWITCH_MPI_EP_1          (0x02B1)
5608c2ecf20Sopenharmony_ci
5618c2ecf20Sopenharmony_ci/*MPI v2.5 SAS products */
5628c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3004                 (0x0096)
5638c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3008                 (0x0097)
5648c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3108_1               (0x0090)
5658c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3108_2               (0x0091)
5668c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3108_5               (0x0094)
5678c2ecf20Sopenharmony_ci#define MPI25_MFGPAGE_DEVID_SAS3108_6               (0x0095)
5688c2ecf20Sopenharmony_ci
5698c2ecf20Sopenharmony_ci/* MPI v2.6 SAS Products */
5708c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3216                 (0x00C9)
5718c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3224                 (0x00C4)
5728c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3316_1               (0x00C5)
5738c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3316_2               (0x00C6)
5748c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3316_3               (0x00C7)
5758c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3316_4               (0x00C8)
5768c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3324_1               (0x00C0)
5778c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3324_2               (0x00C1)
5788c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3324_3               (0x00C2)
5798c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3324_4               (0x00C3)
5808c2ecf20Sopenharmony_ci
5818c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3516                 (0x00AA)
5828c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3516_1               (0x00AB)
5838c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3416                 (0x00AC)
5848c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3508                 (0x00AD)
5858c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3508_1               (0x00AE)
5868c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3408                 (0x00AF)
5878c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3716                 (0x00D0)
5888c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3616                 (0x00D1)
5898c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SAS3708                 (0x00D2)
5908c2ecf20Sopenharmony_ci
5918c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SEC_MASK_3916           (0x0003)
5928c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_INVALID0_3916           (0x00E0)
5938c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_CFG_SEC_3916            (0x00E1)
5948c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_HARD_SEC_3916           (0x00E2)
5958c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_INVALID1_3916           (0x00E3)
5968c2ecf20Sopenharmony_ci
5978c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_SEC_MASK_3816           (0x0003)
5988c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_INVALID0_3816           (0x00E4)
5998c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_CFG_SEC_3816            (0x00E5)
6008c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_HARD_SEC_3816           (0x00E6)
6018c2ecf20Sopenharmony_ci#define MPI26_MFGPAGE_DEVID_INVALID1_3816           (0x00E7)
6028c2ecf20Sopenharmony_ci
6038c2ecf20Sopenharmony_ci
6048c2ecf20Sopenharmony_ci/*Manufacturing Page 0 */
6058c2ecf20Sopenharmony_ci
6068c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_0 {
6078c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
6088c2ecf20Sopenharmony_ci	U8                      ChipName[16];               /*0x04 */
6098c2ecf20Sopenharmony_ci	U8                      ChipRevision[8];            /*0x14 */
6108c2ecf20Sopenharmony_ci	U8                      BoardName[16];              /*0x1C */
6118c2ecf20Sopenharmony_ci	U8                      BoardAssembly[16];          /*0x2C */
6128c2ecf20Sopenharmony_ci	U8                      BoardTracerNumber[16];      /*0x3C */
6138c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_0,
6148c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_0,
6158c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage0_t,
6168c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage0_t;
6178c2ecf20Sopenharmony_ci
6188c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING0_PAGEVERSION                (0x00)
6198c2ecf20Sopenharmony_ci
6208c2ecf20Sopenharmony_ci
6218c2ecf20Sopenharmony_ci/*Manufacturing Page 1 */
6228c2ecf20Sopenharmony_ci
6238c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_1 {
6248c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
6258c2ecf20Sopenharmony_ci	U8                      VPD[256];                   /*0x04 */
6268c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_1,
6278c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_1,
6288c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage1_t,
6298c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage1_t;
6308c2ecf20Sopenharmony_ci
6318c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING1_PAGEVERSION                (0x00)
6328c2ecf20Sopenharmony_ci
6338c2ecf20Sopenharmony_ci
6348c2ecf20Sopenharmony_citypedef struct _MPI2_CHIP_REVISION_ID {
6358c2ecf20Sopenharmony_ci	U16 DeviceID;                                       /*0x00 */
6368c2ecf20Sopenharmony_ci	U8  PCIRevisionID;                                  /*0x02 */
6378c2ecf20Sopenharmony_ci	U8  Reserved;                                       /*0x03 */
6388c2ecf20Sopenharmony_ci} MPI2_CHIP_REVISION_ID, *PTR_MPI2_CHIP_REVISION_ID,
6398c2ecf20Sopenharmony_ci	Mpi2ChipRevisionId_t, *pMpi2ChipRevisionId_t;
6408c2ecf20Sopenharmony_ci
6418c2ecf20Sopenharmony_ci
6428c2ecf20Sopenharmony_ci/*Manufacturing Page 2 */
6438c2ecf20Sopenharmony_ci
6448c2ecf20Sopenharmony_ci/*
6458c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
6468c2ecf20Sopenharmony_ci *one and check Header.PageLength at runtime.
6478c2ecf20Sopenharmony_ci */
6488c2ecf20Sopenharmony_ci#ifndef MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS
6498c2ecf20Sopenharmony_ci#define MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS   (1)
6508c2ecf20Sopenharmony_ci#endif
6518c2ecf20Sopenharmony_ci
6528c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_2 {
6538c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
6548c2ecf20Sopenharmony_ci	MPI2_CHIP_REVISION_ID   ChipId;                     /*0x04 */
6558c2ecf20Sopenharmony_ci	U32
6568c2ecf20Sopenharmony_ci		HwSettings[MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS];/*0x08 */
6578c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_2,
6588c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_2,
6598c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage2_t,
6608c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage2_t;
6618c2ecf20Sopenharmony_ci
6628c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING2_PAGEVERSION                 (0x00)
6638c2ecf20Sopenharmony_ci
6648c2ecf20Sopenharmony_ci
6658c2ecf20Sopenharmony_ci/*Manufacturing Page 3 */
6668c2ecf20Sopenharmony_ci
6678c2ecf20Sopenharmony_ci/*
6688c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
6698c2ecf20Sopenharmony_ci *one and check Header.PageLength at runtime.
6708c2ecf20Sopenharmony_ci */
6718c2ecf20Sopenharmony_ci#ifndef MPI2_MAN_PAGE_3_INFO_WORDS
6728c2ecf20Sopenharmony_ci#define MPI2_MAN_PAGE_3_INFO_WORDS          (1)
6738c2ecf20Sopenharmony_ci#endif
6748c2ecf20Sopenharmony_ci
6758c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_3 {
6768c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER             Header;         /*0x00 */
6778c2ecf20Sopenharmony_ci	MPI2_CHIP_REVISION_ID               ChipId;         /*0x04 */
6788c2ecf20Sopenharmony_ci	U32
6798c2ecf20Sopenharmony_ci		Info[MPI2_MAN_PAGE_3_INFO_WORDS];/*0x08 */
6808c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_3,
6818c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_3,
6828c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage3_t,
6838c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage3_t;
6848c2ecf20Sopenharmony_ci
6858c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING3_PAGEVERSION                 (0x00)
6868c2ecf20Sopenharmony_ci
6878c2ecf20Sopenharmony_ci
6888c2ecf20Sopenharmony_ci/*Manufacturing Page 4 */
6898c2ecf20Sopenharmony_ci
6908c2ecf20Sopenharmony_citypedef struct _MPI2_MANPAGE4_PWR_SAVE_SETTINGS {
6918c2ecf20Sopenharmony_ci	U8                          PowerSaveFlags;                 /*0x00 */
6928c2ecf20Sopenharmony_ci	U8                          InternalOperationsSleepTime;    /*0x01 */
6938c2ecf20Sopenharmony_ci	U8                          InternalOperationsRunTime;      /*0x02 */
6948c2ecf20Sopenharmony_ci	U8                          HostIdleTime;                   /*0x03 */
6958c2ecf20Sopenharmony_ci} MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
6968c2ecf20Sopenharmony_ci	*PTR_MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
6978c2ecf20Sopenharmony_ci	Mpi2ManPage4PwrSaveSettings_t,
6988c2ecf20Sopenharmony_ci	*pMpi2ManPage4PwrSaveSettings_t;
6998c2ecf20Sopenharmony_ci
7008c2ecf20Sopenharmony_ci/*defines for the PowerSaveFlags field */
7018c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_MASK_POWERSAVE_MODE               (0x03)
7028c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_POWERSAVE_MODE_DISABLED           (0x00)
7038c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_CUSTOM_POWERSAVE_MODE             (0x01)
7048c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_FULL_POWERSAVE_MODE               (0x02)
7058c2ecf20Sopenharmony_ci
7068c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_4 {
7078c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER             Header;                 /*0x00 */
7088c2ecf20Sopenharmony_ci	U32                                 Reserved1;              /*0x04 */
7098c2ecf20Sopenharmony_ci	U32                                 Flags;                  /*0x08 */
7108c2ecf20Sopenharmony_ci	U8                                  InquirySize;            /*0x0C */
7118c2ecf20Sopenharmony_ci	U8                                  Reserved2;              /*0x0D */
7128c2ecf20Sopenharmony_ci	U16                                 Reserved3;              /*0x0E */
7138c2ecf20Sopenharmony_ci	U8                                  InquiryData[56];        /*0x10 */
7148c2ecf20Sopenharmony_ci	U32                                 RAID0VolumeSettings;    /*0x48 */
7158c2ecf20Sopenharmony_ci	U32                                 RAID1EVolumeSettings;   /*0x4C */
7168c2ecf20Sopenharmony_ci	U32                                 RAID1VolumeSettings;    /*0x50 */
7178c2ecf20Sopenharmony_ci	U32                                 RAID10VolumeSettings;   /*0x54 */
7188c2ecf20Sopenharmony_ci	U32                                 Reserved4;              /*0x58 */
7198c2ecf20Sopenharmony_ci	U32                                 Reserved5;              /*0x5C */
7208c2ecf20Sopenharmony_ci	MPI2_MANPAGE4_PWR_SAVE_SETTINGS     PowerSaveSettings;      /*0x60 */
7218c2ecf20Sopenharmony_ci	U8                                  MaxOCEDisks;            /*0x64 */
7228c2ecf20Sopenharmony_ci	U8                                  ResyncRate;             /*0x65 */
7238c2ecf20Sopenharmony_ci	U16                                 DataScrubDuration;      /*0x66 */
7248c2ecf20Sopenharmony_ci	U8                                  MaxHotSpares;           /*0x68 */
7258c2ecf20Sopenharmony_ci	U8                                  MaxPhysDisksPerVol;     /*0x69 */
7268c2ecf20Sopenharmony_ci	U8                                  MaxPhysDisks;           /*0x6A */
7278c2ecf20Sopenharmony_ci	U8                                  MaxVolumes;             /*0x6B */
7288c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_4,
7298c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_4,
7308c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage4_t,
7318c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage4_t;
7328c2ecf20Sopenharmony_ci
7338c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING4_PAGEVERSION                 (0x0A)
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_ci/*Manufacturing Page 4 Flags field */
7368c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_METADATA_SIZE_MASK                (0x00030000)
7378c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_METADATA_512MB                    (0x00000000)
7388c2ecf20Sopenharmony_ci
7398c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_MIX_SSD_SAS_SATA                  (0x00008000)
7408c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_MIX_SSD_AND_NON_SSD               (0x00004000)
7418c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_HIDE_PHYSDISK_NON_IR              (0x00002000)
7428c2ecf20Sopenharmony_ci
7438c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_MASK_PHYSDISK_COERCION            (0x00001C00)
7448c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_PHYSDISK_COERCION_1GB             (0x00000000)
7458c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION           (0x00000400)
7468c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_PHYSDISK_ADAPTIVE_COERCION        (0x00000800)
7478c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_PHYSDISK_ZERO_COERCION            (0x00000C00)
7488c2ecf20Sopenharmony_ci
7498c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_MASK_BAD_BLOCK_MARKING            (0x00000300)
7508c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_DEFAULT_BAD_BLOCK_MARKING         (0x00000000)
7518c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_TABLE_BAD_BLOCK_MARKING           (0x00000100)
7528c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_WRITE_LONG_BAD_BLOCK_MARKING      (0x00000200)
7538c2ecf20Sopenharmony_ci
7548c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_FORCE_OFFLINE_FAILOVER            (0x00000080)
7558c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_RAID10_DISABLE                    (0x00000040)
7568c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_RAID1E_DISABLE                    (0x00000020)
7578c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_RAID1_DISABLE                     (0x00000010)
7588c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_RAID0_DISABLE                     (0x00000008)
7598c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_IR_MODEPAGE8_DISABLE              (0x00000004)
7608c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_IM_RESYNC_CACHE_ENABLE            (0x00000002)
7618c2ecf20Sopenharmony_ci#define MPI2_MANPAGE4_IR_NO_MIX_SAS_SATA                (0x00000001)
7628c2ecf20Sopenharmony_ci
7638c2ecf20Sopenharmony_ci
7648c2ecf20Sopenharmony_ci/*Manufacturing Page 5 */
7658c2ecf20Sopenharmony_ci
7668c2ecf20Sopenharmony_ci/*
7678c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
7688c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
7698c2ecf20Sopenharmony_ci */
7708c2ecf20Sopenharmony_ci#ifndef MPI2_MAN_PAGE_5_PHY_ENTRIES
7718c2ecf20Sopenharmony_ci#define MPI2_MAN_PAGE_5_PHY_ENTRIES         (1)
7728c2ecf20Sopenharmony_ci#endif
7738c2ecf20Sopenharmony_ci
7748c2ecf20Sopenharmony_citypedef struct _MPI2_MANUFACTURING5_ENTRY {
7758c2ecf20Sopenharmony_ci	U64                                 WWID;           /*0x00 */
7768c2ecf20Sopenharmony_ci	U64                                 DeviceName;     /*0x08 */
7778c2ecf20Sopenharmony_ci} MPI2_MANUFACTURING5_ENTRY,
7788c2ecf20Sopenharmony_ci	*PTR_MPI2_MANUFACTURING5_ENTRY,
7798c2ecf20Sopenharmony_ci	Mpi2Manufacturing5Entry_t,
7808c2ecf20Sopenharmony_ci	*pMpi2Manufacturing5Entry_t;
7818c2ecf20Sopenharmony_ci
7828c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_5 {
7838c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER             Header;         /*0x00 */
7848c2ecf20Sopenharmony_ci	U8                                  NumPhys;        /*0x04 */
7858c2ecf20Sopenharmony_ci	U8                                  Reserved1;      /*0x05 */
7868c2ecf20Sopenharmony_ci	U16                                 Reserved2;      /*0x06 */
7878c2ecf20Sopenharmony_ci	U32                                 Reserved3;      /*0x08 */
7888c2ecf20Sopenharmony_ci	U32                                 Reserved4;      /*0x0C */
7898c2ecf20Sopenharmony_ci	MPI2_MANUFACTURING5_ENTRY
7908c2ecf20Sopenharmony_ci		Phy[MPI2_MAN_PAGE_5_PHY_ENTRIES];/*0x08 */
7918c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_5,
7928c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_5,
7938c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage5_t,
7948c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage5_t;
7958c2ecf20Sopenharmony_ci
7968c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING5_PAGEVERSION                 (0x03)
7978c2ecf20Sopenharmony_ci
7988c2ecf20Sopenharmony_ci
7998c2ecf20Sopenharmony_ci/*Manufacturing Page 6 */
8008c2ecf20Sopenharmony_ci
8018c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_6 {
8028c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER         Header;             /*0x00 */
8038c2ecf20Sopenharmony_ci	U32                             ProductSpecificInfo;/*0x04 */
8048c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_6,
8058c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_6,
8068c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage6_t,
8078c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage6_t;
8088c2ecf20Sopenharmony_ci
8098c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING6_PAGEVERSION                 (0x00)
8108c2ecf20Sopenharmony_ci
8118c2ecf20Sopenharmony_ci
8128c2ecf20Sopenharmony_ci/*Manufacturing Page 7 */
8138c2ecf20Sopenharmony_ci
8148c2ecf20Sopenharmony_citypedef struct _MPI2_MANPAGE7_CONNECTOR_INFO {
8158c2ecf20Sopenharmony_ci	U32                         Pinout;                 /*0x00 */
8168c2ecf20Sopenharmony_ci	U8                          Connector[16];          /*0x04 */
8178c2ecf20Sopenharmony_ci	U8                          Location;               /*0x14 */
8188c2ecf20Sopenharmony_ci	U8                          ReceptacleID;           /*0x15 */
8198c2ecf20Sopenharmony_ci	U16                         Slot;                   /*0x16 */
8208c2ecf20Sopenharmony_ci	U16                         Slotx2;                 /*0x18 */
8218c2ecf20Sopenharmony_ci	U16                         Slotx4;                 /*0x1A */
8228c2ecf20Sopenharmony_ci} MPI2_MANPAGE7_CONNECTOR_INFO,
8238c2ecf20Sopenharmony_ci	*PTR_MPI2_MANPAGE7_CONNECTOR_INFO,
8248c2ecf20Sopenharmony_ci	Mpi2ManPage7ConnectorInfo_t,
8258c2ecf20Sopenharmony_ci	*pMpi2ManPage7ConnectorInfo_t;
8268c2ecf20Sopenharmony_ci
8278c2ecf20Sopenharmony_ci/*defines for the Pinout field */
8288c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_LANE_MASK                  (0x0000FF00)
8298c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_LANE_SHIFT                 (8)
8308c2ecf20Sopenharmony_ci
8318c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_TYPE_MASK                  (0x000000FF)
8328c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_TYPE_UNKNOWN               (0x00)
8338c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SATA_SINGLE                (0x01)
8348c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8482                   (0x02)
8358c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8486                   (0x03)
8368c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8484                   (0x04)
8378c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8087                   (0x05)
8388c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8643_4I                (0x06)
8398c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8643_8I                (0x07)
8408c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8470                   (0x08)
8418c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8088                   (0x09)
8428c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8644_4X                (0x0A)
8438c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8644_8X                (0x0B)
8448c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8644_16X               (0x0C)
8458c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8436                   (0x0D)
8468c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8088_A                 (0x0E)
8478c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8643_16i               (0x0F)
8488c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8654_4i                (0x10)
8498c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8654_8i                (0x11)
8508c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8611_4i                (0x12)
8518c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_PINOUT_SFF_8611_8i                (0x13)
8528c2ecf20Sopenharmony_ci
8538c2ecf20Sopenharmony_ci/*defines for the Location field */
8548c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_UNKNOWN                  (0x01)
8558c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_INTERNAL                 (0x02)
8568c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_EXTERNAL                 (0x04)
8578c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_SWITCHABLE               (0x08)
8588c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_AUTO                     (0x10)
8598c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_NOT_PRESENT              (0x20)
8608c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_LOCATION_NOT_CONNECTED            (0x80)
8618c2ecf20Sopenharmony_ci
8628c2ecf20Sopenharmony_ci/*defines for the Slot field */
8638c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_SLOT_UNKNOWN                      (0xFFFF)
8648c2ecf20Sopenharmony_ci
8658c2ecf20Sopenharmony_ci/*
8668c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
8678c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
8688c2ecf20Sopenharmony_ci */
8698c2ecf20Sopenharmony_ci#ifndef MPI2_MANPAGE7_CONNECTOR_INFO_MAX
8708c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_CONNECTOR_INFO_MAX  (1)
8718c2ecf20Sopenharmony_ci#endif
8728c2ecf20Sopenharmony_ci
8738c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_7 {
8748c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER         Header;             /*0x00 */
8758c2ecf20Sopenharmony_ci	U32                             Reserved1;          /*0x04 */
8768c2ecf20Sopenharmony_ci	U32                             Reserved2;          /*0x08 */
8778c2ecf20Sopenharmony_ci	U32                             Flags;              /*0x0C */
8788c2ecf20Sopenharmony_ci	U8                              EnclosureName[16];  /*0x10 */
8798c2ecf20Sopenharmony_ci	U8                              NumPhys;            /*0x20 */
8808c2ecf20Sopenharmony_ci	U8                              Reserved3;          /*0x21 */
8818c2ecf20Sopenharmony_ci	U16                             Reserved4;          /*0x22 */
8828c2ecf20Sopenharmony_ci	MPI2_MANPAGE7_CONNECTOR_INFO
8838c2ecf20Sopenharmony_ci	ConnectorInfo[MPI2_MANPAGE7_CONNECTOR_INFO_MAX]; /*0x24 */
8848c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_7,
8858c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_7,
8868c2ecf20Sopenharmony_ci	Mpi2ManufacturingPage7_t,
8878c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPage7_t;
8888c2ecf20Sopenharmony_ci
8898c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING7_PAGEVERSION                 (0x01)
8908c2ecf20Sopenharmony_ci
8918c2ecf20Sopenharmony_ci/*defines for the Flags field */
8928c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL         (0x00000008)
8938c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER       (0x00000002)
8948c2ecf20Sopenharmony_ci#define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO                (0x00000001)
8958c2ecf20Sopenharmony_ci
8968c2ecf20Sopenharmony_ci#define MPI26_MANPAGE7_FLAG_CONN_LANE_USE_PINOUT        (0x00000020)
8978c2ecf20Sopenharmony_ci#define MPI26_MANPAGE7_FLAG_X2_X4_SLOT_INFO_VALID       (0x00000010)
8988c2ecf20Sopenharmony_ci
8998c2ecf20Sopenharmony_ci/*
9008c2ecf20Sopenharmony_ci *Generic structure to use for product-specific manufacturing pages
9018c2ecf20Sopenharmony_ci *(currently Manufacturing Page 8 through Manufacturing Page 31).
9028c2ecf20Sopenharmony_ci */
9038c2ecf20Sopenharmony_ci
9048c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_MAN_PS {
9058c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER         Header;             /*0x00 */
9068c2ecf20Sopenharmony_ci	U32                             ProductSpecificInfo;/*0x04 */
9078c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_MAN_PS,
9088c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_MAN_PS,
9098c2ecf20Sopenharmony_ci	Mpi2ManufacturingPagePS_t,
9108c2ecf20Sopenharmony_ci	*pMpi2ManufacturingPagePS_t;
9118c2ecf20Sopenharmony_ci
9128c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING8_PAGEVERSION                 (0x00)
9138c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING9_PAGEVERSION                 (0x00)
9148c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING10_PAGEVERSION                (0x00)
9158c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING11_PAGEVERSION                (0x00)
9168c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING12_PAGEVERSION                (0x00)
9178c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING13_PAGEVERSION                (0x00)
9188c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING14_PAGEVERSION                (0x00)
9198c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING15_PAGEVERSION                (0x00)
9208c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING16_PAGEVERSION                (0x00)
9218c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING17_PAGEVERSION                (0x00)
9228c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING18_PAGEVERSION                (0x00)
9238c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING19_PAGEVERSION                (0x00)
9248c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING20_PAGEVERSION                (0x00)
9258c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING21_PAGEVERSION                (0x00)
9268c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING22_PAGEVERSION                (0x00)
9278c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING23_PAGEVERSION                (0x00)
9288c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING24_PAGEVERSION                (0x00)
9298c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING25_PAGEVERSION                (0x00)
9308c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING26_PAGEVERSION                (0x00)
9318c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING27_PAGEVERSION                (0x00)
9328c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING28_PAGEVERSION                (0x00)
9338c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING29_PAGEVERSION                (0x00)
9348c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING30_PAGEVERSION                (0x00)
9358c2ecf20Sopenharmony_ci#define MPI2_MANUFACTURING31_PAGEVERSION                (0x00)
9368c2ecf20Sopenharmony_ci
9378c2ecf20Sopenharmony_ci
9388c2ecf20Sopenharmony_ci/****************************************************************************
9398c2ecf20Sopenharmony_ci*  IO Unit Config Pages
9408c2ecf20Sopenharmony_ci****************************************************************************/
9418c2ecf20Sopenharmony_ci
9428c2ecf20Sopenharmony_ci/*IO Unit Page 0 */
9438c2ecf20Sopenharmony_ci
9448c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_0 {
9458c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
9468c2ecf20Sopenharmony_ci	U64                     UniqueValue;                /*0x04 */
9478c2ecf20Sopenharmony_ci	MPI2_VERSION_UNION      NvdataVersionDefault;       /*0x08 */
9488c2ecf20Sopenharmony_ci	MPI2_VERSION_UNION      NvdataVersionPersistent;    /*0x0A */
9498c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_0,
9508c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_0,
9518c2ecf20Sopenharmony_ci	Mpi2IOUnitPage0_t, *pMpi2IOUnitPage0_t;
9528c2ecf20Sopenharmony_ci
9538c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE0_PAGEVERSION                    (0x02)
9548c2ecf20Sopenharmony_ci
9558c2ecf20Sopenharmony_ci
9568c2ecf20Sopenharmony_ci/*IO Unit Page 1 */
9578c2ecf20Sopenharmony_ci
9588c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_1 {
9598c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
9608c2ecf20Sopenharmony_ci	U32                     Flags;                      /*0x04 */
9618c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_1,
9628c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_1,
9638c2ecf20Sopenharmony_ci	Mpi2IOUnitPage1_t, *pMpi2IOUnitPage1_t;
9648c2ecf20Sopenharmony_ci
9658c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_PAGEVERSION                    (0x04)
9668c2ecf20Sopenharmony_ci
9678c2ecf20Sopenharmony_ci/* IO Unit Page 1 Flags defines */
9688c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE1_NVME_WRCACHE_MASK             (0x00030000)
9698c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE1_NVME_WRCACHE_SHIFT            (16)
9708c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE1_NVME_WRCACHE_NO_CHANGE        (0x00000000)
9718c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE1_NVME_WRCACHE_ENABLE           (0x00010000)
9728c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE1_NVME_WRCACHE_DISABLE          (0x00020000)
9738c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK       (0x00004000)
9748c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE1_NEW_DEVICE_FAST_PATH_DISABLE  (0x00002000)
9758c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE1_DISABLE_FAST_PATH             (0x00001000)
9768c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY    (0x00000800)
9778c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_MASK_SATA_WRITE_CACHE          (0x00000600)
9788c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_SATA_WRITE_CACHE_SHIFT         (9)
9798c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_ENABLE_SATA_WRITE_CACHE        (0x00000000)
9808c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_DISABLE_SATA_WRITE_CACHE       (0x00000200)
9818c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_UNCHANGED_SATA_WRITE_CACHE     (0x00000400)
9828c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE       (0x00000100)
9838c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_DISABLE_IR                     (0x00000040)
9848c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_DISABLE_TASK_SET_FULL_HANDLING (0x00000020)
9858c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID        (0x00000004)
9868c2ecf20Sopenharmony_ci
9878c2ecf20Sopenharmony_ci
9888c2ecf20Sopenharmony_ci/*IO Unit Page 3 */
9898c2ecf20Sopenharmony_ci
9908c2ecf20Sopenharmony_ci/*
9918c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
9928c2ecf20Sopenharmony_ci *one and check the value returned for GPIOCount at runtime.
9938c2ecf20Sopenharmony_ci */
9948c2ecf20Sopenharmony_ci#ifndef MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX
9958c2ecf20Sopenharmony_ci#define MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX    (1)
9968c2ecf20Sopenharmony_ci#endif
9978c2ecf20Sopenharmony_ci
9988c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_3 {
9998c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;			 /*0x00 */
10008c2ecf20Sopenharmony_ci	U8                      GPIOCount;		 /*0x04 */
10018c2ecf20Sopenharmony_ci	U8                      Reserved1;		 /*0x05 */
10028c2ecf20Sopenharmony_ci	U16                     Reserved2;		 /*0x06 */
10038c2ecf20Sopenharmony_ci	U16
10048c2ecf20Sopenharmony_ci		GPIOVal[MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX];/*0x08 */
10058c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_3,
10068c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_3,
10078c2ecf20Sopenharmony_ci	Mpi2IOUnitPage3_t, *pMpi2IOUnitPage3_t;
10088c2ecf20Sopenharmony_ci
10098c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE3_PAGEVERSION                    (0x01)
10108c2ecf20Sopenharmony_ci
10118c2ecf20Sopenharmony_ci/*defines for IO Unit Page 3 GPIOVal field */
10128c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_MASK             (0xFFFC)
10138c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_SHIFT            (2)
10148c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE3_GPIO_SETTING_OFF               (0x0000)
10158c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE3_GPIO_SETTING_ON                (0x0001)
10168c2ecf20Sopenharmony_ci
10178c2ecf20Sopenharmony_ci
10188c2ecf20Sopenharmony_ci/*IO Unit Page 5 */
10198c2ecf20Sopenharmony_ci
10208c2ecf20Sopenharmony_ci/*
10218c2ecf20Sopenharmony_ci *Upper layer code (drivers, utilities, etc.) should leave this define set to
10228c2ecf20Sopenharmony_ci *one and check the value returned for NumDmaEngines at runtime.
10238c2ecf20Sopenharmony_ci */
10248c2ecf20Sopenharmony_ci#ifndef MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES
10258c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES      (1)
10268c2ecf20Sopenharmony_ci#endif
10278c2ecf20Sopenharmony_ci
10288c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_5 {
10298c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
10308c2ecf20Sopenharmony_ci	U64
10318c2ecf20Sopenharmony_ci		RaidAcceleratorBufferBaseAddress;           /*0x04 */
10328c2ecf20Sopenharmony_ci	U64
10338c2ecf20Sopenharmony_ci		RaidAcceleratorBufferSize;                  /*0x0C */
10348c2ecf20Sopenharmony_ci	U64
10358c2ecf20Sopenharmony_ci		RaidAcceleratorControlBaseAddress;          /*0x14 */
10368c2ecf20Sopenharmony_ci	U8                      RAControlSize;              /*0x1C */
10378c2ecf20Sopenharmony_ci	U8                      NumDmaEngines;              /*0x1D */
10388c2ecf20Sopenharmony_ci	U8                      RAMinControlSize;           /*0x1E */
10398c2ecf20Sopenharmony_ci	U8                      RAMaxControlSize;           /*0x1F */
10408c2ecf20Sopenharmony_ci	U32                     Reserved1;                  /*0x20 */
10418c2ecf20Sopenharmony_ci	U32                     Reserved2;                  /*0x24 */
10428c2ecf20Sopenharmony_ci	U32                     Reserved3;                  /*0x28 */
10438c2ecf20Sopenharmony_ci	U32
10448c2ecf20Sopenharmony_ci	DmaEngineCapabilities[MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES]; /*0x2C */
10458c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_5,
10468c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_5,
10478c2ecf20Sopenharmony_ci	Mpi2IOUnitPage5_t, *pMpi2IOUnitPage5_t;
10488c2ecf20Sopenharmony_ci
10498c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_PAGEVERSION                    (0x00)
10508c2ecf20Sopenharmony_ci
10518c2ecf20Sopenharmony_ci/*defines for IO Unit Page 5 DmaEngineCapabilities field */
10528c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS      (0xFFFF0000)
10538c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_SHIFT_MAX_REQUESTS     (16)
10548c2ecf20Sopenharmony_ci
10558c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_EEDP                   (0x0008)
10568c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_PARITY_GENERATION      (0x0004)
10578c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_HASHING                (0x0002)
10588c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE5_DMA_CAP_ENCRYPTION             (0x0001)
10598c2ecf20Sopenharmony_ci
10608c2ecf20Sopenharmony_ci
10618c2ecf20Sopenharmony_ci/*IO Unit Page 6 */
10628c2ecf20Sopenharmony_ci
10638c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_6 {
10648c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                 /*0x00 */
10658c2ecf20Sopenharmony_ci	U16                     Flags;                  /*0x04 */
10668c2ecf20Sopenharmony_ci	U8                      RAHostControlSize;      /*0x06 */
10678c2ecf20Sopenharmony_ci	U8                      Reserved0;              /*0x07 */
10688c2ecf20Sopenharmony_ci	U64
10698c2ecf20Sopenharmony_ci		RaidAcceleratorHostControlBaseAddress;  /*0x08 */
10708c2ecf20Sopenharmony_ci	U32                     Reserved1;              /*0x10 */
10718c2ecf20Sopenharmony_ci	U32                     Reserved2;              /*0x14 */
10728c2ecf20Sopenharmony_ci	U32                     Reserved3;              /*0x18 */
10738c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_6,
10748c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_6,
10758c2ecf20Sopenharmony_ci	Mpi2IOUnitPage6_t, *pMpi2IOUnitPage6_t;
10768c2ecf20Sopenharmony_ci
10778c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE6_PAGEVERSION                    (0x00)
10788c2ecf20Sopenharmony_ci
10798c2ecf20Sopenharmony_ci/*defines for IO Unit Page 6 Flags field */
10808c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE6_FLAGS_ENABLE_RAID_ACCELERATOR  (0x0001)
10818c2ecf20Sopenharmony_ci
10828c2ecf20Sopenharmony_ci
10838c2ecf20Sopenharmony_ci/*IO Unit Page 7 */
10848c2ecf20Sopenharmony_ci
10858c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 {
10868c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                 /*0x00 */
10878c2ecf20Sopenharmony_ci	U8                      CurrentPowerMode;       /*0x04 */
10888c2ecf20Sopenharmony_ci	U8                      PreviousPowerMode;      /*0x05 */
10898c2ecf20Sopenharmony_ci	U8                      PCIeWidth;              /*0x06 */
10908c2ecf20Sopenharmony_ci	U8                      PCIeSpeed;              /*0x07 */
10918c2ecf20Sopenharmony_ci	U32                     ProcessorState;         /*0x08 */
10928c2ecf20Sopenharmony_ci	U32
10938c2ecf20Sopenharmony_ci		PowerManagementCapabilities;            /*0x0C */
10948c2ecf20Sopenharmony_ci	U16                     IOCTemperature;         /*0x10 */
10958c2ecf20Sopenharmony_ci	U8
10968c2ecf20Sopenharmony_ci		IOCTemperatureUnits;                    /*0x12 */
10978c2ecf20Sopenharmony_ci	U8                      IOCSpeed;               /*0x13 */
10988c2ecf20Sopenharmony_ci	U16                     BoardTemperature;       /*0x14 */
10998c2ecf20Sopenharmony_ci	U8
11008c2ecf20Sopenharmony_ci		BoardTemperatureUnits;                  /*0x16 */
11018c2ecf20Sopenharmony_ci	U8                      Reserved3;              /*0x17 */
11028c2ecf20Sopenharmony_ci	U32			BoardPowerRequirement;	/*0x18 */
11038c2ecf20Sopenharmony_ci	U32			PCISlotPowerAllocation;	/*0x1C */
11048c2ecf20Sopenharmony_ci/* reserved prior to MPI v2.6 */
11058c2ecf20Sopenharmony_ci	U8		Flags;			/* 0x20 */
11068c2ecf20Sopenharmony_ci	U8		Reserved6;			/* 0x21 */
11078c2ecf20Sopenharmony_ci	U16		Reserved7;			/* 0x22 */
11088c2ecf20Sopenharmony_ci	U32		Reserved8;			/* 0x24 */
11098c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_7,
11108c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_7,
11118c2ecf20Sopenharmony_ci	Mpi2IOUnitPage7_t, *pMpi2IOUnitPage7_t;
11128c2ecf20Sopenharmony_ci
11138c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PAGEVERSION			(0x05)
11148c2ecf20Sopenharmony_ci
11158c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 CurrentPowerMode and PreviousPowerMode fields */
11168c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_INIT_MASK              (0xC0)
11178c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_INIT_UNAVAILABLE       (0x00)
11188c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_INIT_HOST              (0x40)
11198c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_INIT_IO_UNIT           (0x80)
11208c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_INIT_PCIE_DPA          (0xC0)
11218c2ecf20Sopenharmony_ci
11228c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_MASK              (0x07)
11238c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_UNAVAILABLE       (0x00)
11248c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_UNKNOWN           (0x01)
11258c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_FULL_POWER        (0x04)
11268c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_REDUCED_POWER     (0x05)
11278c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PM_MODE_STANDBY           (0x06)
11288c2ecf20Sopenharmony_ci
11298c2ecf20Sopenharmony_ci
11308c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 PCIeWidth field */
11318c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X1              (0x01)
11328c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2              (0x02)
11338c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4              (0x04)
11348c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8              (0x08)
11358c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X16             (0x10)
11368c2ecf20Sopenharmony_ci
11378c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 PCIeSpeed field */
11388c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS        (0x00)
11398c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS        (0x01)
11408c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS        (0x02)
11418c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PCIE_SPEED_16_0_GBPS       (0x03)
11428c2ecf20Sopenharmony_ci
11438c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 ProcessorState field */
11448c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND         (0x0000000F)
11458c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PSTATE_SHIFT_SECOND        (0)
11468c2ecf20Sopenharmony_ci
11478c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PSTATE_NOT_PRESENT         (0x00)
11488c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PSTATE_DISABLED            (0x01)
11498c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PSTATE_ENABLED             (0x02)
11508c2ecf20Sopenharmony_ci
11518c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 PowerManagementCapabilities field */
11528c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_DPA_FULL_PWR_MODE       (0x00400000)
11538c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_DPA_REDUCED_PWR_MODE    (0x00200000)
11548c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_DPA_STANDBY_MODE        (0x00100000)
11558c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_HOST_FULL_PWR_MODE      (0x00040000)
11568c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_HOST_REDUCED_PWR_MODE   (0x00020000)
11578c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_HOST_STANDBY_MODE       (0x00010000)
11588c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_FULL_PWR_MODE        (0x00004000)
11598c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_REDUCED_PWR_MODE     (0x00002000)
11608c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_STANDBY_MODE         (0x00001000)
11618c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_HOST_12_5_PCT_IOCSPEED   (0x00000400)
11628c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_HOST_25_0_PCT_IOCSPEED   (0x00000200)
11638c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_HOST_50_0_PCT_IOCSPEED   (0x00000100)
11648c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_12_5_PCT_IOCSPEED    (0x00000040)
11658c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_25_0_PCT_IOCSPEED    (0x00000020)
11668c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_50_0_PCT_IOCSPEED    (0x00000010)
11678c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_HOST_WIDTH_CHANGE_PCIE   (0x00000008)
11688c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_HOST_SPEED_CHANGE_PCIE   (0x00000004)
11698c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_WIDTH_CHANGE_PCIE    (0x00000002)
11708c2ecf20Sopenharmony_ci#define MPI25_IOUNITPAGE7_PMCAP_IO_SPEED_CHANGE_PCIE    (0x00000001)
11718c2ecf20Sopenharmony_ci
11728c2ecf20Sopenharmony_ci/*obsolete names for the PowerManagementCapabilities bits (above) */
11738c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_12_5_PCT_IOCSPEED    (0x00000400)
11748c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_25_0_PCT_IOCSPEED    (0x00000200)
11758c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_50_0_PCT_IOCSPEED    (0x00000100)
11768c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_PCIE_WIDTH_CHANGE    (0x00000008) /*obsolete */
11778c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_PMCAP_PCIE_SPEED_CHANGE    (0x00000004) /*obsolete */
11788c2ecf20Sopenharmony_ci
11798c2ecf20Sopenharmony_ci
11808c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 IOCTemperatureUnits field */
11818c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_TEMP_NOT_PRESENT       (0x00)
11828c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_TEMP_FAHRENHEIT        (0x01)
11838c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_TEMP_CELSIUS           (0x02)
11848c2ecf20Sopenharmony_ci
11858c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 IOCSpeed field */
11868c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_SPEED_FULL             (0x01)
11878c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_SPEED_HALF             (0x02)
11888c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_SPEED_QUARTER          (0x04)
11898c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_IOC_SPEED_EIGHTH           (0x08)
11908c2ecf20Sopenharmony_ci
11918c2ecf20Sopenharmony_ci/*defines for IO Unit Page 7 BoardTemperatureUnits field */
11928c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_BOARD_TEMP_NOT_PRESENT     (0x00)
11938c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_BOARD_TEMP_FAHRENHEIT      (0x01)
11948c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_BOARD_TEMP_CELSIUS         (0x02)
11958c2ecf20Sopenharmony_ci
11968c2ecf20Sopenharmony_ci/* defines for IO Unit Page 7 Flags field */
11978c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE7_FLAG_CABLE_POWER_EXC       (0x01)
11988c2ecf20Sopenharmony_ci
11998c2ecf20Sopenharmony_ci/*IO Unit Page 8 */
12008c2ecf20Sopenharmony_ci
12018c2ecf20Sopenharmony_ci#define MPI2_IOUNIT8_NUM_THRESHOLDS     (4)
12028c2ecf20Sopenharmony_ci
12038c2ecf20Sopenharmony_citypedef struct _MPI2_IOUNIT8_SENSOR {
12048c2ecf20Sopenharmony_ci	U16                     Flags;                  /*0x00 */
12058c2ecf20Sopenharmony_ci	U16                     Reserved1;              /*0x02 */
12068c2ecf20Sopenharmony_ci	U16
12078c2ecf20Sopenharmony_ci		Threshold[MPI2_IOUNIT8_NUM_THRESHOLDS]; /*0x04 */
12088c2ecf20Sopenharmony_ci	U32                     Reserved2;              /*0x0C */
12098c2ecf20Sopenharmony_ci	U32                     Reserved3;              /*0x10 */
12108c2ecf20Sopenharmony_ci	U32                     Reserved4;              /*0x14 */
12118c2ecf20Sopenharmony_ci} MPI2_IOUNIT8_SENSOR, *PTR_MPI2_IOUNIT8_SENSOR,
12128c2ecf20Sopenharmony_ci	Mpi2IOUnit8Sensor_t, *pMpi2IOUnit8Sensor_t;
12138c2ecf20Sopenharmony_ci
12148c2ecf20Sopenharmony_ci/*defines for IO Unit Page 8 Sensor Flags field */
12158c2ecf20Sopenharmony_ci#define MPI2_IOUNIT8_SENSOR_FLAGS_T3_ENABLE         (0x0008)
12168c2ecf20Sopenharmony_ci#define MPI2_IOUNIT8_SENSOR_FLAGS_T2_ENABLE         (0x0004)
12178c2ecf20Sopenharmony_ci#define MPI2_IOUNIT8_SENSOR_FLAGS_T1_ENABLE         (0x0002)
12188c2ecf20Sopenharmony_ci#define MPI2_IOUNIT8_SENSOR_FLAGS_T0_ENABLE         (0x0001)
12198c2ecf20Sopenharmony_ci
12208c2ecf20Sopenharmony_ci/*
12218c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
12228c2ecf20Sopenharmony_ci *one and check the value returned for NumSensors at runtime.
12238c2ecf20Sopenharmony_ci */
12248c2ecf20Sopenharmony_ci#ifndef MPI2_IOUNITPAGE8_SENSOR_ENTRIES
12258c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE8_SENSOR_ENTRIES     (1)
12268c2ecf20Sopenharmony_ci#endif
12278c2ecf20Sopenharmony_ci
12288c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_8 {
12298c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                 /*0x00 */
12308c2ecf20Sopenharmony_ci	U32                     Reserved1;              /*0x04 */
12318c2ecf20Sopenharmony_ci	U32                     Reserved2;              /*0x08 */
12328c2ecf20Sopenharmony_ci	U8                      NumSensors;             /*0x0C */
12338c2ecf20Sopenharmony_ci	U8                      PollingInterval;        /*0x0D */
12348c2ecf20Sopenharmony_ci	U16                     Reserved3;              /*0x0E */
12358c2ecf20Sopenharmony_ci	MPI2_IOUNIT8_SENSOR
12368c2ecf20Sopenharmony_ci		Sensor[MPI2_IOUNITPAGE8_SENSOR_ENTRIES];/*0x10 */
12378c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_8,
12388c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_8,
12398c2ecf20Sopenharmony_ci	Mpi2IOUnitPage8_t, *pMpi2IOUnitPage8_t;
12408c2ecf20Sopenharmony_ci
12418c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE8_PAGEVERSION                    (0x00)
12428c2ecf20Sopenharmony_ci
12438c2ecf20Sopenharmony_ci
12448c2ecf20Sopenharmony_ci/*IO Unit Page 9 */
12458c2ecf20Sopenharmony_ci
12468c2ecf20Sopenharmony_citypedef struct _MPI2_IOUNIT9_SENSOR {
12478c2ecf20Sopenharmony_ci	U16                     CurrentTemperature;     /*0x00 */
12488c2ecf20Sopenharmony_ci	U16                     Reserved1;              /*0x02 */
12498c2ecf20Sopenharmony_ci	U8                      Flags;                  /*0x04 */
12508c2ecf20Sopenharmony_ci	U8                      Reserved2;              /*0x05 */
12518c2ecf20Sopenharmony_ci	U16                     Reserved3;              /*0x06 */
12528c2ecf20Sopenharmony_ci	U32                     Reserved4;              /*0x08 */
12538c2ecf20Sopenharmony_ci	U32                     Reserved5;              /*0x0C */
12548c2ecf20Sopenharmony_ci} MPI2_IOUNIT9_SENSOR, *PTR_MPI2_IOUNIT9_SENSOR,
12558c2ecf20Sopenharmony_ci	Mpi2IOUnit9Sensor_t, *pMpi2IOUnit9Sensor_t;
12568c2ecf20Sopenharmony_ci
12578c2ecf20Sopenharmony_ci/*defines for IO Unit Page 9 Sensor Flags field */
12588c2ecf20Sopenharmony_ci#define MPI2_IOUNIT9_SENSOR_FLAGS_TEMP_VALID        (0x01)
12598c2ecf20Sopenharmony_ci
12608c2ecf20Sopenharmony_ci/*
12618c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
12628c2ecf20Sopenharmony_ci *one and check the value returned for NumSensors at runtime.
12638c2ecf20Sopenharmony_ci */
12648c2ecf20Sopenharmony_ci#ifndef MPI2_IOUNITPAGE9_SENSOR_ENTRIES
12658c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE9_SENSOR_ENTRIES     (1)
12668c2ecf20Sopenharmony_ci#endif
12678c2ecf20Sopenharmony_ci
12688c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_9 {
12698c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                 /*0x00 */
12708c2ecf20Sopenharmony_ci	U32                     Reserved1;              /*0x04 */
12718c2ecf20Sopenharmony_ci	U32                     Reserved2;              /*0x08 */
12728c2ecf20Sopenharmony_ci	U8                      NumSensors;             /*0x0C */
12738c2ecf20Sopenharmony_ci	U8                      Reserved4;              /*0x0D */
12748c2ecf20Sopenharmony_ci	U16                     Reserved3;              /*0x0E */
12758c2ecf20Sopenharmony_ci	MPI2_IOUNIT9_SENSOR
12768c2ecf20Sopenharmony_ci		Sensor[MPI2_IOUNITPAGE9_SENSOR_ENTRIES];/*0x10 */
12778c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_9,
12788c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_9,
12798c2ecf20Sopenharmony_ci	Mpi2IOUnitPage9_t, *pMpi2IOUnitPage9_t;
12808c2ecf20Sopenharmony_ci
12818c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE9_PAGEVERSION                    (0x00)
12828c2ecf20Sopenharmony_ci
12838c2ecf20Sopenharmony_ci
12848c2ecf20Sopenharmony_ci/*IO Unit Page 10 */
12858c2ecf20Sopenharmony_ci
12868c2ecf20Sopenharmony_citypedef struct _MPI2_IOUNIT10_FUNCTION {
12878c2ecf20Sopenharmony_ci	U8                      CreditPercent;      /*0x00 */
12888c2ecf20Sopenharmony_ci	U8                      Reserved1;          /*0x01 */
12898c2ecf20Sopenharmony_ci	U16                     Reserved2;          /*0x02 */
12908c2ecf20Sopenharmony_ci} MPI2_IOUNIT10_FUNCTION,
12918c2ecf20Sopenharmony_ci	*PTR_MPI2_IOUNIT10_FUNCTION,
12928c2ecf20Sopenharmony_ci	Mpi2IOUnit10Function_t,
12938c2ecf20Sopenharmony_ci	*pMpi2IOUnit10Function_t;
12948c2ecf20Sopenharmony_ci
12958c2ecf20Sopenharmony_ci/*
12968c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
12978c2ecf20Sopenharmony_ci *one and check the value returned for NumFunctions at runtime.
12988c2ecf20Sopenharmony_ci */
12998c2ecf20Sopenharmony_ci#ifndef MPI2_IOUNITPAGE10_FUNCTION_ENTRIES
13008c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE10_FUNCTION_ENTRIES      (1)
13018c2ecf20Sopenharmony_ci#endif
13028c2ecf20Sopenharmony_ci
13038c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IO_UNIT_10 {
13048c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                      /*0x00 */
13058c2ecf20Sopenharmony_ci	U8                      NumFunctions;                /*0x04 */
13068c2ecf20Sopenharmony_ci	U8                      Reserved1;                   /*0x05 */
13078c2ecf20Sopenharmony_ci	U16                     Reserved2;                   /*0x06 */
13088c2ecf20Sopenharmony_ci	U32                     Reserved3;                   /*0x08 */
13098c2ecf20Sopenharmony_ci	U32                     Reserved4;                   /*0x0C */
13108c2ecf20Sopenharmony_ci	MPI2_IOUNIT10_FUNCTION
13118c2ecf20Sopenharmony_ci		Function[MPI2_IOUNITPAGE10_FUNCTION_ENTRIES];/*0x10 */
13128c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IO_UNIT_10,
13138c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IO_UNIT_10,
13148c2ecf20Sopenharmony_ci	Mpi2IOUnitPage10_t, *pMpi2IOUnitPage10_t;
13158c2ecf20Sopenharmony_ci
13168c2ecf20Sopenharmony_ci#define MPI2_IOUNITPAGE10_PAGEVERSION                   (0x01)
13178c2ecf20Sopenharmony_ci
13188c2ecf20Sopenharmony_ci
13198c2ecf20Sopenharmony_ci/* IO Unit Page 11 (for MPI v2.6 and later) */
13208c2ecf20Sopenharmony_ci
13218c2ecf20Sopenharmony_citypedef struct _MPI26_IOUNIT11_SPINUP_GROUP {
13228c2ecf20Sopenharmony_ci	U8          MaxTargetSpinup;            /* 0x00 */
13238c2ecf20Sopenharmony_ci	U8          SpinupDelay;                /* 0x01 */
13248c2ecf20Sopenharmony_ci	U8          SpinupFlags;                /* 0x02 */
13258c2ecf20Sopenharmony_ci	U8          Reserved1;                  /* 0x03 */
13268c2ecf20Sopenharmony_ci} MPI26_IOUNIT11_SPINUP_GROUP,
13278c2ecf20Sopenharmony_ci	*PTR_MPI26_IOUNIT11_SPINUP_GROUP,
13288c2ecf20Sopenharmony_ci	Mpi26IOUnit11SpinupGroup_t,
13298c2ecf20Sopenharmony_ci	*pMpi26IOUnit11SpinupGroup_t;
13308c2ecf20Sopenharmony_ci
13318c2ecf20Sopenharmony_ci/* defines for IO Unit Page 11 SpinupFlags */
13328c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE11_SPINUP_DISABLE_FLAG          (0x01)
13338c2ecf20Sopenharmony_ci
13348c2ecf20Sopenharmony_ci
13358c2ecf20Sopenharmony_ci/*
13368c2ecf20Sopenharmony_ci * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
13378c2ecf20Sopenharmony_ci * four and check the value returned for NumPhys at runtime.
13388c2ecf20Sopenharmony_ci */
13398c2ecf20Sopenharmony_ci#ifndef MPI26_IOUNITPAGE11_PHY_MAX
13408c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE11_PHY_MAX        (4)
13418c2ecf20Sopenharmony_ci#endif
13428c2ecf20Sopenharmony_ci
13438c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 {
13448c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER       Header;			       /*0x00 */
13458c2ecf20Sopenharmony_ci	U32                           Reserved1;                      /*0x04 */
13468c2ecf20Sopenharmony_ci	MPI26_IOUNIT11_SPINUP_GROUP   SpinupGroupParameters[4];       /*0x08 */
13478c2ecf20Sopenharmony_ci	U32                           Reserved2;                      /*0x18 */
13488c2ecf20Sopenharmony_ci	U32                           Reserved3;                      /*0x1C */
13498c2ecf20Sopenharmony_ci	U32                           Reserved4;                      /*0x20 */
13508c2ecf20Sopenharmony_ci	U8                            BootDeviceWaitTime;             /*0x24 */
13518c2ecf20Sopenharmony_ci	U8                            Reserved5;                      /*0x25 */
13528c2ecf20Sopenharmony_ci	U16                           Reserved6;                      /*0x26 */
13538c2ecf20Sopenharmony_ci	U8                            NumPhys;                        /*0x28 */
13548c2ecf20Sopenharmony_ci	U8                            PEInitialSpinupDelay;           /*0x29 */
13558c2ecf20Sopenharmony_ci	U8                            PEReplyDelay;                   /*0x2A */
13568c2ecf20Sopenharmony_ci	U8                            Flags;                          /*0x2B */
13578c2ecf20Sopenharmony_ci	U8			      PHY[MPI26_IOUNITPAGE11_PHY_MAX];/*0x2C */
13588c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_IO_UNIT_11,
13598c2ecf20Sopenharmony_ci	*PTR_MPI26_CONFIG_PAGE_IO_UNIT_11,
13608c2ecf20Sopenharmony_ci	Mpi26IOUnitPage11_t,
13618c2ecf20Sopenharmony_ci	*pMpi26IOUnitPage11_t;
13628c2ecf20Sopenharmony_ci
13638c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE11_PAGEVERSION                  (0x00)
13648c2ecf20Sopenharmony_ci
13658c2ecf20Sopenharmony_ci/* defines for Flags field */
13668c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE11_FLAGS_AUTO_PORTENABLE        (0x01)
13678c2ecf20Sopenharmony_ci
13688c2ecf20Sopenharmony_ci/* defines for PHY field */
13698c2ecf20Sopenharmony_ci#define MPI26_IOUNITPAGE11_PHY_SPINUP_GROUP_MASK        (0x03)
13708c2ecf20Sopenharmony_ci
13718c2ecf20Sopenharmony_ci
13728c2ecf20Sopenharmony_ci
13738c2ecf20Sopenharmony_ci
13748c2ecf20Sopenharmony_ci
13758c2ecf20Sopenharmony_ci
13768c2ecf20Sopenharmony_ci/****************************************************************************
13778c2ecf20Sopenharmony_ci*  IOC Config Pages
13788c2ecf20Sopenharmony_ci****************************************************************************/
13798c2ecf20Sopenharmony_ci
13808c2ecf20Sopenharmony_ci/*IOC Page 0 */
13818c2ecf20Sopenharmony_ci
13828c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IOC_0 {
13838c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
13848c2ecf20Sopenharmony_ci	U32                     Reserved1;                  /*0x04 */
13858c2ecf20Sopenharmony_ci	U32                     Reserved2;                  /*0x08 */
13868c2ecf20Sopenharmony_ci	U16                     VendorID;                   /*0x0C */
13878c2ecf20Sopenharmony_ci	U16                     DeviceID;                   /*0x0E */
13888c2ecf20Sopenharmony_ci	U8                      RevisionID;                 /*0x10 */
13898c2ecf20Sopenharmony_ci	U8                      Reserved3;                  /*0x11 */
13908c2ecf20Sopenharmony_ci	U16                     Reserved4;                  /*0x12 */
13918c2ecf20Sopenharmony_ci	U32                     ClassCode;                  /*0x14 */
13928c2ecf20Sopenharmony_ci	U16                     SubsystemVendorID;          /*0x18 */
13938c2ecf20Sopenharmony_ci	U16                     SubsystemID;                /*0x1A */
13948c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IOC_0,
13958c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IOC_0,
13968c2ecf20Sopenharmony_ci	Mpi2IOCPage0_t, *pMpi2IOCPage0_t;
13978c2ecf20Sopenharmony_ci
13988c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE0_PAGEVERSION                       (0x02)
13998c2ecf20Sopenharmony_ci
14008c2ecf20Sopenharmony_ci
14018c2ecf20Sopenharmony_ci/*IOC Page 1 */
14028c2ecf20Sopenharmony_ci
14038c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IOC_1 {
14048c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
14058c2ecf20Sopenharmony_ci	U32                     Flags;                      /*0x04 */
14068c2ecf20Sopenharmony_ci	U32                     CoalescingTimeout;          /*0x08 */
14078c2ecf20Sopenharmony_ci	U8                      CoalescingDepth;            /*0x0C */
14088c2ecf20Sopenharmony_ci	U8                      PCISlotNum;                 /*0x0D */
14098c2ecf20Sopenharmony_ci	U8                      PCIBusNum;                  /*0x0E */
14108c2ecf20Sopenharmony_ci	U8                      PCIDomainSegment;           /*0x0F */
14118c2ecf20Sopenharmony_ci	U32                     Reserved1;                  /*0x10 */
14128c2ecf20Sopenharmony_ci	U32                     ProductSpecific;            /* 0x14 */
14138c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IOC_1,
14148c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IOC_1,
14158c2ecf20Sopenharmony_ci	Mpi2IOCPage1_t, *pMpi2IOCPage1_t;
14168c2ecf20Sopenharmony_ci
14178c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE1_PAGEVERSION                       (0x05)
14188c2ecf20Sopenharmony_ci
14198c2ecf20Sopenharmony_ci/*defines for IOC Page 1 Flags field */
14208c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE1_REPLY_COALESCING                  (0x00000001)
14218c2ecf20Sopenharmony_ci
14228c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE1_PCISLOTNUM_UNKNOWN                (0xFF)
14238c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE1_PCIBUSNUM_UNKNOWN                 (0xFF)
14248c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE1_PCIDOMAIN_UNKNOWN                 (0xFF)
14258c2ecf20Sopenharmony_ci
14268c2ecf20Sopenharmony_ci/*IOC Page 6 */
14278c2ecf20Sopenharmony_ci
14288c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IOC_6 {
14298c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;         /*0x00 */
14308c2ecf20Sopenharmony_ci	U32
14318c2ecf20Sopenharmony_ci		CapabilitiesFlags;              /*0x04 */
14328c2ecf20Sopenharmony_ci	U8                      MaxDrivesRAID0; /*0x08 */
14338c2ecf20Sopenharmony_ci	U8                      MaxDrivesRAID1; /*0x09 */
14348c2ecf20Sopenharmony_ci	U8
14358c2ecf20Sopenharmony_ci		 MaxDrivesRAID1E;                /*0x0A */
14368c2ecf20Sopenharmony_ci	U8
14378c2ecf20Sopenharmony_ci		 MaxDrivesRAID10;		/*0x0B */
14388c2ecf20Sopenharmony_ci	U8                      MinDrivesRAID0; /*0x0C */
14398c2ecf20Sopenharmony_ci	U8                      MinDrivesRAID1; /*0x0D */
14408c2ecf20Sopenharmony_ci	U8
14418c2ecf20Sopenharmony_ci		 MinDrivesRAID1E;                /*0x0E */
14428c2ecf20Sopenharmony_ci	U8
14438c2ecf20Sopenharmony_ci		 MinDrivesRAID10;                /*0x0F */
14448c2ecf20Sopenharmony_ci	U32                     Reserved1;      /*0x10 */
14458c2ecf20Sopenharmony_ci	U8
14468c2ecf20Sopenharmony_ci		 MaxGlobalHotSpares;             /*0x14 */
14478c2ecf20Sopenharmony_ci	U8                      MaxPhysDisks;   /*0x15 */
14488c2ecf20Sopenharmony_ci	U8                      MaxVolumes;     /*0x16 */
14498c2ecf20Sopenharmony_ci	U8                      MaxConfigs;     /*0x17 */
14508c2ecf20Sopenharmony_ci	U8                      MaxOCEDisks;    /*0x18 */
14518c2ecf20Sopenharmony_ci	U8                      Reserved2;      /*0x19 */
14528c2ecf20Sopenharmony_ci	U16                     Reserved3;      /*0x1A */
14538c2ecf20Sopenharmony_ci	U32
14548c2ecf20Sopenharmony_ci		SupportedStripeSizeMapRAID0;    /*0x1C */
14558c2ecf20Sopenharmony_ci	U32
14568c2ecf20Sopenharmony_ci		SupportedStripeSizeMapRAID1E;   /*0x20 */
14578c2ecf20Sopenharmony_ci	U32
14588c2ecf20Sopenharmony_ci		SupportedStripeSizeMapRAID10;   /*0x24 */
14598c2ecf20Sopenharmony_ci	U32                     Reserved4;      /*0x28 */
14608c2ecf20Sopenharmony_ci	U32                     Reserved5;      /*0x2C */
14618c2ecf20Sopenharmony_ci	U16
14628c2ecf20Sopenharmony_ci		DefaultMetadataSize;            /*0x30 */
14638c2ecf20Sopenharmony_ci	U16                     Reserved6;      /*0x32 */
14648c2ecf20Sopenharmony_ci	U16
14658c2ecf20Sopenharmony_ci		MaxBadBlockTableEntries;        /*0x34 */
14668c2ecf20Sopenharmony_ci	U16                     Reserved7;      /*0x36 */
14678c2ecf20Sopenharmony_ci	U32
14688c2ecf20Sopenharmony_ci		IRNvsramVersion;                /*0x38 */
14698c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IOC_6,
14708c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IOC_6,
14718c2ecf20Sopenharmony_ci	Mpi2IOCPage6_t, *pMpi2IOCPage6_t;
14728c2ecf20Sopenharmony_ci
14738c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_PAGEVERSION                       (0x05)
14748c2ecf20Sopenharmony_ci
14758c2ecf20Sopenharmony_ci/*defines for IOC Page 6 CapabilitiesFlags */
14768c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT      (0x00000020)
14778c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_RAID10_SUPPORT          (0x00000010)
14788c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1_SUPPORT           (0x00000008)
14798c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1E_SUPPORT          (0x00000004)
14808c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_RAID0_SUPPORT           (0x00000002)
14818c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE6_CAP_FLAGS_GLOBAL_HOT_SPARE        (0x00000001)
14828c2ecf20Sopenharmony_ci
14838c2ecf20Sopenharmony_ci
14848c2ecf20Sopenharmony_ci/*IOC Page 7 */
14858c2ecf20Sopenharmony_ci
14868c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE7_EVENTMASK_WORDS       (4)
14878c2ecf20Sopenharmony_ci
14888c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IOC_7 {
14898c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
14908c2ecf20Sopenharmony_ci	U32                     Reserved1;                  /*0x04 */
14918c2ecf20Sopenharmony_ci	U32
14928c2ecf20Sopenharmony_ci		EventMasks[MPI2_IOCPAGE7_EVENTMASK_WORDS];/*0x08 */
14938c2ecf20Sopenharmony_ci	U16                     SASBroadcastPrimitiveMasks; /*0x18 */
14948c2ecf20Sopenharmony_ci	U16                     SASNotifyPrimitiveMasks;    /*0x1A */
14958c2ecf20Sopenharmony_ci	U32                     Reserved3;                  /*0x1C */
14968c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IOC_7,
14978c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IOC_7,
14988c2ecf20Sopenharmony_ci	Mpi2IOCPage7_t, *pMpi2IOCPage7_t;
14998c2ecf20Sopenharmony_ci
15008c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE7_PAGEVERSION                       (0x02)
15018c2ecf20Sopenharmony_ci
15028c2ecf20Sopenharmony_ci
15038c2ecf20Sopenharmony_ci/*IOC Page 8 */
15048c2ecf20Sopenharmony_ci
15058c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_IOC_8 {
15068c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
15078c2ecf20Sopenharmony_ci	U8                      NumDevsPerEnclosure;        /*0x04 */
15088c2ecf20Sopenharmony_ci	U8                      Reserved1;                  /*0x05 */
15098c2ecf20Sopenharmony_ci	U16                     Reserved2;                  /*0x06 */
15108c2ecf20Sopenharmony_ci	U16                     MaxPersistentEntries;       /*0x08 */
15118c2ecf20Sopenharmony_ci	U16                     MaxNumPhysicalMappedIDs;    /*0x0A */
15128c2ecf20Sopenharmony_ci	U16                     Flags;                      /*0x0C */
15138c2ecf20Sopenharmony_ci	U16                     Reserved3;                  /*0x0E */
15148c2ecf20Sopenharmony_ci	U16                     IRVolumeMappingFlags;       /*0x10 */
15158c2ecf20Sopenharmony_ci	U16                     Reserved4;                  /*0x12 */
15168c2ecf20Sopenharmony_ci	U32                     Reserved5;                  /*0x14 */
15178c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_IOC_8,
15188c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_IOC_8,
15198c2ecf20Sopenharmony_ci	Mpi2IOCPage8_t, *pMpi2IOCPage8_t;
15208c2ecf20Sopenharmony_ci
15218c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_PAGEVERSION                       (0x00)
15228c2ecf20Sopenharmony_ci
15238c2ecf20Sopenharmony_ci/*defines for IOC Page 8 Flags field */
15248c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_DA_START_SLOT_1             (0x00000020)
15258c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0         (0x00000010)
15268c2ecf20Sopenharmony_ci
15278c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE           (0x0000000E)
15288c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING  (0x00000000)
15298c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING      (0x00000002)
15308c2ecf20Sopenharmony_ci
15318c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_DISABLE_PERSISTENT_MAPPING  (0x00000001)
15328c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_FLAGS_ENABLE_PERSISTENT_MAPPING   (0x00000000)
15338c2ecf20Sopenharmony_ci
15348c2ecf20Sopenharmony_ci/*defines for IOC Page 8 IRVolumeMappingFlags */
15358c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE  (0x00000003)
15368c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING        (0x00000000)
15378c2ecf20Sopenharmony_ci#define MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING       (0x00000001)
15388c2ecf20Sopenharmony_ci
15398c2ecf20Sopenharmony_ci
15408c2ecf20Sopenharmony_ci/****************************************************************************
15418c2ecf20Sopenharmony_ci*  BIOS Config Pages
15428c2ecf20Sopenharmony_ci****************************************************************************/
15438c2ecf20Sopenharmony_ci
15448c2ecf20Sopenharmony_ci/*BIOS Page 1 */
15458c2ecf20Sopenharmony_ci
15468c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
15478c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
15488c2ecf20Sopenharmony_ci	U32                     BiosOptions;                /*0x04 */
15498c2ecf20Sopenharmony_ci	U32                     IOCSettings;                /*0x08 */
15508c2ecf20Sopenharmony_ci	U8                      SSUTimeout;                 /*0x0C */
15518c2ecf20Sopenharmony_ci	U8                      MaxEnclosureLevel;          /*0x0D */
15528c2ecf20Sopenharmony_ci	U16                     Reserved2;                  /*0x0E */
15538c2ecf20Sopenharmony_ci	U32                     DeviceSettings;             /*0x10 */
15548c2ecf20Sopenharmony_ci	U16                     NumberOfDevices;            /*0x14 */
15558c2ecf20Sopenharmony_ci	U16                     UEFIVersion;                /*0x16 */
15568c2ecf20Sopenharmony_ci	U16                     IOTimeoutBlockDevicesNonRM; /*0x18 */
15578c2ecf20Sopenharmony_ci	U16                     IOTimeoutSequential;        /*0x1A */
15588c2ecf20Sopenharmony_ci	U16                     IOTimeoutOther;             /*0x1C */
15598c2ecf20Sopenharmony_ci	U16                     IOTimeoutBlockDevicesRM;    /*0x1E */
15608c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_BIOS_1,
15618c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
15628c2ecf20Sopenharmony_ci	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
15638c2ecf20Sopenharmony_ci
15648c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x07)
15658c2ecf20Sopenharmony_ci
15668c2ecf20Sopenharmony_ci/*values for BIOS Page 1 BiosOptions field */
15678c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_BOOT_LIST_ADD_ALT_BOOT_DEVICE    (0x00008000)
15688c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG                  (0x00004000)
15698c2ecf20Sopenharmony_ci
15708c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK                         (0x00003800)
15718c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL                        (0x00000000)
15728c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE                   (0x00000800)
15738c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID                        (0x00001000)
15748c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS                        (0x00001800)
15758c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY                        (0x00002000)
15768c2ecf20Sopenharmony_ci
15778c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		(0x00000400)
15788c2ecf20Sopenharmony_ci
15798c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
15808c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
15818c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
15828c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
15838c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)
15848c2ecf20Sopenharmony_ci
15858c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID                  (0x000000F0)
15868c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID                   (0x00000000)
15878c2ecf20Sopenharmony_ci
15888c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_MASK_UEFI_HII_REGISTRATION   (0x00000006)
15898c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_ENABLE_UEFI_HII              (0x00000000)
15908c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_UEFI_HII             (0x00000002)
15918c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_VERSION_CHECK_UEFI_HII       (0x00000004)
15928c2ecf20Sopenharmony_ci
15938c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_BIOS                 (0x00000001)
15948c2ecf20Sopenharmony_ci
15958c2ecf20Sopenharmony_ci/*values for BIOS Page 1 IOCSettings field */
15968c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_MASK_BOOT_PREFERENCE      (0x00030000)
15978c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_ENCLOSURE_SLOT_BOOT       (0x00000000)
15988c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_SAS_ADDRESS_BOOT          (0x00010000)
15998c2ecf20Sopenharmony_ci
16008c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_MASK_RM_SETTING           (0x000000C0)
16018c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_NONE_RM_SETTING           (0x00000000)
16028c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_BOOT_RM_SETTING           (0x00000040)
16038c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_MEDIA_RM_SETTING          (0x00000080)
16048c2ecf20Sopenharmony_ci
16058c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_MASK_ADAPTER_SUPPORT      (0x00000030)
16068c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_NO_SUPPORT                (0x00000000)
16078c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_BIOS_SUPPORT              (0x00000010)
16088c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_OS_SUPPORT                (0x00000020)
16098c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_ALL_SUPPORT               (0x00000030)
16108c2ecf20Sopenharmony_ci
16118c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_IOCSET_ALTERNATE_CHS             (0x00000008)
16128c2ecf20Sopenharmony_ci
16138c2ecf20Sopenharmony_ci/*values for BIOS Page 1 DeviceSettings field */
16148c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING     (0x00000010)
16158c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN           (0x00000008)
16168c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_DEVSET_DISABLE_RM_LUN            (0x00000004)
16178c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN        (0x00000002)
16188c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_DEVSET_DISABLE_OTHER_LUN         (0x00000001)
16198c2ecf20Sopenharmony_ci
16208c2ecf20Sopenharmony_ci/*defines for BIOS Page 1 UEFIVersion field */
16218c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_MASK              (0xFF00)
16228c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_SHIFT             (8)
16238c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_MASK              (0x00FF)
16248c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_SHIFT             (0)
16258c2ecf20Sopenharmony_ci
16268c2ecf20Sopenharmony_ci
16278c2ecf20Sopenharmony_ci
16288c2ecf20Sopenharmony_ci/*BIOS Page 2 */
16298c2ecf20Sopenharmony_ci
16308c2ecf20Sopenharmony_citypedef struct _MPI2_BOOT_DEVICE_ADAPTER_ORDER {
16318c2ecf20Sopenharmony_ci	U32         Reserved1;                              /*0x00 */
16328c2ecf20Sopenharmony_ci	U32         Reserved2;                              /*0x04 */
16338c2ecf20Sopenharmony_ci	U32         Reserved3;                              /*0x08 */
16348c2ecf20Sopenharmony_ci	U32         Reserved4;                              /*0x0C */
16358c2ecf20Sopenharmony_ci	U32         Reserved5;                              /*0x10 */
16368c2ecf20Sopenharmony_ci	U32         Reserved6;                              /*0x14 */
16378c2ecf20Sopenharmony_ci} MPI2_BOOT_DEVICE_ADAPTER_ORDER,
16388c2ecf20Sopenharmony_ci	*PTR_MPI2_BOOT_DEVICE_ADAPTER_ORDER,
16398c2ecf20Sopenharmony_ci	Mpi2BootDeviceAdapterOrder_t,
16408c2ecf20Sopenharmony_ci	*pMpi2BootDeviceAdapterOrder_t;
16418c2ecf20Sopenharmony_ci
16428c2ecf20Sopenharmony_citypedef struct _MPI2_BOOT_DEVICE_SAS_WWID {
16438c2ecf20Sopenharmony_ci	U64         SASAddress;                             /*0x00 */
16448c2ecf20Sopenharmony_ci	U8          LUN[8];                                 /*0x08 */
16458c2ecf20Sopenharmony_ci	U32         Reserved1;                              /*0x10 */
16468c2ecf20Sopenharmony_ci	U32         Reserved2;                              /*0x14 */
16478c2ecf20Sopenharmony_ci} MPI2_BOOT_DEVICE_SAS_WWID,
16488c2ecf20Sopenharmony_ci	*PTR_MPI2_BOOT_DEVICE_SAS_WWID,
16498c2ecf20Sopenharmony_ci	Mpi2BootDeviceSasWwid_t,
16508c2ecf20Sopenharmony_ci	*pMpi2BootDeviceSasWwid_t;
16518c2ecf20Sopenharmony_ci
16528c2ecf20Sopenharmony_citypedef struct _MPI2_BOOT_DEVICE_ENCLOSURE_SLOT {
16538c2ecf20Sopenharmony_ci	U64         EnclosureLogicalID;                     /*0x00 */
16548c2ecf20Sopenharmony_ci	U32         Reserved1;                              /*0x08 */
16558c2ecf20Sopenharmony_ci	U32         Reserved2;                              /*0x0C */
16568c2ecf20Sopenharmony_ci	U16         SlotNumber;                             /*0x10 */
16578c2ecf20Sopenharmony_ci	U16         Reserved3;                              /*0x12 */
16588c2ecf20Sopenharmony_ci	U32         Reserved4;                              /*0x14 */
16598c2ecf20Sopenharmony_ci} MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
16608c2ecf20Sopenharmony_ci	*PTR_MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
16618c2ecf20Sopenharmony_ci	Mpi2BootDeviceEnclosureSlot_t,
16628c2ecf20Sopenharmony_ci	*pMpi2BootDeviceEnclosureSlot_t;
16638c2ecf20Sopenharmony_ci
16648c2ecf20Sopenharmony_citypedef struct _MPI2_BOOT_DEVICE_DEVICE_NAME {
16658c2ecf20Sopenharmony_ci	U64         DeviceName;                             /*0x00 */
16668c2ecf20Sopenharmony_ci	U8          LUN[8];                                 /*0x08 */
16678c2ecf20Sopenharmony_ci	U32         Reserved1;                              /*0x10 */
16688c2ecf20Sopenharmony_ci	U32         Reserved2;                              /*0x14 */
16698c2ecf20Sopenharmony_ci} MPI2_BOOT_DEVICE_DEVICE_NAME,
16708c2ecf20Sopenharmony_ci	*PTR_MPI2_BOOT_DEVICE_DEVICE_NAME,
16718c2ecf20Sopenharmony_ci	Mpi2BootDeviceDeviceName_t,
16728c2ecf20Sopenharmony_ci	*pMpi2BootDeviceDeviceName_t;
16738c2ecf20Sopenharmony_ci
16748c2ecf20Sopenharmony_citypedef union _MPI2_MPI2_BIOSPAGE2_BOOT_DEVICE {
16758c2ecf20Sopenharmony_ci	MPI2_BOOT_DEVICE_ADAPTER_ORDER  AdapterOrder;
16768c2ecf20Sopenharmony_ci	MPI2_BOOT_DEVICE_SAS_WWID       SasWwid;
16778c2ecf20Sopenharmony_ci	MPI2_BOOT_DEVICE_ENCLOSURE_SLOT EnclosureSlot;
16788c2ecf20Sopenharmony_ci	MPI2_BOOT_DEVICE_DEVICE_NAME    DeviceName;
16798c2ecf20Sopenharmony_ci} MPI2_BIOSPAGE2_BOOT_DEVICE,
16808c2ecf20Sopenharmony_ci	*PTR_MPI2_BIOSPAGE2_BOOT_DEVICE,
16818c2ecf20Sopenharmony_ci	Mpi2BiosPage2BootDevice_t,
16828c2ecf20Sopenharmony_ci	*pMpi2BiosPage2BootDevice_t;
16838c2ecf20Sopenharmony_ci
16848c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_BIOS_2 {
16858c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER     Header;                 /*0x00 */
16868c2ecf20Sopenharmony_ci	U32                         Reserved1;              /*0x04 */
16878c2ecf20Sopenharmony_ci	U32                         Reserved2;              /*0x08 */
16888c2ecf20Sopenharmony_ci	U32                         Reserved3;              /*0x0C */
16898c2ecf20Sopenharmony_ci	U32                         Reserved4;              /*0x10 */
16908c2ecf20Sopenharmony_ci	U32                         Reserved5;              /*0x14 */
16918c2ecf20Sopenharmony_ci	U32                         Reserved6;              /*0x18 */
16928c2ecf20Sopenharmony_ci	U8                          ReqBootDeviceForm;      /*0x1C */
16938c2ecf20Sopenharmony_ci	U8                          Reserved7;              /*0x1D */
16948c2ecf20Sopenharmony_ci	U16                         Reserved8;              /*0x1E */
16958c2ecf20Sopenharmony_ci	MPI2_BIOSPAGE2_BOOT_DEVICE  RequestedBootDevice;    /*0x20 */
16968c2ecf20Sopenharmony_ci	U8                          ReqAltBootDeviceForm;   /*0x38 */
16978c2ecf20Sopenharmony_ci	U8                          Reserved9;              /*0x39 */
16988c2ecf20Sopenharmony_ci	U16                         Reserved10;             /*0x3A */
16998c2ecf20Sopenharmony_ci	MPI2_BIOSPAGE2_BOOT_DEVICE  RequestedAltBootDevice; /*0x3C */
17008c2ecf20Sopenharmony_ci	U8                          CurrentBootDeviceForm;  /*0x58 */
17018c2ecf20Sopenharmony_ci	U8                          Reserved11;             /*0x59 */
17028c2ecf20Sopenharmony_ci	U16                         Reserved12;             /*0x5A */
17038c2ecf20Sopenharmony_ci	MPI2_BIOSPAGE2_BOOT_DEVICE  CurrentBootDevice;      /*0x58 */
17048c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_BIOS_2, *PTR_MPI2_CONFIG_PAGE_BIOS_2,
17058c2ecf20Sopenharmony_ci	Mpi2BiosPage2_t, *pMpi2BiosPage2_t;
17068c2ecf20Sopenharmony_ci
17078c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_PAGEVERSION                      (0x04)
17088c2ecf20Sopenharmony_ci
17098c2ecf20Sopenharmony_ci/*values for BIOS Page 2 BootDeviceForm fields */
17108c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_FORM_MASK                        (0x0F)
17118c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_FORM_NO_DEVICE_SPECIFIED         (0x00)
17128c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_FORM_SAS_WWID                    (0x05)
17138c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_FORM_ENCLOSURE_SLOT              (0x06)
17148c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE2_FORM_DEVICE_NAME                 (0x07)
17158c2ecf20Sopenharmony_ci
17168c2ecf20Sopenharmony_ci
17178c2ecf20Sopenharmony_ci/*BIOS Page 3 */
17188c2ecf20Sopenharmony_ci
17198c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_NUM_ADAPTER      (4)
17208c2ecf20Sopenharmony_ci
17218c2ecf20Sopenharmony_citypedef struct _MPI2_ADAPTER_INFO {
17228c2ecf20Sopenharmony_ci	U8      PciBusNumber;                        /*0x00 */
17238c2ecf20Sopenharmony_ci	U8      PciDeviceAndFunctionNumber;          /*0x01 */
17248c2ecf20Sopenharmony_ci	U16     AdapterFlags;                        /*0x02 */
17258c2ecf20Sopenharmony_ci} MPI2_ADAPTER_INFO, *PTR_MPI2_ADAPTER_INFO,
17268c2ecf20Sopenharmony_ci	Mpi2AdapterInfo_t, *pMpi2AdapterInfo_t;
17278c2ecf20Sopenharmony_ci
17288c2ecf20Sopenharmony_ci#define MPI2_ADAPTER_INFO_FLAGS_EMBEDDED                (0x0001)
17298c2ecf20Sopenharmony_ci#define MPI2_ADAPTER_INFO_FLAGS_INIT_STATUS             (0x0002)
17308c2ecf20Sopenharmony_ci
17318c2ecf20Sopenharmony_citypedef struct _MPI2_ADAPTER_ORDER_AUX {
17328c2ecf20Sopenharmony_ci	U64     WWID;					/* 0x00 */
17338c2ecf20Sopenharmony_ci	U32     Reserved1;				/* 0x08 */
17348c2ecf20Sopenharmony_ci	U32     Reserved2;				/* 0x0C */
17358c2ecf20Sopenharmony_ci} MPI2_ADAPTER_ORDER_AUX, *PTR_MPI2_ADAPTER_ORDER_AUX,
17368c2ecf20Sopenharmony_ci	Mpi2AdapterOrderAux_t, *pMpi2AdapterOrderAux_t;
17378c2ecf20Sopenharmony_ci
17388c2ecf20Sopenharmony_ci
17398c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_BIOS_3 {
17408c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;              /*0x00 */
17418c2ecf20Sopenharmony_ci	U32                     GlobalFlags;         /*0x04 */
17428c2ecf20Sopenharmony_ci	U32                     BiosVersion;         /*0x08 */
17438c2ecf20Sopenharmony_ci	MPI2_ADAPTER_INFO       AdapterOrder[MPI2_BIOSPAGE3_NUM_ADAPTER];
17448c2ecf20Sopenharmony_ci	U32                     Reserved1;           /*0x1C */
17458c2ecf20Sopenharmony_ci	MPI2_ADAPTER_ORDER_AUX  AdapterOrderAux[MPI2_BIOSPAGE3_NUM_ADAPTER];
17468c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_BIOS_3,
17478c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_BIOS_3,
17488c2ecf20Sopenharmony_ci	Mpi2BiosPage3_t, *pMpi2BiosPage3_t;
17498c2ecf20Sopenharmony_ci
17508c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_PAGEVERSION                      (0x01)
17518c2ecf20Sopenharmony_ci
17528c2ecf20Sopenharmony_ci/*values for BIOS Page 3 GlobalFlags */
17538c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_PAUSE_ON_ERROR             (0x00000002)
17548c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_VERBOSE_ENABLE             (0x00000004)
17558c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_HOOK_INT_40_DISABLE        (0x00000010)
17568c2ecf20Sopenharmony_ci
17578c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_DEV_LIST_DISPLAY_MASK      (0x000000E0)
17588c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_INSTALLED_DEV_DISPLAY      (0x00000000)
17598c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DISPLAY            (0x00000020)
17608c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DEV_DISPLAY        (0x00000040)
17618c2ecf20Sopenharmony_ci
17628c2ecf20Sopenharmony_ci
17638c2ecf20Sopenharmony_ci/*BIOS Page 4 */
17648c2ecf20Sopenharmony_ci
17658c2ecf20Sopenharmony_ci/*
17668c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
17678c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
17688c2ecf20Sopenharmony_ci */
17698c2ecf20Sopenharmony_ci#ifndef MPI2_BIOS_PAGE_4_PHY_ENTRIES
17708c2ecf20Sopenharmony_ci#define MPI2_BIOS_PAGE_4_PHY_ENTRIES        (1)
17718c2ecf20Sopenharmony_ci#endif
17728c2ecf20Sopenharmony_ci
17738c2ecf20Sopenharmony_citypedef struct _MPI2_BIOS4_ENTRY {
17748c2ecf20Sopenharmony_ci	U64                     ReassignmentWWID;       /*0x00 */
17758c2ecf20Sopenharmony_ci	U64                     ReassignmentDeviceName; /*0x08 */
17768c2ecf20Sopenharmony_ci} MPI2_BIOS4_ENTRY, *PTR_MPI2_BIOS4_ENTRY,
17778c2ecf20Sopenharmony_ci	Mpi2MBios4Entry_t, *pMpi2Bios4Entry_t;
17788c2ecf20Sopenharmony_ci
17798c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_BIOS_4 {
17808c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;             /*0x00 */
17818c2ecf20Sopenharmony_ci	U8                      NumPhys;            /*0x04 */
17828c2ecf20Sopenharmony_ci	U8                      Reserved1;          /*0x05 */
17838c2ecf20Sopenharmony_ci	U16                     Reserved2;          /*0x06 */
17848c2ecf20Sopenharmony_ci	MPI2_BIOS4_ENTRY
17858c2ecf20Sopenharmony_ci		Phy[MPI2_BIOS_PAGE_4_PHY_ENTRIES];  /*0x08 */
17868c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_BIOS_4, *PTR_MPI2_CONFIG_PAGE_BIOS_4,
17878c2ecf20Sopenharmony_ci	Mpi2BiosPage4_t, *pMpi2BiosPage4_t;
17888c2ecf20Sopenharmony_ci
17898c2ecf20Sopenharmony_ci#define MPI2_BIOSPAGE4_PAGEVERSION                      (0x01)
17908c2ecf20Sopenharmony_ci
17918c2ecf20Sopenharmony_ci
17928c2ecf20Sopenharmony_ci/****************************************************************************
17938c2ecf20Sopenharmony_ci*  RAID Volume Config Pages
17948c2ecf20Sopenharmony_ci****************************************************************************/
17958c2ecf20Sopenharmony_ci
17968c2ecf20Sopenharmony_ci/*RAID Volume Page 0 */
17978c2ecf20Sopenharmony_ci
17988c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDVOL0_PHYS_DISK {
17998c2ecf20Sopenharmony_ci	U8                      RAIDSetNum;        /*0x00 */
18008c2ecf20Sopenharmony_ci	U8                      PhysDiskMap;       /*0x01 */
18018c2ecf20Sopenharmony_ci	U8                      PhysDiskNum;       /*0x02 */
18028c2ecf20Sopenharmony_ci	U8                      Reserved;          /*0x03 */
18038c2ecf20Sopenharmony_ci} MPI2_RAIDVOL0_PHYS_DISK, *PTR_MPI2_RAIDVOL0_PHYS_DISK,
18048c2ecf20Sopenharmony_ci	Mpi2RaidVol0PhysDisk_t, *pMpi2RaidVol0PhysDisk_t;
18058c2ecf20Sopenharmony_ci
18068c2ecf20Sopenharmony_ci/*defines for the PhysDiskMap field */
18078c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_PHYSDISK_PRIMARY                  (0x01)
18088c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_PHYSDISK_SECONDARY                (0x02)
18098c2ecf20Sopenharmony_ci
18108c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDVOL0_SETTINGS {
18118c2ecf20Sopenharmony_ci	U16                     Settings;          /*0x00 */
18128c2ecf20Sopenharmony_ci	U8                      HotSparePool;      /*0x01 */
18138c2ecf20Sopenharmony_ci	U8                      Reserved;          /*0x02 */
18148c2ecf20Sopenharmony_ci} MPI2_RAIDVOL0_SETTINGS, *PTR_MPI2_RAIDVOL0_SETTINGS,
18158c2ecf20Sopenharmony_ci	Mpi2RaidVol0Settings_t,
18168c2ecf20Sopenharmony_ci	*pMpi2RaidVol0Settings_t;
18178c2ecf20Sopenharmony_ci
18188c2ecf20Sopenharmony_ci/*RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk */
18198c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_0                      (0x01)
18208c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_1                      (0x02)
18218c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_2                      (0x04)
18228c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_3                      (0x08)
18238c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_4                      (0x10)
18248c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_5                      (0x20)
18258c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_6                      (0x40)
18268c2ecf20Sopenharmony_ci#define MPI2_RAID_HOT_SPARE_POOL_7                      (0x80)
18278c2ecf20Sopenharmony_ci
18288c2ecf20Sopenharmony_ci/*RAID Volume Page 0 VolumeSettings defines */
18298c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX     (0x0008)
18308c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_AUTO_CONFIG_HSWAP_DISABLE (0x0004)
18318c2ecf20Sopenharmony_ci
18328c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_MASK_WRITE_CACHING        (0x0003)
18338c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_UNCHANGED                 (0x0000)
18348c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_DISABLE_WRITE_CACHING     (0x0001)
18358c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SETTING_ENABLE_WRITE_CACHING      (0x0002)
18368c2ecf20Sopenharmony_ci
18378c2ecf20Sopenharmony_ci/*
18388c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
18398c2ecf20Sopenharmony_ci *one and check the value returned for NumPhysDisks at runtime.
18408c2ecf20Sopenharmony_ci */
18418c2ecf20Sopenharmony_ci#ifndef MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX
18428c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX       (1)
18438c2ecf20Sopenharmony_ci#endif
18448c2ecf20Sopenharmony_ci
18458c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_RAID_VOL_0 {
18468c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;            /*0x00 */
18478c2ecf20Sopenharmony_ci	U16                     DevHandle;         /*0x04 */
18488c2ecf20Sopenharmony_ci	U8                      VolumeState;       /*0x06 */
18498c2ecf20Sopenharmony_ci	U8                      VolumeType;        /*0x07 */
18508c2ecf20Sopenharmony_ci	U32                     VolumeStatusFlags; /*0x08 */
18518c2ecf20Sopenharmony_ci	MPI2_RAIDVOL0_SETTINGS  VolumeSettings;    /*0x0C */
18528c2ecf20Sopenharmony_ci	U64                     MaxLBA;            /*0x10 */
18538c2ecf20Sopenharmony_ci	U32                     StripeSize;        /*0x18 */
18548c2ecf20Sopenharmony_ci	U16                     BlockSize;         /*0x1C */
18558c2ecf20Sopenharmony_ci	U16                     Reserved1;         /*0x1E */
18568c2ecf20Sopenharmony_ci	U8                      SupportedPhysDisks;/*0x20 */
18578c2ecf20Sopenharmony_ci	U8                      ResyncRate;        /*0x21 */
18588c2ecf20Sopenharmony_ci	U16                     DataScrubDuration; /*0x22 */
18598c2ecf20Sopenharmony_ci	U8                      NumPhysDisks;      /*0x24 */
18608c2ecf20Sopenharmony_ci	U8                      Reserved2;         /*0x25 */
18618c2ecf20Sopenharmony_ci	U8                      Reserved3;         /*0x26 */
18628c2ecf20Sopenharmony_ci	U8                      InactiveStatus;    /*0x27 */
18638c2ecf20Sopenharmony_ci	MPI2_RAIDVOL0_PHYS_DISK
18648c2ecf20Sopenharmony_ci	PhysDisk[MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX]; /*0x28 */
18658c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_RAID_VOL_0,
18668c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_RAID_VOL_0,
18678c2ecf20Sopenharmony_ci	Mpi2RaidVolPage0_t, *pMpi2RaidVolPage0_t;
18688c2ecf20Sopenharmony_ci
18698c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_PAGEVERSION           (0x0A)
18708c2ecf20Sopenharmony_ci
18718c2ecf20Sopenharmony_ci/*values for RAID VolumeState */
18728c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_MISSING                         (0x00)
18738c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_FAILED                          (0x01)
18748c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_INITIALIZING                    (0x02)
18758c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_ONLINE                          (0x03)
18768c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_DEGRADED                        (0x04)
18778c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_STATE_OPTIMAL                         (0x05)
18788c2ecf20Sopenharmony_ci
18798c2ecf20Sopenharmony_ci/*values for RAID VolumeType */
18808c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_TYPE_RAID0                            (0x00)
18818c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_TYPE_RAID1E                           (0x01)
18828c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_TYPE_RAID1                            (0x02)
18838c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_TYPE_RAID10                           (0x05)
18848c2ecf20Sopenharmony_ci#define MPI2_RAID_VOL_TYPE_UNKNOWN                          (0xFF)
18858c2ecf20Sopenharmony_ci
18868c2ecf20Sopenharmony_ci/*values for RAID Volume Page 0 VolumeStatusFlags field */
18878c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_PENDING_RESYNC            (0x02000000)
18888c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_BACKG_INIT_PENDING        (0x01000000)
18898c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_MDC_PENDING               (0x00800000)
18908c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_USER_CONSIST_PENDING      (0x00400000)
18918c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_MAKE_DATA_CONSISTENT      (0x00200000)
18928c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_DATA_SCRUB                (0x00100000)
18938c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_CONSISTENCY_CHECK         (0x00080000)
18948c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_CAPACITY_EXPANSION        (0x00040000)
18958c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_BACKGROUND_INIT           (0x00020000)
18968c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS        (0x00010000)
18978c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT        (0x00000080)
18988c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_OCE_ALLOWED               (0x00000040)
18998c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_BGI_COMPLETE              (0x00000020)
19008c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_1E_OFFSET_MIRROR          (0x00000000)
19018c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_1E_ADJACENT_MIRROR        (0x00000010)
19028c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_BAD_BLOCK_TABLE_FULL      (0x00000008)
19038c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE           (0x00000004)
19048c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_QUIESCED                  (0x00000002)
19058c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_STATUS_FLAG_ENABLED                   (0x00000001)
19068c2ecf20Sopenharmony_ci
19078c2ecf20Sopenharmony_ci/*values for RAID Volume Page 0 SupportedPhysDisks field */
19088c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SUPPORT_SOLID_STATE_DISKS             (0x08)
19098c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SUPPORT_HARD_DISKS                    (0x04)
19108c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SUPPORT_SAS_PROTOCOL                  (0x02)
19118c2ecf20Sopenharmony_ci#define MPI2_RAIDVOL0_SUPPORT_SATA_PROTOCOL                 (0x01)
19128c2ecf20Sopenharmony_ci
19138c2ecf20Sopenharmony_ci/*values for RAID Volume Page 0 InactiveStatus field */
19148c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_UNKNOWN_INACTIVE                  (0x00)
19158c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_STALE_METADATA_INACTIVE           (0x01)
19168c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_FOREIGN_VOLUME_INACTIVE           (0x02)
19178c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_RESOURCE_INACTIVE    (0x03)
19188c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_CLONE_VOLUME_INACTIVE             (0x04)
19198c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_METADATA_INACTIVE    (0x05)
19208c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE0_PREVIOUSLY_DELETED                (0x06)
19218c2ecf20Sopenharmony_ci
19228c2ecf20Sopenharmony_ci
19238c2ecf20Sopenharmony_ci/*RAID Volume Page 1 */
19248c2ecf20Sopenharmony_ci
19258c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_RAID_VOL_1 {
19268c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
19278c2ecf20Sopenharmony_ci	U16                     DevHandle;                  /*0x04 */
19288c2ecf20Sopenharmony_ci	U16                     Reserved0;                  /*0x06 */
19298c2ecf20Sopenharmony_ci	U8                      GUID[24];                   /*0x08 */
19308c2ecf20Sopenharmony_ci	U8                      Name[16];                   /*0x20 */
19318c2ecf20Sopenharmony_ci	U64                     WWID;                       /*0x30 */
19328c2ecf20Sopenharmony_ci	U32                     Reserved1;                  /*0x38 */
19338c2ecf20Sopenharmony_ci	U32                     Reserved2;                  /*0x3C */
19348c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_RAID_VOL_1,
19358c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_RAID_VOL_1,
19368c2ecf20Sopenharmony_ci	Mpi2RaidVolPage1_t, *pMpi2RaidVolPage1_t;
19378c2ecf20Sopenharmony_ci
19388c2ecf20Sopenharmony_ci#define MPI2_RAIDVOLPAGE1_PAGEVERSION           (0x03)
19398c2ecf20Sopenharmony_ci
19408c2ecf20Sopenharmony_ci
19418c2ecf20Sopenharmony_ci/****************************************************************************
19428c2ecf20Sopenharmony_ci*  RAID Physical Disk Config Pages
19438c2ecf20Sopenharmony_ci****************************************************************************/
19448c2ecf20Sopenharmony_ci
19458c2ecf20Sopenharmony_ci/*RAID Physical Disk Page 0 */
19468c2ecf20Sopenharmony_ci
19478c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDPHYSDISK0_SETTINGS {
19488c2ecf20Sopenharmony_ci	U16                     Reserved1;                  /*0x00 */
19498c2ecf20Sopenharmony_ci	U8                      HotSparePool;               /*0x02 */
19508c2ecf20Sopenharmony_ci	U8                      Reserved2;                  /*0x03 */
19518c2ecf20Sopenharmony_ci} MPI2_RAIDPHYSDISK0_SETTINGS,
19528c2ecf20Sopenharmony_ci	*PTR_MPI2_RAIDPHYSDISK0_SETTINGS,
19538c2ecf20Sopenharmony_ci	Mpi2RaidPhysDisk0Settings_t,
19548c2ecf20Sopenharmony_ci	*pMpi2RaidPhysDisk0Settings_t;
19558c2ecf20Sopenharmony_ci
19568c2ecf20Sopenharmony_ci/*use MPI2_RAID_HOT_SPARE_POOL_ defines for the HotSparePool field */
19578c2ecf20Sopenharmony_ci
19588c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDPHYSDISK0_INQUIRY_DATA {
19598c2ecf20Sopenharmony_ci	U8                      VendorID[8];                /*0x00 */
19608c2ecf20Sopenharmony_ci	U8                      ProductID[16];              /*0x08 */
19618c2ecf20Sopenharmony_ci	U8                      ProductRevLevel[4];         /*0x18 */
19628c2ecf20Sopenharmony_ci	U8                      SerialNum[32];              /*0x1C */
19638c2ecf20Sopenharmony_ci} MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
19648c2ecf20Sopenharmony_ci	*PTR_MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
19658c2ecf20Sopenharmony_ci	Mpi2RaidPhysDisk0InquiryData_t,
19668c2ecf20Sopenharmony_ci	*pMpi2RaidPhysDisk0InquiryData_t;
19678c2ecf20Sopenharmony_ci
19688c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_RD_PDISK_0 {
19698c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER         Header;             /*0x00 */
19708c2ecf20Sopenharmony_ci	U16                             DevHandle;          /*0x04 */
19718c2ecf20Sopenharmony_ci	U8                              Reserved1;          /*0x06 */
19728c2ecf20Sopenharmony_ci	U8                              PhysDiskNum;        /*0x07 */
19738c2ecf20Sopenharmony_ci	MPI2_RAIDPHYSDISK0_SETTINGS     PhysDiskSettings;   /*0x08 */
19748c2ecf20Sopenharmony_ci	U32                             Reserved2;          /*0x0C */
19758c2ecf20Sopenharmony_ci	MPI2_RAIDPHYSDISK0_INQUIRY_DATA InquiryData;        /*0x10 */
19768c2ecf20Sopenharmony_ci	U32                             Reserved3;          /*0x4C */
19778c2ecf20Sopenharmony_ci	U8                              PhysDiskState;      /*0x50 */
19788c2ecf20Sopenharmony_ci	U8                              OfflineReason;      /*0x51 */
19798c2ecf20Sopenharmony_ci	U8                              IncompatibleReason; /*0x52 */
19808c2ecf20Sopenharmony_ci	U8                              PhysDiskAttributes; /*0x53 */
19818c2ecf20Sopenharmony_ci	U32                             PhysDiskStatusFlags;/*0x54 */
19828c2ecf20Sopenharmony_ci	U64                             DeviceMaxLBA;       /*0x58 */
19838c2ecf20Sopenharmony_ci	U64                             HostMaxLBA;         /*0x60 */
19848c2ecf20Sopenharmony_ci	U64                             CoercedMaxLBA;      /*0x68 */
19858c2ecf20Sopenharmony_ci	U16                             BlockSize;          /*0x70 */
19868c2ecf20Sopenharmony_ci	U16                             Reserved5;          /*0x72 */
19878c2ecf20Sopenharmony_ci	U32                             Reserved6;          /*0x74 */
19888c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_RD_PDISK_0,
19898c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_RD_PDISK_0,
19908c2ecf20Sopenharmony_ci	Mpi2RaidPhysDiskPage0_t,
19918c2ecf20Sopenharmony_ci	*pMpi2RaidPhysDiskPage0_t;
19928c2ecf20Sopenharmony_ci
19938c2ecf20Sopenharmony_ci#define MPI2_RAIDPHYSDISKPAGE0_PAGEVERSION          (0x05)
19948c2ecf20Sopenharmony_ci
19958c2ecf20Sopenharmony_ci/*PhysDiskState defines */
19968c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_NOT_CONFIGURED               (0x00)
19978c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_NOT_COMPATIBLE               (0x01)
19988c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_OFFLINE                      (0x02)
19998c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_ONLINE                       (0x03)
20008c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_HOT_SPARE                    (0x04)
20018c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_DEGRADED                     (0x05)
20028c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_REBUILDING                   (0x06)
20038c2ecf20Sopenharmony_ci#define MPI2_RAID_PD_STATE_OPTIMAL                      (0x07)
20048c2ecf20Sopenharmony_ci
20058c2ecf20Sopenharmony_ci/*OfflineReason defines */
20068c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ONLINE                           (0x00)
20078c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_MISSING                  (0x01)
20088c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_FAILED                   (0x03)
20098c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_INITIALIZING             (0x04)
20108c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_REQUESTED                (0x05)
20118c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_FAILED_REQUESTED         (0x06)
20128c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_OFFLINE_OTHER                    (0xFF)
20138c2ecf20Sopenharmony_ci
20148c2ecf20Sopenharmony_ci/*IncompatibleReason defines */
20158c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_COMPATIBLE                       (0x00)
20168c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_PROTOCOL            (0x01)
20178c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_BLOCKSIZE           (0x02)
20188c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_MAX_LBA             (0x03)
20198c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_SATA_EXTENDED_CMD   (0x04)
20208c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_REMOVEABLE_MEDIA    (0x05)
20218c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE          (0x06)
20228c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_INCOMPATIBLE_UNKNOWN             (0xFF)
20238c2ecf20Sopenharmony_ci
20248c2ecf20Sopenharmony_ci/*PhysDiskAttributes defines */
20258c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_MEDIA_MASK                (0x0C)
20268c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_SOLID_STATE_DRIVE         (0x08)
20278c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_HARD_DISK_DRIVE           (0x04)
20288c2ecf20Sopenharmony_ci
20298c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_PROTOCOL_MASK             (0x03)
20308c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_SAS_PROTOCOL              (0x02)
20318c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_ATTRIB_SATA_PROTOCOL             (0x01)
20328c2ecf20Sopenharmony_ci
20338c2ecf20Sopenharmony_ci/*PhysDiskStatusFlags defines */
20348c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED        (0x00000040)
20358c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_OCE_TARGET           (0x00000020)
20368c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_WRITE_CACHE_ENABLED  (0x00000010)
20378c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_OPTIMAL_PREVIOUS     (0x00000000)
20388c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_OPTIMAL_PREVIOUS (0x00000008)
20398c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME      (0x00000004)
20408c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_QUIESCED             (0x00000002)
20418c2ecf20Sopenharmony_ci#define MPI2_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC          (0x00000001)
20428c2ecf20Sopenharmony_ci
20438c2ecf20Sopenharmony_ci
20448c2ecf20Sopenharmony_ci/*RAID Physical Disk Page 1 */
20458c2ecf20Sopenharmony_ci
20468c2ecf20Sopenharmony_ci/*
20478c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
20488c2ecf20Sopenharmony_ci *one and check the value returned for NumPhysDiskPaths at runtime.
20498c2ecf20Sopenharmony_ci */
20508c2ecf20Sopenharmony_ci#ifndef MPI2_RAID_PHYS_DISK1_PATH_MAX
20518c2ecf20Sopenharmony_ci#define MPI2_RAID_PHYS_DISK1_PATH_MAX   (1)
20528c2ecf20Sopenharmony_ci#endif
20538c2ecf20Sopenharmony_ci
20548c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDPHYSDISK1_PATH {
20558c2ecf20Sopenharmony_ci	U16             DevHandle;          /*0x00 */
20568c2ecf20Sopenharmony_ci	U16             Reserved1;          /*0x02 */
20578c2ecf20Sopenharmony_ci	U64             WWID;               /*0x04 */
20588c2ecf20Sopenharmony_ci	U64             OwnerWWID;          /*0x0C */
20598c2ecf20Sopenharmony_ci	U8              OwnerIdentifier;    /*0x14 */
20608c2ecf20Sopenharmony_ci	U8              Reserved2;          /*0x15 */
20618c2ecf20Sopenharmony_ci	U16             Flags;              /*0x16 */
20628c2ecf20Sopenharmony_ci} MPI2_RAIDPHYSDISK1_PATH, *PTR_MPI2_RAIDPHYSDISK1_PATH,
20638c2ecf20Sopenharmony_ci	Mpi2RaidPhysDisk1Path_t,
20648c2ecf20Sopenharmony_ci	*pMpi2RaidPhysDisk1Path_t;
20658c2ecf20Sopenharmony_ci
20668c2ecf20Sopenharmony_ci/*RAID Physical Disk Page 1 Physical Disk Path Flags field defines */
20678c2ecf20Sopenharmony_ci#define MPI2_RAID_PHYSDISK1_FLAG_PRIMARY        (0x0004)
20688c2ecf20Sopenharmony_ci#define MPI2_RAID_PHYSDISK1_FLAG_BROKEN         (0x0002)
20698c2ecf20Sopenharmony_ci#define MPI2_RAID_PHYSDISK1_FLAG_INVALID        (0x0001)
20708c2ecf20Sopenharmony_ci
20718c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 {
20728c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_HEADER         Header;             /*0x00 */
20738c2ecf20Sopenharmony_ci	U8                              NumPhysDiskPaths;   /*0x04 */
20748c2ecf20Sopenharmony_ci	U8                              PhysDiskNum;        /*0x05 */
20758c2ecf20Sopenharmony_ci	U16                             Reserved1;          /*0x06 */
20768c2ecf20Sopenharmony_ci	U32                             Reserved2;          /*0x08 */
20778c2ecf20Sopenharmony_ci	MPI2_RAIDPHYSDISK1_PATH
20788c2ecf20Sopenharmony_ci		PhysicalDiskPath[MPI2_RAID_PHYS_DISK1_PATH_MAX];/*0x0C */
20798c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_RD_PDISK_1,
20808c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_RD_PDISK_1,
20818c2ecf20Sopenharmony_ci	Mpi2RaidPhysDiskPage1_t,
20828c2ecf20Sopenharmony_ci	*pMpi2RaidPhysDiskPage1_t;
20838c2ecf20Sopenharmony_ci
20848c2ecf20Sopenharmony_ci#define MPI2_RAIDPHYSDISKPAGE1_PAGEVERSION          (0x02)
20858c2ecf20Sopenharmony_ci
20868c2ecf20Sopenharmony_ci
20878c2ecf20Sopenharmony_ci/****************************************************************************
20888c2ecf20Sopenharmony_ci*  values for fields used by several types of SAS Config Pages
20898c2ecf20Sopenharmony_ci****************************************************************************/
20908c2ecf20Sopenharmony_ci
20918c2ecf20Sopenharmony_ci/*values for NegotiatedLinkRates fields */
20928c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_MASK_LOGICAL             (0xF0)
20938c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_SHIFT_LOGICAL            (4)
20948c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_MASK_PHYSICAL            (0x0F)
20958c2ecf20Sopenharmony_ci/*link rates used for Negotiated Physical and Logical Link Rate */
20968c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_UNKNOWN_LINK_RATE        (0x00)
20978c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_PHY_DISABLED             (0x01)
20988c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_NEGOTIATION_FAILED       (0x02)
20998c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_SATA_OOB_COMPLETE        (0x03)
21008c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_PORT_SELECTOR            (0x04)
21018c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_SMP_RESET_IN_PROGRESS    (0x05)
21028c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY          (0x06)
21038c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_1_5                      (0x08)
21048c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_3_0                      (0x09)
21058c2ecf20Sopenharmony_ci#define MPI2_SAS_NEG_LINK_RATE_6_0                      (0x0A)
21068c2ecf20Sopenharmony_ci#define MPI25_SAS_NEG_LINK_RATE_12_0                    (0x0B)
21078c2ecf20Sopenharmony_ci#define MPI26_SAS_NEG_LINK_RATE_22_5                    (0x0C)
21088c2ecf20Sopenharmony_ci
21098c2ecf20Sopenharmony_ci
21108c2ecf20Sopenharmony_ci/*values for AttachedPhyInfo fields */
21118c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_INSIDE_ZPSDS_PERSISTENT       (0x00000040)
21128c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REQUESTED_INSIDE_ZPSDS        (0x00000020)
21138c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_BREAK_REPLY_CAPABLE           (0x00000010)
21148c2ecf20Sopenharmony_ci
21158c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_MASK                   (0x0000000F)
21168c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_UNKNOWN                (0x00000000)
21178c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_POWER_ON               (0x00000001)
21188c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_HARD_RESET             (0x00000002)
21198c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_SMP_PHY_CONTROL        (0x00000003)
21208c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_LOSS_OF_SYNC           (0x00000004)
21218c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_MULTIPLEXING_SEQ       (0x00000005)
21228c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_IT_NEXUS_LOSS_TIMER    (0x00000006)
21238c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_BREAK_TIMEOUT          (0x00000007)
21248c2ecf20Sopenharmony_ci#define MPI2_SAS_APHYINFO_REASON_PHY_TEST_STOPPED       (0x00000008)
21258c2ecf20Sopenharmony_ci
21268c2ecf20Sopenharmony_ci
21278c2ecf20Sopenharmony_ci/*values for PhyInfo fields */
21288c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_PHY_VACANT                     (0x80000000)
21298c2ecf20Sopenharmony_ci
21308c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_PHY_POWER_CONDITION_MASK       (0x18000000)
21318c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_SHIFT_PHY_POWER_CONDITION      (27)
21328c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_PHY_POWER_ACTIVE               (0x00000000)
21338c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_PHY_POWER_PARTIAL              (0x08000000)
21348c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_PHY_POWER_SLUMBER              (0x10000000)
21358c2ecf20Sopenharmony_ci
21368c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_CHANGED_REQ_INSIDE_ZPSDS       (0x04000000)
21378c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS_PERSISTENT        (0x02000000)
21388c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REQ_INSIDE_ZPSDS               (0x01000000)
21398c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_ZONE_GROUP_PERSISTENT          (0x00400000)
21408c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS                   (0x00200000)
21418c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_ZONING_ENABLED                 (0x00100000)
21428c2ecf20Sopenharmony_ci
21438c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_MASK                    (0x000F0000)
21448c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_UNKNOWN                 (0x00000000)
21458c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_POWER_ON                (0x00010000)
21468c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_HARD_RESET              (0x00020000)
21478c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_SMP_PHY_CONTROL         (0x00030000)
21488c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_LOSS_OF_SYNC            (0x00040000)
21498c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_MULTIPLEXING_SEQ        (0x00050000)
21508c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_IT_NEXUS_LOSS_TIMER     (0x00060000)
21518c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_BREAK_TIMEOUT           (0x00070000)
21528c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_REASON_PHY_TEST_STOPPED        (0x00080000)
21538c2ecf20Sopenharmony_ci
21548c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_MULTIPLEXING_SUPPORTED         (0x00008000)
21558c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_SATA_PORT_ACTIVE               (0x00004000)
21568c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_SATA_PORT_SELECTOR_PRESENT     (0x00002000)
21578c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_VIRTUAL_PHY                    (0x00001000)
21588c2ecf20Sopenharmony_ci
21598c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_MASK_PARTIAL_PATHWAY_TIME      (0x00000F00)
21608c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME     (8)
21618c2ecf20Sopenharmony_ci
21628c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_MASK_ROUTING_ATTRIBUTE         (0x000000F0)
21638c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_DIRECT_ROUTING                 (0x00000000)
21648c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_SUBTRACTIVE_ROUTING            (0x00000010)
21658c2ecf20Sopenharmony_ci#define MPI2_SAS_PHYINFO_TABLE_ROUTING                  (0x00000020)
21668c2ecf20Sopenharmony_ci
21678c2ecf20Sopenharmony_ci
21688c2ecf20Sopenharmony_ci/*values for SAS ProgrammedLinkRate fields */
21698c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MAX_RATE_MASK                    (0xF0)
21708c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MAX_RATE_NOT_PROGRAMMABLE        (0x00)
21718c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MAX_RATE_1_5                     (0x80)
21728c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MAX_RATE_3_0                     (0x90)
21738c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MAX_RATE_6_0                     (0xA0)
21748c2ecf20Sopenharmony_ci#define MPI25_SAS_PRATE_MAX_RATE_12_0                   (0xB0)
21758c2ecf20Sopenharmony_ci#define MPI26_SAS_PRATE_MAX_RATE_22_5                   (0xC0)
21768c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MIN_RATE_MASK                    (0x0F)
21778c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE        (0x00)
21788c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MIN_RATE_1_5                     (0x08)
21798c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MIN_RATE_3_0                     (0x09)
21808c2ecf20Sopenharmony_ci#define MPI2_SAS_PRATE_MIN_RATE_6_0                     (0x0A)
21818c2ecf20Sopenharmony_ci#define MPI25_SAS_PRATE_MIN_RATE_12_0                   (0x0B)
21828c2ecf20Sopenharmony_ci#define MPI26_SAS_PRATE_MIN_RATE_22_5                   (0x0C)
21838c2ecf20Sopenharmony_ci
21848c2ecf20Sopenharmony_ci
21858c2ecf20Sopenharmony_ci/*values for SAS HwLinkRate fields */
21868c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MAX_RATE_MASK                   (0xF0)
21878c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MAX_RATE_1_5                    (0x80)
21888c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MAX_RATE_3_0                    (0x90)
21898c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MAX_RATE_6_0                    (0xA0)
21908c2ecf20Sopenharmony_ci#define MPI25_SAS_HWRATE_MAX_RATE_12_0                  (0xB0)
21918c2ecf20Sopenharmony_ci#define MPI26_SAS_HWRATE_MAX_RATE_22_5                  (0xC0)
21928c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MIN_RATE_MASK                   (0x0F)
21938c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MIN_RATE_1_5                    (0x08)
21948c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MIN_RATE_3_0                    (0x09)
21958c2ecf20Sopenharmony_ci#define MPI2_SAS_HWRATE_MIN_RATE_6_0                    (0x0A)
21968c2ecf20Sopenharmony_ci#define MPI25_SAS_HWRATE_MIN_RATE_12_0                  (0x0B)
21978c2ecf20Sopenharmony_ci#define MPI26_SAS_HWRATE_MIN_RATE_22_5                  (0x0C)
21988c2ecf20Sopenharmony_ci
21998c2ecf20Sopenharmony_ci
22008c2ecf20Sopenharmony_ci
22018c2ecf20Sopenharmony_ci/****************************************************************************
22028c2ecf20Sopenharmony_ci*  SAS IO Unit Config Pages
22038c2ecf20Sopenharmony_ci****************************************************************************/
22048c2ecf20Sopenharmony_ci
22058c2ecf20Sopenharmony_ci/*SAS IO Unit Page 0 */
22068c2ecf20Sopenharmony_ci
22078c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IO_UNIT0_PHY_DATA {
22088c2ecf20Sopenharmony_ci	U8          Port;                   /*0x00 */
22098c2ecf20Sopenharmony_ci	U8          PortFlags;              /*0x01 */
22108c2ecf20Sopenharmony_ci	U8          PhyFlags;               /*0x02 */
22118c2ecf20Sopenharmony_ci	U8          NegotiatedLinkRate;     /*0x03 */
22128c2ecf20Sopenharmony_ci	U32         ControllerPhyDeviceInfo;/*0x04 */
22138c2ecf20Sopenharmony_ci	U16         AttachedDevHandle;      /*0x08 */
22148c2ecf20Sopenharmony_ci	U16         ControllerDevHandle;    /*0x0A */
22158c2ecf20Sopenharmony_ci	U32         DiscoveryStatus;        /*0x0C */
22168c2ecf20Sopenharmony_ci	U32         Reserved;               /*0x10 */
22178c2ecf20Sopenharmony_ci} MPI2_SAS_IO_UNIT0_PHY_DATA,
22188c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IO_UNIT0_PHY_DATA,
22198c2ecf20Sopenharmony_ci	Mpi2SasIOUnit0PhyData_t,
22208c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit0PhyData_t;
22218c2ecf20Sopenharmony_ci
22228c2ecf20Sopenharmony_ci/*
22238c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
22248c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
22258c2ecf20Sopenharmony_ci */
22268c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT0_PHY_MAX
22278c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT0_PHY_MAX        (1)
22288c2ecf20Sopenharmony_ci#endif
22298c2ecf20Sopenharmony_ci
22308c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_0 {
22318c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;   /*0x00 */
22328c2ecf20Sopenharmony_ci	U32                                 Reserved1;/*0x08 */
22338c2ecf20Sopenharmony_ci	U8                                  NumPhys;  /*0x0C */
22348c2ecf20Sopenharmony_ci	U8                                  Reserved2;/*0x0D */
22358c2ecf20Sopenharmony_ci	U16                                 Reserved3;/*0x0E */
22368c2ecf20Sopenharmony_ci	MPI2_SAS_IO_UNIT0_PHY_DATA
22378c2ecf20Sopenharmony_ci		PhyData[MPI2_SAS_IOUNIT0_PHY_MAX];    /*0x10 */
22388c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_0,
22398c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_0,
22408c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage0_t, *pMpi2SasIOUnitPage0_t;
22418c2ecf20Sopenharmony_ci
22428c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE0_PAGEVERSION                     (0x05)
22438c2ecf20Sopenharmony_ci
22448c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 0 PortFlags */
22458c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PORTFLAGS_DISCOVERY_IN_PROGRESS     (0x08)
22468c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG          (0x01)
22478c2ecf20Sopenharmony_ci
22488c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 0 PhyFlags */
22498c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PHYFLAGS_INIT_PERSIST_CONNECT       (0x40)
22508c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PHYFLAGS_TARG_PERSIST_CONNECT       (0x20)
22518c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PHYFLAGS_ZONING_ENABLED             (0x10)
22528c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_PHYFLAGS_PHY_DISABLED               (0x08)
22538c2ecf20Sopenharmony_ci
22548c2ecf20Sopenharmony_ci/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
22558c2ecf20Sopenharmony_ci
22568c2ecf20Sopenharmony_ci/*see mpi2_sas.h for values for
22578c2ecf20Sopenharmony_ci *SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
22588c2ecf20Sopenharmony_ci
22598c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 0 DiscoveryStatus */
22608c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MAX_ENCLOSURES_EXCEED            (0x80000000)
22618c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MAX_EXPANDERS_EXCEED             (0x40000000)
22628c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MAX_DEVICES_EXCEED               (0x20000000)
22638c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MAX_TOPO_PHYS_EXCEED             (0x10000000)
22648c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_DOWNSTREAM_INITIATOR             (0x08000000)
22658c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE    (0x00008000)
22668c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_EXP_MULTI_SUBTRACTIVE            (0x00004000)
22678c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MULTI_PORT_DOMAIN                (0x00002000)
22688c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_TABLE_TO_SUBTRACTIVE_LINK        (0x00001000)
22698c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_UNSUPPORTED_DEVICE               (0x00000800)
22708c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_TABLE_LINK                       (0x00000400)
22718c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_SUBTRACTIVE_LINK                 (0x00000200)
22728c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_SMP_CRC_ERROR                    (0x00000100)
22738c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_SMP_FUNCTION_FAILED              (0x00000080)
22748c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_INDEX_NOT_EXIST                  (0x00000040)
22758c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_OUT_ROUTE_ENTRIES                (0x00000020)
22768c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_SMP_TIMEOUT                      (0x00000010)
22778c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_MULTIPLE_PORTS                   (0x00000004)
22788c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_UNADDRESSABLE_DEVICE             (0x00000002)
22798c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT0_DS_LOOP_DETECTED                    (0x00000001)
22808c2ecf20Sopenharmony_ci
22818c2ecf20Sopenharmony_ci
22828c2ecf20Sopenharmony_ci/*SAS IO Unit Page 1 */
22838c2ecf20Sopenharmony_ci
22848c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IO_UNIT1_PHY_DATA {
22858c2ecf20Sopenharmony_ci	U8          Port;                       /*0x00 */
22868c2ecf20Sopenharmony_ci	U8          PortFlags;                  /*0x01 */
22878c2ecf20Sopenharmony_ci	U8          PhyFlags;                   /*0x02 */
22888c2ecf20Sopenharmony_ci	U8          MaxMinLinkRate;             /*0x03 */
22898c2ecf20Sopenharmony_ci	U32         ControllerPhyDeviceInfo;    /*0x04 */
22908c2ecf20Sopenharmony_ci	U16         MaxTargetPortConnectTime;   /*0x08 */
22918c2ecf20Sopenharmony_ci	U16         Reserved1;                  /*0x0A */
22928c2ecf20Sopenharmony_ci} MPI2_SAS_IO_UNIT1_PHY_DATA,
22938c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IO_UNIT1_PHY_DATA,
22948c2ecf20Sopenharmony_ci	Mpi2SasIOUnit1PhyData_t,
22958c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit1PhyData_t;
22968c2ecf20Sopenharmony_ci
22978c2ecf20Sopenharmony_ci/*
22988c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
22998c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
23008c2ecf20Sopenharmony_ci */
23018c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT1_PHY_MAX
23028c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT1_PHY_MAX        (1)
23038c2ecf20Sopenharmony_ci#endif
23048c2ecf20Sopenharmony_ci
23058c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_1 {
23068c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header; /*0x00 */
23078c2ecf20Sopenharmony_ci	U16
23088c2ecf20Sopenharmony_ci		ControlFlags;                       /*0x08 */
23098c2ecf20Sopenharmony_ci	U16
23108c2ecf20Sopenharmony_ci		SASNarrowMaxQueueDepth;             /*0x0A */
23118c2ecf20Sopenharmony_ci	U16
23128c2ecf20Sopenharmony_ci		AdditionalControlFlags;             /*0x0C */
23138c2ecf20Sopenharmony_ci	U16
23148c2ecf20Sopenharmony_ci		SASWideMaxQueueDepth;               /*0x0E */
23158c2ecf20Sopenharmony_ci	U8
23168c2ecf20Sopenharmony_ci		NumPhys;                            /*0x10 */
23178c2ecf20Sopenharmony_ci	U8
23188c2ecf20Sopenharmony_ci		SATAMaxQDepth;                      /*0x11 */
23198c2ecf20Sopenharmony_ci	U8
23208c2ecf20Sopenharmony_ci		ReportDeviceMissingDelay;           /*0x12 */
23218c2ecf20Sopenharmony_ci	U8
23228c2ecf20Sopenharmony_ci		IODeviceMissingDelay;               /*0x13 */
23238c2ecf20Sopenharmony_ci	MPI2_SAS_IO_UNIT1_PHY_DATA
23248c2ecf20Sopenharmony_ci		PhyData[MPI2_SAS_IOUNIT1_PHY_MAX];  /*0x14 */
23258c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_1,
23268c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_1,
23278c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage1_t, *pMpi2SasIOUnitPage1_t;
23288c2ecf20Sopenharmony_ci
23298c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE1_PAGEVERSION     (0x09)
23308c2ecf20Sopenharmony_ci
23318c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 1 ControlFlags */
23328c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_DEVICE_SELF_TEST                    (0x8000)
23338c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_3_0_MAX                        (0x4000)
23348c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_1_5_MAX                        (0x2000)
23358c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_SW_PRESERVE                    (0x1000)
23368c2ecf20Sopenharmony_ci
23378c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_MASK_DEV_SUPPORT                    (0x0600)
23388c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SHIFT_DEV_SUPPORT                   (9)
23398c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_DEV_SUPPORT_BOTH                    (0x0)
23408c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_DEV_SAS_SUPPORT                     (0x1)
23418c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_DEV_SATA_SUPPORT                    (0x2)
23428c2ecf20Sopenharmony_ci
23438c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED             (0x0080)
23448c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_SMART_REQUIRED                 (0x0040)
23458c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_NCQ_REQUIRED                   (0x0020)
23468c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SATA_FUA_REQUIRED                   (0x0010)
23478c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_TABLE_SUBTRACTIVE_ILLEGAL           (0x0008)
23488c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL                 (0x0004)
23498c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY                 (0x0002)
23508c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION                   (0x0001)
23518c2ecf20Sopenharmony_ci
23528c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 1 AdditionalControlFlags */
23538c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_DA_PERSIST_CONNECT                 (0x0100)
23548c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL          (0x0080)
23558c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION    (0x0040)
23568c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_INVALID_TOPOLOGY_CORRECTION        (0x0020)
23578c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET   (0x0010)
23588c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_OTHER_AFFILIATION_SATA_LINK_RESET  (0x0008)
23598c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_SELF_AFFILIATION_SATA_LINK_RESET   (0x0004)
23608c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_NO_AFFILIATION_SATA_LINK_RESET     (0x0002)
23618c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE               (0x0001)
23628c2ecf20Sopenharmony_ci
23638c2ecf20Sopenharmony_ci/*defines for SAS IO Unit Page 1 ReportDeviceMissingDelay */
23648c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_REPORT_MISSING_TIMEOUT_MASK                 (0x7F)
23658c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_REPORT_MISSING_UNIT_16                      (0x80)
23668c2ecf20Sopenharmony_ci
23678c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 1 PortFlags */
23688c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG                 (0x01)
23698c2ecf20Sopenharmony_ci
23708c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 1 PhyFlags */
23718c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_PHYFLAGS_INIT_PERSIST_CONNECT               (0x40)
23728c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_PHYFLAGS_TARG_PERSIST_CONNECT               (0x20)
23738c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_PHYFLAGS_ZONING_ENABLE                      (0x10)
23748c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_PHYFLAGS_PHY_DISABLE                        (0x08)
23758c2ecf20Sopenharmony_ci
23768c2ecf20Sopenharmony_ci/*values for SAS IO Unit Page 1 MaxMinLinkRate */
23778c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MAX_RATE_MASK                               (0xF0)
23788c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MAX_RATE_1_5                                (0x80)
23798c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MAX_RATE_3_0                                (0x90)
23808c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MAX_RATE_6_0                                (0xA0)
23818c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT1_MAX_RATE_12_0                              (0xB0)
23828c2ecf20Sopenharmony_ci#define MPI26_SASIOUNIT1_MAX_RATE_22_5                              (0xC0)
23838c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MIN_RATE_MASK                               (0x0F)
23848c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MIN_RATE_1_5                                (0x08)
23858c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MIN_RATE_3_0                                (0x09)
23868c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT1_MIN_RATE_6_0                                (0x0A)
23878c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT1_MIN_RATE_12_0                              (0x0B)
23888c2ecf20Sopenharmony_ci#define MPI26_SASIOUNIT1_MIN_RATE_22_5                              (0x0C)
23898c2ecf20Sopenharmony_ci
23908c2ecf20Sopenharmony_ci/*see mpi2_sas.h for values for
23918c2ecf20Sopenharmony_ci *SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
23928c2ecf20Sopenharmony_ci
23938c2ecf20Sopenharmony_ci
23948c2ecf20Sopenharmony_ci/*SAS IO Unit Page 4 (for MPI v2.5 and earlier) */
23958c2ecf20Sopenharmony_ci
23968c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IOUNIT4_SPINUP_GROUP {
23978c2ecf20Sopenharmony_ci	U8          MaxTargetSpinup;            /*0x00 */
23988c2ecf20Sopenharmony_ci	U8          SpinupDelay;                /*0x01 */
23998c2ecf20Sopenharmony_ci	U8          SpinupFlags;                /*0x02 */
24008c2ecf20Sopenharmony_ci	U8          Reserved1;                  /*0x03 */
24018c2ecf20Sopenharmony_ci} MPI2_SAS_IOUNIT4_SPINUP_GROUP,
24028c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IOUNIT4_SPINUP_GROUP,
24038c2ecf20Sopenharmony_ci	Mpi2SasIOUnit4SpinupGroup_t,
24048c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit4SpinupGroup_t;
24058c2ecf20Sopenharmony_ci/*defines for SAS IO Unit Page 4 SpinupFlags */
24068c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT4_SPINUP_DISABLE_FLAG         (0x01)
24078c2ecf20Sopenharmony_ci
24088c2ecf20Sopenharmony_ci
24098c2ecf20Sopenharmony_ci/*
24108c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
24118c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
24128c2ecf20Sopenharmony_ci */
24138c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT4_PHY_MAX
24148c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT4_PHY_MAX        (4)
24158c2ecf20Sopenharmony_ci#endif
24168c2ecf20Sopenharmony_ci
24178c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_4 {
24188c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;/*0x00 */
24198c2ecf20Sopenharmony_ci	MPI2_SAS_IOUNIT4_SPINUP_GROUP
24208c2ecf20Sopenharmony_ci		SpinupGroupParameters[4];       /*0x08 */
24218c2ecf20Sopenharmony_ci	U32
24228c2ecf20Sopenharmony_ci		Reserved1;                      /*0x18 */
24238c2ecf20Sopenharmony_ci	U32
24248c2ecf20Sopenharmony_ci		Reserved2;                      /*0x1C */
24258c2ecf20Sopenharmony_ci	U32
24268c2ecf20Sopenharmony_ci		Reserved3;                      /*0x20 */
24278c2ecf20Sopenharmony_ci	U8
24288c2ecf20Sopenharmony_ci		BootDeviceWaitTime;             /*0x24 */
24298c2ecf20Sopenharmony_ci	U8
24308c2ecf20Sopenharmony_ci		SATADeviceWaitTime;		/*0x25 */
24318c2ecf20Sopenharmony_ci	U16
24328c2ecf20Sopenharmony_ci		Reserved5;                      /*0x26 */
24338c2ecf20Sopenharmony_ci	U8
24348c2ecf20Sopenharmony_ci		NumPhys;                        /*0x28 */
24358c2ecf20Sopenharmony_ci	U8
24368c2ecf20Sopenharmony_ci		PEInitialSpinupDelay;           /*0x29 */
24378c2ecf20Sopenharmony_ci	U8
24388c2ecf20Sopenharmony_ci		PEReplyDelay;                   /*0x2A */
24398c2ecf20Sopenharmony_ci	U8
24408c2ecf20Sopenharmony_ci		Flags;                          /*0x2B */
24418c2ecf20Sopenharmony_ci	U8
24428c2ecf20Sopenharmony_ci		PHY[MPI2_SAS_IOUNIT4_PHY_MAX];  /*0x2C */
24438c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_4,
24448c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_4,
24458c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage4_t, *pMpi2SasIOUnitPage4_t;
24468c2ecf20Sopenharmony_ci
24478c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE4_PAGEVERSION     (0x02)
24488c2ecf20Sopenharmony_ci
24498c2ecf20Sopenharmony_ci/*defines for Flags field */
24508c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT4_FLAGS_AUTO_PORTENABLE               (0x01)
24518c2ecf20Sopenharmony_ci
24528c2ecf20Sopenharmony_ci/*defines for PHY field */
24538c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT4_PHY_SPINUP_GROUP_MASK               (0x03)
24548c2ecf20Sopenharmony_ci
24558c2ecf20Sopenharmony_ci
24568c2ecf20Sopenharmony_ci/*SAS IO Unit Page 5 */
24578c2ecf20Sopenharmony_ci
24588c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS {
24598c2ecf20Sopenharmony_ci	U8          ControlFlags;               /*0x00 */
24608c2ecf20Sopenharmony_ci	U8          PortWidthModGroup;          /*0x01 */
24618c2ecf20Sopenharmony_ci	U16         InactivityTimerExponent;    /*0x02 */
24628c2ecf20Sopenharmony_ci	U8          SATAPartialTimeout;         /*0x04 */
24638c2ecf20Sopenharmony_ci	U8          Reserved2;                  /*0x05 */
24648c2ecf20Sopenharmony_ci	U8          SATASlumberTimeout;         /*0x06 */
24658c2ecf20Sopenharmony_ci	U8          Reserved3;                  /*0x07 */
24668c2ecf20Sopenharmony_ci	U8          SASPartialTimeout;          /*0x08 */
24678c2ecf20Sopenharmony_ci	U8          Reserved4;                  /*0x09 */
24688c2ecf20Sopenharmony_ci	U8          SASSlumberTimeout;          /*0x0A */
24698c2ecf20Sopenharmony_ci	U8          Reserved5;                  /*0x0B */
24708c2ecf20Sopenharmony_ci} MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
24718c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
24728c2ecf20Sopenharmony_ci	Mpi2SasIOUnit5PhyPmSettings_t,
24738c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit5PhyPmSettings_t;
24748c2ecf20Sopenharmony_ci
24758c2ecf20Sopenharmony_ci/*defines for ControlFlags field */
24768c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_CONTROL_SAS_SLUMBER_ENABLE      (0x08)
24778c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_CONTROL_SAS_PARTIAL_ENABLE      (0x04)
24788c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_CONTROL_SATA_SLUMBER_ENABLE     (0x02)
24798c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_CONTROL_SATA_PARTIAL_ENABLE     (0x01)
24808c2ecf20Sopenharmony_ci
24818c2ecf20Sopenharmony_ci/*defines for PortWidthModeGroup field */
24828c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_PWMG_DISABLE                    (0xFF)
24838c2ecf20Sopenharmony_ci
24848c2ecf20Sopenharmony_ci/*defines for InactivityTimerExponent field */
24858c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_MASK_SAS_SLUMBER            (0x7000)
24868c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_SLUMBER           (12)
24878c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_MASK_SAS_PARTIAL            (0x0700)
24888c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_PARTIAL           (8)
24898c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_MASK_SATA_SLUMBER           (0x0070)
24908c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_SLUMBER          (4)
24918c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_MASK_SATA_PARTIAL           (0x0007)
24928c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_PARTIAL          (0)
24938c2ecf20Sopenharmony_ci
24948c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_TEN_SECONDS                 (7)
24958c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_ONE_SECOND                  (6)
24968c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_HUNDRED_MILLISECONDS        (5)
24978c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_TEN_MILLISECONDS            (4)
24988c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_ONE_MILLISECOND             (3)
24998c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_HUNDRED_MICROSECONDS        (2)
25008c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_TEN_MICROSECONDS            (1)
25018c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT5_ITE_ONE_MICROSECOND             (0)
25028c2ecf20Sopenharmony_ci
25038c2ecf20Sopenharmony_ci/*
25048c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
25058c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
25068c2ecf20Sopenharmony_ci */
25078c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT5_PHY_MAX
25088c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT5_PHY_MAX        (1)
25098c2ecf20Sopenharmony_ci#endif
25108c2ecf20Sopenharmony_ci
25118c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_5 {
25128c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;   /*0x00 */
25138c2ecf20Sopenharmony_ci	U8                                  NumPhys;  /*0x08 */
25148c2ecf20Sopenharmony_ci	U8                                  Reserved1;/*0x09 */
25158c2ecf20Sopenharmony_ci	U16                                 Reserved2;/*0x0A */
25168c2ecf20Sopenharmony_ci	U32                                 Reserved3;/*0x0C */
25178c2ecf20Sopenharmony_ci	MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS
25188c2ecf20Sopenharmony_ci	SASPhyPowerManagementSettings[MPI2_SAS_IOUNIT5_PHY_MAX];/*0x10 */
25198c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_5,
25208c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_5,
25218c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage5_t, *pMpi2SasIOUnitPage5_t;
25228c2ecf20Sopenharmony_ci
25238c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE5_PAGEVERSION     (0x01)
25248c2ecf20Sopenharmony_ci
25258c2ecf20Sopenharmony_ci
25268c2ecf20Sopenharmony_ci/*SAS IO Unit Page 6 */
25278c2ecf20Sopenharmony_ci
25288c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS {
25298c2ecf20Sopenharmony_ci	U8          CurrentStatus;              /*0x00 */
25308c2ecf20Sopenharmony_ci	U8          CurrentModulation;          /*0x01 */
25318c2ecf20Sopenharmony_ci	U8          CurrentUtilization;         /*0x02 */
25328c2ecf20Sopenharmony_ci	U8          Reserved1;                  /*0x03 */
25338c2ecf20Sopenharmony_ci	U32         Reserved2;                  /*0x04 */
25348c2ecf20Sopenharmony_ci} MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
25358c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
25368c2ecf20Sopenharmony_ci	Mpi2SasIOUnit6PortWidthModGroupStatus_t,
25378c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit6PortWidthModGroupStatus_t;
25388c2ecf20Sopenharmony_ci
25398c2ecf20Sopenharmony_ci/*defines for CurrentStatus field */
25408c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_UNAVAILABLE                      (0x00)
25418c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_UNCONFIGURED                     (0x01)
25428c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_INVALID_CONFIG                   (0x02)
25438c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_LINK_DOWN                        (0x03)
25448c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_OBSERVATION_ONLY                 (0x04)
25458c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_INACTIVE                         (0x05)
25468c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_ACTIVE_IOUNIT                    (0x06)
25478c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_STATUS_ACTIVE_HOST                      (0x07)
25488c2ecf20Sopenharmony_ci
25498c2ecf20Sopenharmony_ci/*defines for CurrentModulation field */
25508c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_MODULATION_25_PERCENT                   (0x00)
25518c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_MODULATION_50_PERCENT                   (0x01)
25528c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_MODULATION_75_PERCENT                   (0x02)
25538c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT6_MODULATION_100_PERCENT                  (0x03)
25548c2ecf20Sopenharmony_ci
25558c2ecf20Sopenharmony_ci/*
25568c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
25578c2ecf20Sopenharmony_ci *one and check the value returned for NumGroups at runtime.
25588c2ecf20Sopenharmony_ci */
25598c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT6_GROUP_MAX
25608c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT6_GROUP_MAX      (1)
25618c2ecf20Sopenharmony_ci#endif
25628c2ecf20Sopenharmony_ci
25638c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_6 {
25648c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                 /*0x00 */
25658c2ecf20Sopenharmony_ci	U32                                 Reserved1;              /*0x08 */
25668c2ecf20Sopenharmony_ci	U32                                 Reserved2;              /*0x0C */
25678c2ecf20Sopenharmony_ci	U8                                  NumGroups;              /*0x10 */
25688c2ecf20Sopenharmony_ci	U8                                  Reserved3;              /*0x11 */
25698c2ecf20Sopenharmony_ci	U16                                 Reserved4;              /*0x12 */
25708c2ecf20Sopenharmony_ci	MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS
25718c2ecf20Sopenharmony_ci	PortWidthModulationGroupStatus[MPI2_SAS_IOUNIT6_GROUP_MAX]; /*0x14 */
25728c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_6,
25738c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_6,
25748c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage6_t, *pMpi2SasIOUnitPage6_t;
25758c2ecf20Sopenharmony_ci
25768c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE6_PAGEVERSION     (0x00)
25778c2ecf20Sopenharmony_ci
25788c2ecf20Sopenharmony_ci
25798c2ecf20Sopenharmony_ci/*SAS IO Unit Page 7 */
25808c2ecf20Sopenharmony_ci
25818c2ecf20Sopenharmony_citypedef struct _MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS {
25828c2ecf20Sopenharmony_ci	U8          Flags;                      /*0x00 */
25838c2ecf20Sopenharmony_ci	U8          Reserved1;                  /*0x01 */
25848c2ecf20Sopenharmony_ci	U16         Reserved2;                  /*0x02 */
25858c2ecf20Sopenharmony_ci	U8          Threshold75Pct;             /*0x04 */
25868c2ecf20Sopenharmony_ci	U8          Threshold50Pct;             /*0x05 */
25878c2ecf20Sopenharmony_ci	U8          Threshold25Pct;             /*0x06 */
25888c2ecf20Sopenharmony_ci	U8          Reserved3;                  /*0x07 */
25898c2ecf20Sopenharmony_ci} MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
25908c2ecf20Sopenharmony_ci	*PTR_MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
25918c2ecf20Sopenharmony_ci	Mpi2SasIOUnit7PortWidthModGroupSettings_t,
25928c2ecf20Sopenharmony_ci	*pMpi2SasIOUnit7PortWidthModGroupSettings_t;
25938c2ecf20Sopenharmony_ci
25948c2ecf20Sopenharmony_ci/*defines for Flags field */
25958c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT7_FLAGS_ENABLE_PORT_WIDTH_MODULATION  (0x01)
25968c2ecf20Sopenharmony_ci
25978c2ecf20Sopenharmony_ci
25988c2ecf20Sopenharmony_ci/*
25998c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
26008c2ecf20Sopenharmony_ci *one and check the value returned for NumGroups at runtime.
26018c2ecf20Sopenharmony_ci */
26028c2ecf20Sopenharmony_ci#ifndef MPI2_SAS_IOUNIT7_GROUP_MAX
26038c2ecf20Sopenharmony_ci#define MPI2_SAS_IOUNIT7_GROUP_MAX      (1)
26048c2ecf20Sopenharmony_ci#endif
26058c2ecf20Sopenharmony_ci
26068c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_7 {
26078c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER Header;             /*0x00 */
26088c2ecf20Sopenharmony_ci	U8                               SamplingInterval;   /*0x08 */
26098c2ecf20Sopenharmony_ci	U8                               WindowLength;       /*0x09 */
26108c2ecf20Sopenharmony_ci	U16                              Reserved1;          /*0x0A */
26118c2ecf20Sopenharmony_ci	U32                              Reserved2;          /*0x0C */
26128c2ecf20Sopenharmony_ci	U32                              Reserved3;          /*0x10 */
26138c2ecf20Sopenharmony_ci	U8                               NumGroups;          /*0x14 */
26148c2ecf20Sopenharmony_ci	U8                               Reserved4;          /*0x15 */
26158c2ecf20Sopenharmony_ci	U16                              Reserved5;          /*0x16 */
26168c2ecf20Sopenharmony_ci	MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS
26178c2ecf20Sopenharmony_ci	PortWidthModulationGroupSettings[MPI2_SAS_IOUNIT7_GROUP_MAX];/*0x18 */
26188c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_7,
26198c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_7,
26208c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage7_t, *pMpi2SasIOUnitPage7_t;
26218c2ecf20Sopenharmony_ci
26228c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE7_PAGEVERSION     (0x00)
26238c2ecf20Sopenharmony_ci
26248c2ecf20Sopenharmony_ci
26258c2ecf20Sopenharmony_ci/*SAS IO Unit Page 8 */
26268c2ecf20Sopenharmony_ci
26278c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_8 {
26288c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
26298c2ecf20Sopenharmony_ci		Header;                         /*0x00 */
26308c2ecf20Sopenharmony_ci	U32
26318c2ecf20Sopenharmony_ci		Reserved1;                      /*0x08 */
26328c2ecf20Sopenharmony_ci	U32
26338c2ecf20Sopenharmony_ci		PowerManagementCapabilities;    /*0x0C */
26348c2ecf20Sopenharmony_ci	U8
26358c2ecf20Sopenharmony_ci		TxRxSleepStatus;                /*0x10 */
26368c2ecf20Sopenharmony_ci	U8
26378c2ecf20Sopenharmony_ci		Reserved2;                      /*0x11 */
26388c2ecf20Sopenharmony_ci	U16
26398c2ecf20Sopenharmony_ci		Reserved3;                      /*0x12 */
26408c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT_8,
26418c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT_8,
26428c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage8_t, *pMpi2SasIOUnitPage8_t;
26438c2ecf20Sopenharmony_ci
26448c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE8_PAGEVERSION     (0x00)
26458c2ecf20Sopenharmony_ci
26468c2ecf20Sopenharmony_ci/*defines for PowerManagementCapabilities field */
26478c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_HOST_PORT_WIDTH_MOD          (0x00001000)
26488c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_HOST_SAS_SLUMBER_MODE        (0x00000800)
26498c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_HOST_SAS_PARTIAL_MODE        (0x00000400)
26508c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_HOST_SATA_SLUMBER_MODE       (0x00000200)
26518c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_HOST_SATA_PARTIAL_MODE       (0x00000100)
26528c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_IOUNIT_PORT_WIDTH_MOD        (0x00000010)
26538c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_SLUMBER_MODE      (0x00000008)
26548c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_PARTIAL_MODE      (0x00000004)
26558c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_SLUMBER_MODE     (0x00000002)
26568c2ecf20Sopenharmony_ci#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_PARTIAL_MODE     (0x00000001)
26578c2ecf20Sopenharmony_ci
26588c2ecf20Sopenharmony_ci/*defines for TxRxSleepStatus field */
26598c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT8_TXRXSLEEP_UNSUPPORTED          (0x00)
26608c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT8_TXRXSLEEP_DISENGAGED           (0x01)
26618c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT8_TXRXSLEEP_ACTIVE               (0x02)
26628c2ecf20Sopenharmony_ci#define MPI25_SASIOUNIT8_TXRXSLEEP_SHUTDOWN             (0x03)
26638c2ecf20Sopenharmony_ci
26648c2ecf20Sopenharmony_ci
26658c2ecf20Sopenharmony_ci
26668c2ecf20Sopenharmony_ci/*SAS IO Unit Page 16 */
26678c2ecf20Sopenharmony_ci
26688c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SASIOUNIT16 {
26698c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
26708c2ecf20Sopenharmony_ci		Header;                             /*0x00 */
26718c2ecf20Sopenharmony_ci	U64
26728c2ecf20Sopenharmony_ci		TimeStamp;                          /*0x08 */
26738c2ecf20Sopenharmony_ci	U32
26748c2ecf20Sopenharmony_ci		Reserved1;                          /*0x10 */
26758c2ecf20Sopenharmony_ci	U32
26768c2ecf20Sopenharmony_ci		Reserved2;                          /*0x14 */
26778c2ecf20Sopenharmony_ci	U32
26788c2ecf20Sopenharmony_ci		FastPathPendedRequests;             /*0x18 */
26798c2ecf20Sopenharmony_ci	U32
26808c2ecf20Sopenharmony_ci		FastPathUnPendedRequests;           /*0x1C */
26818c2ecf20Sopenharmony_ci	U32
26828c2ecf20Sopenharmony_ci		FastPathHostRequestStarts;          /*0x20 */
26838c2ecf20Sopenharmony_ci	U32
26848c2ecf20Sopenharmony_ci		FastPathFirmwareRequestStarts;      /*0x24 */
26858c2ecf20Sopenharmony_ci	U32
26868c2ecf20Sopenharmony_ci		FastPathHostCompletions;            /*0x28 */
26878c2ecf20Sopenharmony_ci	U32
26888c2ecf20Sopenharmony_ci		FastPathFirmwareCompletions;        /*0x2C */
26898c2ecf20Sopenharmony_ci	U32
26908c2ecf20Sopenharmony_ci		NonFastPathRequestStarts;           /*0x30 */
26918c2ecf20Sopenharmony_ci	U32
26928c2ecf20Sopenharmony_ci		NonFastPathHostCompletions;         /*0x30 */
26938c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SASIOUNIT16,
26948c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SASIOUNIT16,
26958c2ecf20Sopenharmony_ci	Mpi2SasIOUnitPage16_t, *pMpi2SasIOUnitPage16_t;
26968c2ecf20Sopenharmony_ci
26978c2ecf20Sopenharmony_ci#define MPI2_SASIOUNITPAGE16_PAGEVERSION    (0x00)
26988c2ecf20Sopenharmony_ci
26998c2ecf20Sopenharmony_ci
27008c2ecf20Sopenharmony_ci/****************************************************************************
27018c2ecf20Sopenharmony_ci*  SAS Expander Config Pages
27028c2ecf20Sopenharmony_ci****************************************************************************/
27038c2ecf20Sopenharmony_ci
27048c2ecf20Sopenharmony_ci/*SAS Expander Page 0 */
27058c2ecf20Sopenharmony_ci
27068c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_EXPANDER_0 {
27078c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
27088c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
27098c2ecf20Sopenharmony_ci	U8
27108c2ecf20Sopenharmony_ci		PhysicalPort;               /*0x08 */
27118c2ecf20Sopenharmony_ci	U8
27128c2ecf20Sopenharmony_ci		ReportGenLength;            /*0x09 */
27138c2ecf20Sopenharmony_ci	U16
27148c2ecf20Sopenharmony_ci		EnclosureHandle;            /*0x0A */
27158c2ecf20Sopenharmony_ci	U64
27168c2ecf20Sopenharmony_ci		SASAddress;                 /*0x0C */
27178c2ecf20Sopenharmony_ci	U32
27188c2ecf20Sopenharmony_ci		DiscoveryStatus;            /*0x14 */
27198c2ecf20Sopenharmony_ci	U16
27208c2ecf20Sopenharmony_ci		DevHandle;                  /*0x18 */
27218c2ecf20Sopenharmony_ci	U16
27228c2ecf20Sopenharmony_ci		ParentDevHandle;            /*0x1A */
27238c2ecf20Sopenharmony_ci	U16
27248c2ecf20Sopenharmony_ci		ExpanderChangeCount;        /*0x1C */
27258c2ecf20Sopenharmony_ci	U16
27268c2ecf20Sopenharmony_ci		ExpanderRouteIndexes;       /*0x1E */
27278c2ecf20Sopenharmony_ci	U8
27288c2ecf20Sopenharmony_ci		NumPhys;                    /*0x20 */
27298c2ecf20Sopenharmony_ci	U8
27308c2ecf20Sopenharmony_ci		SASLevel;                   /*0x21 */
27318c2ecf20Sopenharmony_ci	U16
27328c2ecf20Sopenharmony_ci		Flags;                      /*0x22 */
27338c2ecf20Sopenharmony_ci	U16
27348c2ecf20Sopenharmony_ci		STPBusInactivityTimeLimit;  /*0x24 */
27358c2ecf20Sopenharmony_ci	U16
27368c2ecf20Sopenharmony_ci		STPMaxConnectTimeLimit;     /*0x26 */
27378c2ecf20Sopenharmony_ci	U16
27388c2ecf20Sopenharmony_ci		STP_SMP_NexusLossTime;      /*0x28 */
27398c2ecf20Sopenharmony_ci	U16
27408c2ecf20Sopenharmony_ci		MaxNumRoutedSasAddresses;   /*0x2A */
27418c2ecf20Sopenharmony_ci	U64
27428c2ecf20Sopenharmony_ci		ActiveZoneManagerSASAddress;/*0x2C */
27438c2ecf20Sopenharmony_ci	U16
27448c2ecf20Sopenharmony_ci		ZoneLockInactivityLimit;    /*0x34 */
27458c2ecf20Sopenharmony_ci	U16
27468c2ecf20Sopenharmony_ci		Reserved1;                  /*0x36 */
27478c2ecf20Sopenharmony_ci	U8
27488c2ecf20Sopenharmony_ci		TimeToReducedFunc;          /*0x38 */
27498c2ecf20Sopenharmony_ci	U8
27508c2ecf20Sopenharmony_ci		InitialTimeToReducedFunc;   /*0x39 */
27518c2ecf20Sopenharmony_ci	U8
27528c2ecf20Sopenharmony_ci		MaxReducedFuncTime;         /*0x3A */
27538c2ecf20Sopenharmony_ci	U8
27548c2ecf20Sopenharmony_ci		Reserved2;                  /*0x3B */
27558c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_EXPANDER_0,
27568c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_EXPANDER_0,
27578c2ecf20Sopenharmony_ci	Mpi2ExpanderPage0_t, *pMpi2ExpanderPage0_t;
27588c2ecf20Sopenharmony_ci
27598c2ecf20Sopenharmony_ci#define MPI2_SASEXPANDER0_PAGEVERSION       (0x06)
27608c2ecf20Sopenharmony_ci
27618c2ecf20Sopenharmony_ci/*values for SAS Expander Page 0 DiscoveryStatus field */
27628c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MAX_ENCLOSURES_EXCEED         (0x80000000)
27638c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MAX_EXPANDERS_EXCEED          (0x40000000)
27648c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MAX_DEVICES_EXCEED            (0x20000000)
27658c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MAX_TOPO_PHYS_EXCEED          (0x10000000)
27668c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_DOWNSTREAM_INITIATOR          (0x08000000)
27678c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
27688c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_EXP_MULTI_SUBTRACTIVE         (0x00004000)
27698c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MULTI_PORT_DOMAIN             (0x00002000)
27708c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_TABLE_TO_SUBTRACTIVE_LINK     (0x00001000)
27718c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE            (0x00000800)
27728c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_TABLE_LINK                    (0x00000400)
27738c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_SUBTRACTIVE_LINK              (0x00000200)
27748c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_SMP_CRC_ERROR                 (0x00000100)
27758c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_SMP_FUNCTION_FAILED           (0x00000080)
27768c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_INDEX_NOT_EXIST               (0x00000040)
27778c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_OUT_ROUTE_ENTRIES             (0x00000020)
27788c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_SMP_TIMEOUT                   (0x00000010)
27798c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_MULTIPLE_PORTS                (0x00000004)
27808c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_UNADDRESSABLE_DEVICE          (0x00000002)
27818c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_DS_LOOP_DETECTED                 (0x00000001)
27828c2ecf20Sopenharmony_ci
27838c2ecf20Sopenharmony_ci/*values for SAS Expander Page 0 Flags field */
27848c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_REDUCED_FUNCTIONALITY      (0x2000)
27858c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_ZONE_LOCKED                (0x1000)
27868c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_SUPPORTED_PHYSICAL_PRES    (0x0800)
27878c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_ASSERTED_PHYSICAL_PRES     (0x0400)
27888c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_ZONING_SUPPORT             (0x0200)
27898c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_ENABLED_ZONING             (0x0100)
27908c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_TABLE_TO_TABLE_SUPPORT     (0x0080)
27918c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE       (0x0010)
27928c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_OTHERS_CONFIG              (0x0004)
27938c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS         (0x0002)
27948c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG         (0x0001)
27958c2ecf20Sopenharmony_ci
27968c2ecf20Sopenharmony_ci
27978c2ecf20Sopenharmony_ci/*SAS Expander Page 1 */
27988c2ecf20Sopenharmony_ci
27998c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_EXPANDER_1 {
28008c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
28018c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
28028c2ecf20Sopenharmony_ci	U8
28038c2ecf20Sopenharmony_ci		PhysicalPort;               /*0x08 */
28048c2ecf20Sopenharmony_ci	U8
28058c2ecf20Sopenharmony_ci		Reserved1;                  /*0x09 */
28068c2ecf20Sopenharmony_ci	U16
28078c2ecf20Sopenharmony_ci		Reserved2;                  /*0x0A */
28088c2ecf20Sopenharmony_ci	U8
28098c2ecf20Sopenharmony_ci		NumPhys;                    /*0x0C */
28108c2ecf20Sopenharmony_ci	U8
28118c2ecf20Sopenharmony_ci		Phy;                        /*0x0D */
28128c2ecf20Sopenharmony_ci	U16
28138c2ecf20Sopenharmony_ci		NumTableEntriesProgrammed;  /*0x0E */
28148c2ecf20Sopenharmony_ci	U8
28158c2ecf20Sopenharmony_ci		ProgrammedLinkRate;         /*0x10 */
28168c2ecf20Sopenharmony_ci	U8
28178c2ecf20Sopenharmony_ci		HwLinkRate;                 /*0x11 */
28188c2ecf20Sopenharmony_ci	U16
28198c2ecf20Sopenharmony_ci		AttachedDevHandle;          /*0x12 */
28208c2ecf20Sopenharmony_ci	U32
28218c2ecf20Sopenharmony_ci		PhyInfo;                    /*0x14 */
28228c2ecf20Sopenharmony_ci	U32
28238c2ecf20Sopenharmony_ci		AttachedDeviceInfo;         /*0x18 */
28248c2ecf20Sopenharmony_ci	U16
28258c2ecf20Sopenharmony_ci		ExpanderDevHandle;          /*0x1C */
28268c2ecf20Sopenharmony_ci	U8
28278c2ecf20Sopenharmony_ci		ChangeCount;                /*0x1E */
28288c2ecf20Sopenharmony_ci	U8
28298c2ecf20Sopenharmony_ci		NegotiatedLinkRate;         /*0x1F */
28308c2ecf20Sopenharmony_ci	U8
28318c2ecf20Sopenharmony_ci		PhyIdentifier;              /*0x20 */
28328c2ecf20Sopenharmony_ci	U8
28338c2ecf20Sopenharmony_ci		AttachedPhyIdentifier;      /*0x21 */
28348c2ecf20Sopenharmony_ci	U8
28358c2ecf20Sopenharmony_ci		Reserved3;                  /*0x22 */
28368c2ecf20Sopenharmony_ci	U8
28378c2ecf20Sopenharmony_ci		DiscoveryInfo;              /*0x23 */
28388c2ecf20Sopenharmony_ci	U32
28398c2ecf20Sopenharmony_ci		AttachedPhyInfo;            /*0x24 */
28408c2ecf20Sopenharmony_ci	U8
28418c2ecf20Sopenharmony_ci		ZoneGroup;                  /*0x28 */
28428c2ecf20Sopenharmony_ci	U8
28438c2ecf20Sopenharmony_ci		SelfConfigStatus;           /*0x29 */
28448c2ecf20Sopenharmony_ci	U16
28458c2ecf20Sopenharmony_ci		Reserved4;                  /*0x2A */
28468c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_EXPANDER_1,
28478c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_EXPANDER_1,
28488c2ecf20Sopenharmony_ci	Mpi2ExpanderPage1_t, *pMpi2ExpanderPage1_t;
28498c2ecf20Sopenharmony_ci
28508c2ecf20Sopenharmony_ci#define MPI2_SASEXPANDER1_PAGEVERSION       (0x02)
28518c2ecf20Sopenharmony_ci
28528c2ecf20Sopenharmony_ci/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
28538c2ecf20Sopenharmony_ci
28548c2ecf20Sopenharmony_ci/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
28558c2ecf20Sopenharmony_ci
28568c2ecf20Sopenharmony_ci/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
28578c2ecf20Sopenharmony_ci
28588c2ecf20Sopenharmony_ci/*see mpi2_sas.h for the MPI2_SAS_DEVICE_INFO_ defines
28598c2ecf20Sopenharmony_ci *used for the AttachedDeviceInfo field */
28608c2ecf20Sopenharmony_ci
28618c2ecf20Sopenharmony_ci/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
28628c2ecf20Sopenharmony_ci
28638c2ecf20Sopenharmony_ci/*values for SAS Expander Page 1 DiscoveryInfo field */
28648c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED    (0x04)
28658c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE  (0x02)
28668c2ecf20Sopenharmony_ci#define MPI2_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES  (0x01)
28678c2ecf20Sopenharmony_ci
28688c2ecf20Sopenharmony_ci/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
28698c2ecf20Sopenharmony_ci
28708c2ecf20Sopenharmony_ci
28718c2ecf20Sopenharmony_ci/****************************************************************************
28728c2ecf20Sopenharmony_ci*  SAS Device Config Pages
28738c2ecf20Sopenharmony_ci****************************************************************************/
28748c2ecf20Sopenharmony_ci
28758c2ecf20Sopenharmony_ci/*SAS Device Page 0 */
28768c2ecf20Sopenharmony_ci
28778c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
28788c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
28798c2ecf20Sopenharmony_ci		Header;                 /*0x00 */
28808c2ecf20Sopenharmony_ci	U16
28818c2ecf20Sopenharmony_ci		Slot;                   /*0x08 */
28828c2ecf20Sopenharmony_ci	U16
28838c2ecf20Sopenharmony_ci		EnclosureHandle;        /*0x0A */
28848c2ecf20Sopenharmony_ci	U64
28858c2ecf20Sopenharmony_ci		SASAddress;             /*0x0C */
28868c2ecf20Sopenharmony_ci	U16
28878c2ecf20Sopenharmony_ci		ParentDevHandle;        /*0x14 */
28888c2ecf20Sopenharmony_ci	U8
28898c2ecf20Sopenharmony_ci		PhyNum;                 /*0x16 */
28908c2ecf20Sopenharmony_ci	U8
28918c2ecf20Sopenharmony_ci		AccessStatus;           /*0x17 */
28928c2ecf20Sopenharmony_ci	U16
28938c2ecf20Sopenharmony_ci		DevHandle;              /*0x18 */
28948c2ecf20Sopenharmony_ci	U8
28958c2ecf20Sopenharmony_ci		AttachedPhyIdentifier;  /*0x1A */
28968c2ecf20Sopenharmony_ci	U8
28978c2ecf20Sopenharmony_ci		ZoneGroup;              /*0x1B */
28988c2ecf20Sopenharmony_ci	U32
28998c2ecf20Sopenharmony_ci		DeviceInfo;             /*0x1C */
29008c2ecf20Sopenharmony_ci	U16
29018c2ecf20Sopenharmony_ci		Flags;                  /*0x20 */
29028c2ecf20Sopenharmony_ci	U8
29038c2ecf20Sopenharmony_ci		PhysicalPort;           /*0x22 */
29048c2ecf20Sopenharmony_ci	U8
29058c2ecf20Sopenharmony_ci		MaxPortConnections;     /*0x23 */
29068c2ecf20Sopenharmony_ci	U64
29078c2ecf20Sopenharmony_ci		DeviceName;             /*0x24 */
29088c2ecf20Sopenharmony_ci	U8
29098c2ecf20Sopenharmony_ci		PortGroups;             /*0x2C */
29108c2ecf20Sopenharmony_ci	U8
29118c2ecf20Sopenharmony_ci		DmaGroup;               /*0x2D */
29128c2ecf20Sopenharmony_ci	U8
29138c2ecf20Sopenharmony_ci		ControlGroup;           /*0x2E */
29148c2ecf20Sopenharmony_ci	U8
29158c2ecf20Sopenharmony_ci		EnclosureLevel;		/*0x2F */
29168c2ecf20Sopenharmony_ci	U32
29178c2ecf20Sopenharmony_ci		ConnectorName[4];	/*0x30 */
29188c2ecf20Sopenharmony_ci	U32
29198c2ecf20Sopenharmony_ci		Reserved3;              /*0x34 */
29208c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_DEV_0,
29218c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_DEV_0,
29228c2ecf20Sopenharmony_ci	Mpi2SasDevicePage0_t,
29238c2ecf20Sopenharmony_ci	*pMpi2SasDevicePage0_t;
29248c2ecf20Sopenharmony_ci
29258c2ecf20Sopenharmony_ci#define MPI2_SASDEVICE0_PAGEVERSION         (0x09)
29268c2ecf20Sopenharmony_ci
29278c2ecf20Sopenharmony_ci/*values for SAS Device Page 0 AccessStatus field */
29288c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_NO_ERRORS                  (0x00)
29298c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED           (0x01)
29308c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED     (0x02)
29318c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT  (0x03)
29328c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SATA_NEEDS_INITIALIZATION  (0x04)
29338c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_ROUTE_NOT_ADDRESSABLE      (0x05)
29348c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SMP_ERROR_NOT_ADDRESSABLE  (0x06)
29358c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED             (0x07)
29368c2ecf20Sopenharmony_ci/*specific values for SATA Init failures */
29378c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN                (0x10)
29388c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT   (0x11)
29398c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_DIAG                   (0x12)
29408c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_IDENTIFICATION         (0x13)
29418c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_CHECK_POWER            (0x14)
29428c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_PIO_SN                 (0x15)
29438c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MDMA_SN                (0x16)
29448c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UDMA_SN                (0x17)
29458c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_ZONING_VIOLATION       (0x18)
29468c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_NOT_ADDRESSABLE        (0x19)
29478c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MAX                    (0x1F)
29488c2ecf20Sopenharmony_ci
29498c2ecf20Sopenharmony_ci/*see mpi2_sas.h for values for SAS Device Page 0 DeviceInfo values */
29508c2ecf20Sopenharmony_ci
29518c2ecf20Sopenharmony_ci/*values for SAS Device Page 0 Flags field */
29528c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_UNAUTHORIZED_DEVICE          (0x8000)
29538c2ecf20Sopenharmony_ci#define MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH           (0x4000)
29548c2ecf20Sopenharmony_ci#define MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE           (0x2000)
29558c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SLUMBER_PM_CAPABLE           (0x1000)
29568c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_PARTIAL_PM_CAPABLE           (0x0800)
29578c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_ASYNCHRONOUS_NOTIFY     (0x0400)
29588c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_SW_PRESERVE             (0x0200)
29598c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_UNSUPPORTED_DEVICE           (0x0100)
29608c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_48BIT_LBA_SUPPORTED     (0x0080)
29618c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_SMART_SUPPORTED         (0x0040)
29628c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED           (0x0020)
29638c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED           (0x0010)
29648c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH         (0x0008)
29658c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_PERSIST_CAPABLE              (0x0004)
29668c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID             (0x0002)
29678c2ecf20Sopenharmony_ci#define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT               (0x0001)
29688c2ecf20Sopenharmony_ci
29698c2ecf20Sopenharmony_ci
29708c2ecf20Sopenharmony_ci/*SAS Device Page 1 */
29718c2ecf20Sopenharmony_ci
29728c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1 {
29738c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
29748c2ecf20Sopenharmony_ci		Header;                 /*0x00 */
29758c2ecf20Sopenharmony_ci	U32
29768c2ecf20Sopenharmony_ci		Reserved1;              /*0x08 */
29778c2ecf20Sopenharmony_ci	U64
29788c2ecf20Sopenharmony_ci		SASAddress;             /*0x0C */
29798c2ecf20Sopenharmony_ci	U32
29808c2ecf20Sopenharmony_ci		Reserved2;              /*0x14 */
29818c2ecf20Sopenharmony_ci	U16
29828c2ecf20Sopenharmony_ci		DevHandle;              /*0x18 */
29838c2ecf20Sopenharmony_ci	U16
29848c2ecf20Sopenharmony_ci		Reserved3;              /*0x1A */
29858c2ecf20Sopenharmony_ci	U8
29868c2ecf20Sopenharmony_ci		InitialRegDeviceFIS[20];/*0x1C */
29878c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_DEV_1,
29888c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_DEV_1,
29898c2ecf20Sopenharmony_ci	Mpi2SasDevicePage1_t,
29908c2ecf20Sopenharmony_ci	*pMpi2SasDevicePage1_t;
29918c2ecf20Sopenharmony_ci
29928c2ecf20Sopenharmony_ci#define MPI2_SASDEVICE1_PAGEVERSION         (0x01)
29938c2ecf20Sopenharmony_ci
29948c2ecf20Sopenharmony_ci
29958c2ecf20Sopenharmony_ci/****************************************************************************
29968c2ecf20Sopenharmony_ci*  SAS PHY Config Pages
29978c2ecf20Sopenharmony_ci****************************************************************************/
29988c2ecf20Sopenharmony_ci
29998c2ecf20Sopenharmony_ci/*SAS PHY Page 0 */
30008c2ecf20Sopenharmony_ci
30018c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PHY_0 {
30028c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
30038c2ecf20Sopenharmony_ci		Header;                 /*0x00 */
30048c2ecf20Sopenharmony_ci	U16
30058c2ecf20Sopenharmony_ci		OwnerDevHandle;         /*0x08 */
30068c2ecf20Sopenharmony_ci	U16
30078c2ecf20Sopenharmony_ci		Reserved1;              /*0x0A */
30088c2ecf20Sopenharmony_ci	U16
30098c2ecf20Sopenharmony_ci		AttachedDevHandle;      /*0x0C */
30108c2ecf20Sopenharmony_ci	U8
30118c2ecf20Sopenharmony_ci		AttachedPhyIdentifier;  /*0x0E */
30128c2ecf20Sopenharmony_ci	U8
30138c2ecf20Sopenharmony_ci		Reserved2;              /*0x0F */
30148c2ecf20Sopenharmony_ci	U32
30158c2ecf20Sopenharmony_ci		AttachedPhyInfo;        /*0x10 */
30168c2ecf20Sopenharmony_ci	U8
30178c2ecf20Sopenharmony_ci		ProgrammedLinkRate;     /*0x14 */
30188c2ecf20Sopenharmony_ci	U8
30198c2ecf20Sopenharmony_ci		HwLinkRate;             /*0x15 */
30208c2ecf20Sopenharmony_ci	U8
30218c2ecf20Sopenharmony_ci		ChangeCount;            /*0x16 */
30228c2ecf20Sopenharmony_ci	U8
30238c2ecf20Sopenharmony_ci		Flags;                  /*0x17 */
30248c2ecf20Sopenharmony_ci	U32
30258c2ecf20Sopenharmony_ci		PhyInfo;                /*0x18 */
30268c2ecf20Sopenharmony_ci	U8
30278c2ecf20Sopenharmony_ci		NegotiatedLinkRate;     /*0x1C */
30288c2ecf20Sopenharmony_ci	U8
30298c2ecf20Sopenharmony_ci		Reserved3;              /*0x1D */
30308c2ecf20Sopenharmony_ci	U16
30318c2ecf20Sopenharmony_ci		Reserved4;              /*0x1E */
30328c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PHY_0,
30338c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PHY_0,
30348c2ecf20Sopenharmony_ci	Mpi2SasPhyPage0_t, *pMpi2SasPhyPage0_t;
30358c2ecf20Sopenharmony_ci
30368c2ecf20Sopenharmony_ci#define MPI2_SASPHY0_PAGEVERSION            (0x03)
30378c2ecf20Sopenharmony_ci
30388c2ecf20Sopenharmony_ci/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
30398c2ecf20Sopenharmony_ci
30408c2ecf20Sopenharmony_ci/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
30418c2ecf20Sopenharmony_ci
30428c2ecf20Sopenharmony_ci/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
30438c2ecf20Sopenharmony_ci
30448c2ecf20Sopenharmony_ci/*values for SAS PHY Page 0 Flags field */
30458c2ecf20Sopenharmony_ci#define MPI2_SAS_PHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC             (0x01)
30468c2ecf20Sopenharmony_ci
30478c2ecf20Sopenharmony_ci/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
30488c2ecf20Sopenharmony_ci
30498c2ecf20Sopenharmony_ci/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
30508c2ecf20Sopenharmony_ci
30518c2ecf20Sopenharmony_ci
30528c2ecf20Sopenharmony_ci/*SAS PHY Page 1 */
30538c2ecf20Sopenharmony_ci
30548c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PHY_1 {
30558c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
30568c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
30578c2ecf20Sopenharmony_ci	U32
30588c2ecf20Sopenharmony_ci		Reserved1;                  /*0x08 */
30598c2ecf20Sopenharmony_ci	U32
30608c2ecf20Sopenharmony_ci		InvalidDwordCount;          /*0x0C */
30618c2ecf20Sopenharmony_ci	U32
30628c2ecf20Sopenharmony_ci		RunningDisparityErrorCount; /*0x10 */
30638c2ecf20Sopenharmony_ci	U32
30648c2ecf20Sopenharmony_ci		LossDwordSynchCount;        /*0x14 */
30658c2ecf20Sopenharmony_ci	U32
30668c2ecf20Sopenharmony_ci		PhyResetProblemCount;       /*0x18 */
30678c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PHY_1,
30688c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PHY_1,
30698c2ecf20Sopenharmony_ci	Mpi2SasPhyPage1_t, *pMpi2SasPhyPage1_t;
30708c2ecf20Sopenharmony_ci
30718c2ecf20Sopenharmony_ci#define MPI2_SASPHY1_PAGEVERSION            (0x01)
30728c2ecf20Sopenharmony_ci
30738c2ecf20Sopenharmony_ci
30748c2ecf20Sopenharmony_ci/*SAS PHY Page 2 */
30758c2ecf20Sopenharmony_ci
30768c2ecf20Sopenharmony_citypedef struct _MPI2_SASPHY2_PHY_EVENT {
30778c2ecf20Sopenharmony_ci	U8          PhyEventCode;       /*0x00 */
30788c2ecf20Sopenharmony_ci	U8          Reserved1;          /*0x01 */
30798c2ecf20Sopenharmony_ci	U16         Reserved2;          /*0x02 */
30808c2ecf20Sopenharmony_ci	U32         PhyEventInfo;       /*0x04 */
30818c2ecf20Sopenharmony_ci} MPI2_SASPHY2_PHY_EVENT, *PTR_MPI2_SASPHY2_PHY_EVENT,
30828c2ecf20Sopenharmony_ci	Mpi2SasPhy2PhyEvent_t, *pMpi2SasPhy2PhyEvent_t;
30838c2ecf20Sopenharmony_ci
30848c2ecf20Sopenharmony_ci/*use MPI2_SASPHY3_EVENT_CODE_ for the PhyEventCode field */
30858c2ecf20Sopenharmony_ci
30868c2ecf20Sopenharmony_ci
30878c2ecf20Sopenharmony_ci/*
30888c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
30898c2ecf20Sopenharmony_ci *one and check the value returned for NumPhyEvents at runtime.
30908c2ecf20Sopenharmony_ci */
30918c2ecf20Sopenharmony_ci#ifndef MPI2_SASPHY2_PHY_EVENT_MAX
30928c2ecf20Sopenharmony_ci#define MPI2_SASPHY2_PHY_EVENT_MAX      (1)
30938c2ecf20Sopenharmony_ci#endif
30948c2ecf20Sopenharmony_ci
30958c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PHY_2 {
30968c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
30978c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
30988c2ecf20Sopenharmony_ci	U32
30998c2ecf20Sopenharmony_ci		Reserved1;                  /*0x08 */
31008c2ecf20Sopenharmony_ci	U8
31018c2ecf20Sopenharmony_ci		NumPhyEvents;               /*0x0C */
31028c2ecf20Sopenharmony_ci	U8
31038c2ecf20Sopenharmony_ci		Reserved2;                  /*0x0D */
31048c2ecf20Sopenharmony_ci	U16
31058c2ecf20Sopenharmony_ci		Reserved3;                  /*0x0E */
31068c2ecf20Sopenharmony_ci	MPI2_SASPHY2_PHY_EVENT
31078c2ecf20Sopenharmony_ci		PhyEvent[MPI2_SASPHY2_PHY_EVENT_MAX]; /*0x10 */
31088c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PHY_2,
31098c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PHY_2,
31108c2ecf20Sopenharmony_ci	Mpi2SasPhyPage2_t,
31118c2ecf20Sopenharmony_ci	*pMpi2SasPhyPage2_t;
31128c2ecf20Sopenharmony_ci
31138c2ecf20Sopenharmony_ci#define MPI2_SASPHY2_PAGEVERSION            (0x00)
31148c2ecf20Sopenharmony_ci
31158c2ecf20Sopenharmony_ci
31168c2ecf20Sopenharmony_ci/*SAS PHY Page 3 */
31178c2ecf20Sopenharmony_ci
31188c2ecf20Sopenharmony_citypedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG {
31198c2ecf20Sopenharmony_ci	U8          PhyEventCode;       /*0x00 */
31208c2ecf20Sopenharmony_ci	U8          Reserved1;          /*0x01 */
31218c2ecf20Sopenharmony_ci	U16         Reserved2;          /*0x02 */
31228c2ecf20Sopenharmony_ci	U8          CounterType;        /*0x04 */
31238c2ecf20Sopenharmony_ci	U8          ThresholdWindow;    /*0x05 */
31248c2ecf20Sopenharmony_ci	U8          TimeUnits;          /*0x06 */
31258c2ecf20Sopenharmony_ci	U8          Reserved3;          /*0x07 */
31268c2ecf20Sopenharmony_ci	U32         EventThreshold;     /*0x08 */
31278c2ecf20Sopenharmony_ci	U16         ThresholdFlags;     /*0x0C */
31288c2ecf20Sopenharmony_ci	U16         Reserved4;          /*0x0E */
31298c2ecf20Sopenharmony_ci} MPI2_SASPHY3_PHY_EVENT_CONFIG,
31308c2ecf20Sopenharmony_ci	*PTR_MPI2_SASPHY3_PHY_EVENT_CONFIG,
31318c2ecf20Sopenharmony_ci	Mpi2SasPhy3PhyEventConfig_t,
31328c2ecf20Sopenharmony_ci	*pMpi2SasPhy3PhyEventConfig_t;
31338c2ecf20Sopenharmony_ci
31348c2ecf20Sopenharmony_ci/*values for PhyEventCode field */
31358c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_NO_EVENT                    (0x00)
31368c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_INVALID_DWORD               (0x01)
31378c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RUNNING_DISPARITY_ERROR     (0x02)
31388c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_LOSS_DWORD_SYNC             (0x03)
31398c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_PHY_RESET_PROBLEM           (0x04)
31408c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_ELASTICITY_BUF_OVERFLOW     (0x05)
31418c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_ERROR                    (0x06)
31428c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_ADDR_FRAME_ERROR         (0x20)
31438c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_AC_OPEN_REJECT           (0x21)
31448c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_AC_OPEN_REJECT           (0x22)
31458c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_RC_OPEN_REJECT           (0x23)
31468c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_RC_OPEN_REJECT           (0x24)
31478c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_PARTIAL_WAITING_ON   (0x25)
31488c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_CONNECT_WAITING_ON   (0x26)
31498c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_BREAK                    (0x27)
31508c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_BREAK                    (0x28)
31518c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_BREAK_TIMEOUT               (0x29)
31528c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_CONNECTION                  (0x2A)
31538c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_PATHWAY_BLOCKED      (0x2B)
31548c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_ARB_WAIT_TIME        (0x2C)
31558c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_PEAK_ARB_WAIT_TIME          (0x2D)
31568c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_PEAK_CONNECT_TIME           (0x2E)
31578c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_FRAMES               (0x40)
31588c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_FRAMES               (0x41)
31598c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_ERROR_FRAMES         (0x42)
31608c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_ERROR_FRAMES         (0x43)
31618c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_CREDIT_BLOCKED           (0x44)
31628c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_CREDIT_BLOCKED           (0x45)
31638c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_SATA_FRAMES              (0x50)
31648c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_SATA_FRAMES              (0x51)
31658c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SATA_OVERFLOW               (0x52)
31668c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_FRAMES               (0x60)
31678c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_FRAMES               (0x61)
31688c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_ERROR_FRAMES         (0x63)
31698c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT             (0xD0)
31708c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE    (0xD1)
31718c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RX_AIP                      (0xD2)
31728c2ecf20Sopenharmony_ci
31738c2ecf20Sopenharmony_ci/*Following codes are product specific and in MPI v2.6 and later */
31748c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME		    (0xD3)
31758c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME    (0xD4)
31768c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_LCCONN_TIME	            (0xD5)
31778c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SSP_TX_START_TRANSMIT	    (0xD6)
31788c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SATA_TX_START	            (0xD7)
31798c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SMP_TX_START_TRANSMT	    (0xD8)
31808c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_BREAK_CONN	    (0xD9)
31818c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SSP_RX_START_RECEIVE	    (0xDA)
31828c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE	    (0xDB)
31838c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE	    (0xDC)
31848c2ecf20Sopenharmony_ci
31858c2ecf20Sopenharmony_ci
31868c2ecf20Sopenharmony_ci/*values for the CounterType field */
31878c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING                  (0x00)
31888c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_COUNTER_TYPE_SATURATING                (0x01)
31898c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_COUNTER_TYPE_PEAK_VALUE                (0x02)
31908c2ecf20Sopenharmony_ci
31918c2ecf20Sopenharmony_ci/*values for the TimeUnits field */
31928c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TIME_UNITS_10_MICROSECONDS             (0x00)
31938c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TIME_UNITS_100_MICROSECONDS            (0x01)
31948c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TIME_UNITS_1_MILLISECOND               (0x02)
31958c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TIME_UNITS_10_MILLISECONDS             (0x03)
31968c2ecf20Sopenharmony_ci
31978c2ecf20Sopenharmony_ci/*values for the ThresholdFlags field */
31988c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TFLAGS_PHY_RESET                       (0x0002)
31998c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_TFLAGS_EVENT_NOTIFY                    (0x0001)
32008c2ecf20Sopenharmony_ci
32018c2ecf20Sopenharmony_ci/*
32028c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
32038c2ecf20Sopenharmony_ci *one and check the value returned for NumPhyEvents at runtime.
32048c2ecf20Sopenharmony_ci */
32058c2ecf20Sopenharmony_ci#ifndef MPI2_SASPHY3_PHY_EVENT_MAX
32068c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_PHY_EVENT_MAX      (1)
32078c2ecf20Sopenharmony_ci#endif
32088c2ecf20Sopenharmony_ci
32098c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PHY_3 {
32108c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
32118c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
32128c2ecf20Sopenharmony_ci	U32
32138c2ecf20Sopenharmony_ci		Reserved1;                  /*0x08 */
32148c2ecf20Sopenharmony_ci	U8
32158c2ecf20Sopenharmony_ci		NumPhyEvents;               /*0x0C */
32168c2ecf20Sopenharmony_ci	U8
32178c2ecf20Sopenharmony_ci		Reserved2;                  /*0x0D */
32188c2ecf20Sopenharmony_ci	U16
32198c2ecf20Sopenharmony_ci		Reserved3;                  /*0x0E */
32208c2ecf20Sopenharmony_ci	MPI2_SASPHY3_PHY_EVENT_CONFIG
32218c2ecf20Sopenharmony_ci		PhyEventConfig[MPI2_SASPHY3_PHY_EVENT_MAX]; /*0x10 */
32228c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PHY_3,
32238c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PHY_3,
32248c2ecf20Sopenharmony_ci	Mpi2SasPhyPage3_t, *pMpi2SasPhyPage3_t;
32258c2ecf20Sopenharmony_ci
32268c2ecf20Sopenharmony_ci#define MPI2_SASPHY3_PAGEVERSION            (0x00)
32278c2ecf20Sopenharmony_ci
32288c2ecf20Sopenharmony_ci
32298c2ecf20Sopenharmony_ci/*SAS PHY Page 4 */
32308c2ecf20Sopenharmony_ci
32318c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PHY_4 {
32328c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
32338c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
32348c2ecf20Sopenharmony_ci	U16
32358c2ecf20Sopenharmony_ci		Reserved1;                  /*0x08 */
32368c2ecf20Sopenharmony_ci	U8
32378c2ecf20Sopenharmony_ci		Reserved2;                  /*0x0A */
32388c2ecf20Sopenharmony_ci	U8
32398c2ecf20Sopenharmony_ci		Flags;                      /*0x0B */
32408c2ecf20Sopenharmony_ci	U8
32418c2ecf20Sopenharmony_ci		InitialFrame[28];           /*0x0C */
32428c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PHY_4,
32438c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PHY_4,
32448c2ecf20Sopenharmony_ci	Mpi2SasPhyPage4_t, *pMpi2SasPhyPage4_t;
32458c2ecf20Sopenharmony_ci
32468c2ecf20Sopenharmony_ci#define MPI2_SASPHY4_PAGEVERSION            (0x00)
32478c2ecf20Sopenharmony_ci
32488c2ecf20Sopenharmony_ci/*values for the Flags field */
32498c2ecf20Sopenharmony_ci#define MPI2_SASPHY4_FLAGS_FRAME_VALID        (0x02)
32508c2ecf20Sopenharmony_ci#define MPI2_SASPHY4_FLAGS_SATA_FRAME         (0x01)
32518c2ecf20Sopenharmony_ci
32528c2ecf20Sopenharmony_ci
32538c2ecf20Sopenharmony_ci
32548c2ecf20Sopenharmony_ci
32558c2ecf20Sopenharmony_ci/****************************************************************************
32568c2ecf20Sopenharmony_ci*  SAS Port Config Pages
32578c2ecf20Sopenharmony_ci****************************************************************************/
32588c2ecf20Sopenharmony_ci
32598c2ecf20Sopenharmony_ci/*SAS Port Page 0 */
32608c2ecf20Sopenharmony_ci
32618c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_PORT_0 {
32628c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
32638c2ecf20Sopenharmony_ci		Header;                     /*0x00 */
32648c2ecf20Sopenharmony_ci	U8
32658c2ecf20Sopenharmony_ci		PortNumber;                 /*0x08 */
32668c2ecf20Sopenharmony_ci	U8
32678c2ecf20Sopenharmony_ci		PhysicalPort;               /*0x09 */
32688c2ecf20Sopenharmony_ci	U8
32698c2ecf20Sopenharmony_ci		PortWidth;                  /*0x0A */
32708c2ecf20Sopenharmony_ci	U8
32718c2ecf20Sopenharmony_ci		PhysicalPortWidth;          /*0x0B */
32728c2ecf20Sopenharmony_ci	U8
32738c2ecf20Sopenharmony_ci		ZoneGroup;                  /*0x0C */
32748c2ecf20Sopenharmony_ci	U8
32758c2ecf20Sopenharmony_ci		Reserved1;                  /*0x0D */
32768c2ecf20Sopenharmony_ci	U16
32778c2ecf20Sopenharmony_ci		Reserved2;                  /*0x0E */
32788c2ecf20Sopenharmony_ci	U64
32798c2ecf20Sopenharmony_ci		SASAddress;                 /*0x10 */
32808c2ecf20Sopenharmony_ci	U32
32818c2ecf20Sopenharmony_ci		DeviceInfo;                 /*0x18 */
32828c2ecf20Sopenharmony_ci	U32
32838c2ecf20Sopenharmony_ci		Reserved3;                  /*0x1C */
32848c2ecf20Sopenharmony_ci	U32
32858c2ecf20Sopenharmony_ci		Reserved4;                  /*0x20 */
32868c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_PORT_0,
32878c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_PORT_0,
32888c2ecf20Sopenharmony_ci	Mpi2SasPortPage0_t, *pMpi2SasPortPage0_t;
32898c2ecf20Sopenharmony_ci
32908c2ecf20Sopenharmony_ci#define MPI2_SASPORT0_PAGEVERSION           (0x00)
32918c2ecf20Sopenharmony_ci
32928c2ecf20Sopenharmony_ci/*see mpi2_sas.h for values for SAS Port Page 0 DeviceInfo values */
32938c2ecf20Sopenharmony_ci
32948c2ecf20Sopenharmony_ci
32958c2ecf20Sopenharmony_ci/****************************************************************************
32968c2ecf20Sopenharmony_ci*  SAS Enclosure Config Pages
32978c2ecf20Sopenharmony_ci****************************************************************************/
32988c2ecf20Sopenharmony_ci
32998c2ecf20Sopenharmony_ci/*SAS Enclosure Page 0 */
33008c2ecf20Sopenharmony_ci
33018c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
33028c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
33038c2ecf20Sopenharmony_ci	U32	Reserved1;			/*0x08 */
33048c2ecf20Sopenharmony_ci	U64	EnclosureLogicalID;		/*0x0C */
33058c2ecf20Sopenharmony_ci	U16	Flags;				/*0x14 */
33068c2ecf20Sopenharmony_ci	U16	EnclosureHandle;		/*0x16 */
33078c2ecf20Sopenharmony_ci	U16	NumSlots;			/*0x18 */
33088c2ecf20Sopenharmony_ci	U16	StartSlot;			/*0x1A */
33098c2ecf20Sopenharmony_ci	U8	ChassisSlot;			/*0x1C */
33108c2ecf20Sopenharmony_ci	U8	EnclosureLevel;			/*0x1D */
33118c2ecf20Sopenharmony_ci	U16	SEPDevHandle;			/*0x1E */
33128c2ecf20Sopenharmony_ci	U8	OEMRD;				/*0x20 */
33138c2ecf20Sopenharmony_ci	U8	Reserved1a;			/*0x21 */
33148c2ecf20Sopenharmony_ci	U16	Reserved2;			/*0x22 */
33158c2ecf20Sopenharmony_ci	U32	Reserved3;			/*0x24 */
33168c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
33178c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
33188c2ecf20Sopenharmony_ci	Mpi2SasEnclosurePage0_t, *pMpi2SasEnclosurePage0_t,
33198c2ecf20Sopenharmony_ci	MPI26_CONFIG_PAGE_ENCLOSURE_0,
33208c2ecf20Sopenharmony_ci	*PTR_MPI26_CONFIG_PAGE_ENCLOSURE_0,
33218c2ecf20Sopenharmony_ci	Mpi26EnclosurePage0_t, *pMpi26EnclosurePage0_t;
33228c2ecf20Sopenharmony_ci
33238c2ecf20Sopenharmony_ci#define MPI2_SASENCLOSURE0_PAGEVERSION      (0x04)
33248c2ecf20Sopenharmony_ci
33258c2ecf20Sopenharmony_ci/*values for SAS Enclosure Page 0 Flags field */
33268c2ecf20Sopenharmony_ci#define MPI26_SAS_ENCLS0_FLAGS_OEMRD_VALID          (0x0080)
33278c2ecf20Sopenharmony_ci#define MPI26_SAS_ENCLS0_FLAGS_OEMRD_COLLECTING     (0x0040)
33288c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_CHASSIS_SLOT_VALID    (0x0020)
33298c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID      (0x0010)
33308c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_MASK              (0x000F)
33318c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_UNKNOWN           (0x0000)
33328c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SES           (0x0001)
33338c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SGPIO         (0x0002)
33348c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_EXP_SGPIO         (0x0003)
33358c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE     (0x0004)
33368c2ecf20Sopenharmony_ci#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO          (0x0005)
33378c2ecf20Sopenharmony_ci
33388c2ecf20Sopenharmony_ci#define MPI26_ENCLOSURE0_PAGEVERSION        (0x04)
33398c2ecf20Sopenharmony_ci
33408c2ecf20Sopenharmony_ci/*Values for Enclosure Page 0 Flags field */
33418c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_OEMRD_VALID              (0x0080)
33428c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_OEMRD_COLLECTING         (0x0040)
33438c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_CHASSIS_SLOT_VALID       (0x0020)
33448c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_ENCL_LEVEL_VALID         (0x0010)
33458c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_MASK                 (0x000F)
33468c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_UNKNOWN              (0x0000)
33478c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_IOC_SES              (0x0001)
33488c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_IOC_SGPIO            (0x0002)
33498c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_EXP_SGPIO            (0x0003)
33508c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_SES_ENCLOSURE        (0x0004)
33518c2ecf20Sopenharmony_ci#define MPI26_ENCLS0_FLAGS_MNG_IOC_GPIO             (0x0005)
33528c2ecf20Sopenharmony_ci
33538c2ecf20Sopenharmony_ci/****************************************************************************
33548c2ecf20Sopenharmony_ci*  Log Config Page
33558c2ecf20Sopenharmony_ci****************************************************************************/
33568c2ecf20Sopenharmony_ci
33578c2ecf20Sopenharmony_ci/*Log Page 0 */
33588c2ecf20Sopenharmony_ci
33598c2ecf20Sopenharmony_ci/*
33608c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
33618c2ecf20Sopenharmony_ci *one and check the value returned for NumLogEntries at runtime.
33628c2ecf20Sopenharmony_ci */
33638c2ecf20Sopenharmony_ci#ifndef MPI2_LOG_0_NUM_LOG_ENTRIES
33648c2ecf20Sopenharmony_ci#define MPI2_LOG_0_NUM_LOG_ENTRIES          (1)
33658c2ecf20Sopenharmony_ci#endif
33668c2ecf20Sopenharmony_ci
33678c2ecf20Sopenharmony_ci#define MPI2_LOG_0_LOG_DATA_LENGTH          (0x1C)
33688c2ecf20Sopenharmony_ci
33698c2ecf20Sopenharmony_citypedef struct _MPI2_LOG_0_ENTRY {
33708c2ecf20Sopenharmony_ci	U64         TimeStamp;                      /*0x00 */
33718c2ecf20Sopenharmony_ci	U32         Reserved1;                      /*0x08 */
33728c2ecf20Sopenharmony_ci	U16         LogSequence;                    /*0x0C */
33738c2ecf20Sopenharmony_ci	U16         LogEntryQualifier;              /*0x0E */
33748c2ecf20Sopenharmony_ci	U8          VP_ID;                          /*0x10 */
33758c2ecf20Sopenharmony_ci	U8          VF_ID;                          /*0x11 */
33768c2ecf20Sopenharmony_ci	U16         Reserved2;                      /*0x12 */
33778c2ecf20Sopenharmony_ci	U8
33788c2ecf20Sopenharmony_ci		LogData[MPI2_LOG_0_LOG_DATA_LENGTH];/*0x14 */
33798c2ecf20Sopenharmony_ci} MPI2_LOG_0_ENTRY, *PTR_MPI2_LOG_0_ENTRY,
33808c2ecf20Sopenharmony_ci	Mpi2Log0Entry_t, *pMpi2Log0Entry_t;
33818c2ecf20Sopenharmony_ci
33828c2ecf20Sopenharmony_ci/*values for Log Page 0 LogEntry LogEntryQualifier field */
33838c2ecf20Sopenharmony_ci#define MPI2_LOG_0_ENTRY_QUAL_ENTRY_UNUSED          (0x0000)
33848c2ecf20Sopenharmony_ci#define MPI2_LOG_0_ENTRY_QUAL_POWER_ON_RESET        (0x0001)
33858c2ecf20Sopenharmony_ci#define MPI2_LOG_0_ENTRY_QUAL_TIMESTAMP_UPDATE      (0x0002)
33868c2ecf20Sopenharmony_ci#define MPI2_LOG_0_ENTRY_QUAL_MIN_IMPLEMENT_SPEC    (0x8000)
33878c2ecf20Sopenharmony_ci#define MPI2_LOG_0_ENTRY_QUAL_MAX_IMPLEMENT_SPEC    (0xFFFF)
33888c2ecf20Sopenharmony_ci
33898c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_LOG_0 {
33908c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;       /*0x00 */
33918c2ecf20Sopenharmony_ci	U32                                 Reserved1;    /*0x08 */
33928c2ecf20Sopenharmony_ci	U32                                 Reserved2;    /*0x0C */
33938c2ecf20Sopenharmony_ci	U16                                 NumLogEntries;/*0x10 */
33948c2ecf20Sopenharmony_ci	U16                                 Reserved3;    /*0x12 */
33958c2ecf20Sopenharmony_ci	MPI2_LOG_0_ENTRY
33968c2ecf20Sopenharmony_ci		LogEntry[MPI2_LOG_0_NUM_LOG_ENTRIES]; /*0x14 */
33978c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_LOG_0, *PTR_MPI2_CONFIG_PAGE_LOG_0,
33988c2ecf20Sopenharmony_ci	Mpi2LogPage0_t, *pMpi2LogPage0_t;
33998c2ecf20Sopenharmony_ci
34008c2ecf20Sopenharmony_ci#define MPI2_LOG_0_PAGEVERSION              (0x02)
34018c2ecf20Sopenharmony_ci
34028c2ecf20Sopenharmony_ci
34038c2ecf20Sopenharmony_ci/****************************************************************************
34048c2ecf20Sopenharmony_ci*  RAID Config Page
34058c2ecf20Sopenharmony_ci****************************************************************************/
34068c2ecf20Sopenharmony_ci
34078c2ecf20Sopenharmony_ci/*RAID Page 0 */
34088c2ecf20Sopenharmony_ci
34098c2ecf20Sopenharmony_ci/*
34108c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
34118c2ecf20Sopenharmony_ci *one and check the value returned for NumElements at runtime.
34128c2ecf20Sopenharmony_ci */
34138c2ecf20Sopenharmony_ci#ifndef MPI2_RAIDCONFIG0_MAX_ELEMENTS
34148c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_MAX_ELEMENTS       (1)
34158c2ecf20Sopenharmony_ci#endif
34168c2ecf20Sopenharmony_ci
34178c2ecf20Sopenharmony_citypedef struct _MPI2_RAIDCONFIG0_CONFIG_ELEMENT {
34188c2ecf20Sopenharmony_ci	U16                     ElementFlags;             /*0x00 */
34198c2ecf20Sopenharmony_ci	U16                     VolDevHandle;             /*0x02 */
34208c2ecf20Sopenharmony_ci	U8                      HotSparePool;             /*0x04 */
34218c2ecf20Sopenharmony_ci	U8                      PhysDiskNum;              /*0x05 */
34228c2ecf20Sopenharmony_ci	U16                     PhysDiskDevHandle;        /*0x06 */
34238c2ecf20Sopenharmony_ci} MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
34248c2ecf20Sopenharmony_ci	*PTR_MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
34258c2ecf20Sopenharmony_ci	Mpi2RaidConfig0ConfigElement_t,
34268c2ecf20Sopenharmony_ci	*pMpi2RaidConfig0ConfigElement_t;
34278c2ecf20Sopenharmony_ci
34288c2ecf20Sopenharmony_ci/*values for the ElementFlags field */
34298c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_EFLAGS_MASK_ELEMENT_TYPE       (0x000F)
34308c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_EFLAGS_VOLUME_ELEMENT          (0x0000)
34318c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_EFLAGS_VOL_PHYS_DISK_ELEMENT   (0x0001)
34328c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_EFLAGS_HOT_SPARE_ELEMENT       (0x0002)
34338c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_EFLAGS_OCE_ELEMENT             (0x0003)
34348c2ecf20Sopenharmony_ci
34358c2ecf20Sopenharmony_ci
34368c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0 {
34378c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;         /*0x00 */
34388c2ecf20Sopenharmony_ci	U8                                  NumHotSpares;   /*0x08 */
34398c2ecf20Sopenharmony_ci	U8                                  NumPhysDisks;   /*0x09 */
34408c2ecf20Sopenharmony_ci	U8                                  NumVolumes;     /*0x0A */
34418c2ecf20Sopenharmony_ci	U8                                  ConfigNum;      /*0x0B */
34428c2ecf20Sopenharmony_ci	U32                                 Flags;          /*0x0C */
34438c2ecf20Sopenharmony_ci	U8                                  ConfigGUID[24]; /*0x10 */
34448c2ecf20Sopenharmony_ci	U32                                 Reserved1;      /*0x28 */
34458c2ecf20Sopenharmony_ci	U8                                  NumElements;    /*0x2C */
34468c2ecf20Sopenharmony_ci	U8                                  Reserved2;      /*0x2D */
34478c2ecf20Sopenharmony_ci	U16                                 Reserved3;      /*0x2E */
34488c2ecf20Sopenharmony_ci	MPI2_RAIDCONFIG0_CONFIG_ELEMENT
34498c2ecf20Sopenharmony_ci		ConfigElement[MPI2_RAIDCONFIG0_MAX_ELEMENTS]; /*0x30 */
34508c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
34518c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
34528c2ecf20Sopenharmony_ci	Mpi2RaidConfigurationPage0_t,
34538c2ecf20Sopenharmony_ci	*pMpi2RaidConfigurationPage0_t;
34548c2ecf20Sopenharmony_ci
34558c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_PAGEVERSION            (0x00)
34568c2ecf20Sopenharmony_ci
34578c2ecf20Sopenharmony_ci/*values for RAID Configuration Page 0 Flags field */
34588c2ecf20Sopenharmony_ci#define MPI2_RAIDCONFIG0_FLAG_FOREIGN_CONFIG        (0x00000001)
34598c2ecf20Sopenharmony_ci
34608c2ecf20Sopenharmony_ci
34618c2ecf20Sopenharmony_ci/****************************************************************************
34628c2ecf20Sopenharmony_ci*  Driver Persistent Mapping Config Pages
34638c2ecf20Sopenharmony_ci****************************************************************************/
34648c2ecf20Sopenharmony_ci
34658c2ecf20Sopenharmony_ci/*Driver Persistent Mapping Page 0 */
34668c2ecf20Sopenharmony_ci
34678c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY {
34688c2ecf20Sopenharmony_ci	U64	PhysicalIdentifier;         /*0x00 */
34698c2ecf20Sopenharmony_ci	U16	MappingInformation;         /*0x08 */
34708c2ecf20Sopenharmony_ci	U16	DeviceIndex;                /*0x0A */
34718c2ecf20Sopenharmony_ci	U32	PhysicalBitsMapping;        /*0x0C */
34728c2ecf20Sopenharmony_ci	U32	Reserved1;                  /*0x10 */
34738c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
34748c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
34758c2ecf20Sopenharmony_ci	Mpi2DriverMap0Entry_t, *pMpi2DriverMap0Entry_t;
34768c2ecf20Sopenharmony_ci
34778c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_DRIVER_MAPPING_0 {
34788c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header; /*0x00 */
34798c2ecf20Sopenharmony_ci	MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY  Entry;  /*0x08 */
34808c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
34818c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
34828c2ecf20Sopenharmony_ci	Mpi2DriverMappingPage0_t, *pMpi2DriverMappingPage0_t;
34838c2ecf20Sopenharmony_ci
34848c2ecf20Sopenharmony_ci#define MPI2_DRIVERMAPPING0_PAGEVERSION         (0x00)
34858c2ecf20Sopenharmony_ci
34868c2ecf20Sopenharmony_ci/*values for Driver Persistent Mapping Page 0 MappingInformation field */
34878c2ecf20Sopenharmony_ci#define MPI2_DRVMAP0_MAPINFO_SLOT_MASK              (0x07F0)
34888c2ecf20Sopenharmony_ci#define MPI2_DRVMAP0_MAPINFO_SLOT_SHIFT             (4)
34898c2ecf20Sopenharmony_ci#define MPI2_DRVMAP0_MAPINFO_MISSING_MASK           (0x000F)
34908c2ecf20Sopenharmony_ci
34918c2ecf20Sopenharmony_ci
34928c2ecf20Sopenharmony_ci/****************************************************************************
34938c2ecf20Sopenharmony_ci*  Ethernet Config Pages
34948c2ecf20Sopenharmony_ci****************************************************************************/
34958c2ecf20Sopenharmony_ci
34968c2ecf20Sopenharmony_ci/*Ethernet Page 0 */
34978c2ecf20Sopenharmony_ci
34988c2ecf20Sopenharmony_ci/*IP address (union of IPv4 and IPv6) */
34998c2ecf20Sopenharmony_citypedef union _MPI2_ETHERNET_IP_ADDR {
35008c2ecf20Sopenharmony_ci	U32     IPv4Addr;
35018c2ecf20Sopenharmony_ci	U32     IPv6Addr[4];
35028c2ecf20Sopenharmony_ci} MPI2_ETHERNET_IP_ADDR, *PTR_MPI2_ETHERNET_IP_ADDR,
35038c2ecf20Sopenharmony_ci	Mpi2EthernetIpAddr_t, *pMpi2EthernetIpAddr_t;
35048c2ecf20Sopenharmony_ci
35058c2ecf20Sopenharmony_ci#define MPI2_ETHERNET_HOST_NAME_LENGTH          (32)
35068c2ecf20Sopenharmony_ci
35078c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_ETHERNET_0 {
35088c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;          /*0x00 */
35098c2ecf20Sopenharmony_ci	U8                                  NumInterfaces;   /*0x08 */
35108c2ecf20Sopenharmony_ci	U8                                  Reserved0;       /*0x09 */
35118c2ecf20Sopenharmony_ci	U16                                 Reserved1;       /*0x0A */
35128c2ecf20Sopenharmony_ci	U32                                 Status;          /*0x0C */
35138c2ecf20Sopenharmony_ci	U8                                  MediaState;      /*0x10 */
35148c2ecf20Sopenharmony_ci	U8                                  Reserved2;       /*0x11 */
35158c2ecf20Sopenharmony_ci	U16                                 Reserved3;       /*0x12 */
35168c2ecf20Sopenharmony_ci	U8                                  MacAddress[6];   /*0x14 */
35178c2ecf20Sopenharmony_ci	U8                                  Reserved4;       /*0x1A */
35188c2ecf20Sopenharmony_ci	U8                                  Reserved5;       /*0x1B */
35198c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               IpAddress;       /*0x1C */
35208c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               SubnetMask;      /*0x2C */
35218c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               GatewayIpAddress;/*0x3C */
35228c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               DNS1IpAddress;   /*0x4C */
35238c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               DNS2IpAddress;   /*0x5C */
35248c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR               DhcpIpAddress;   /*0x6C */
35258c2ecf20Sopenharmony_ci	U8
35268c2ecf20Sopenharmony_ci		HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
35278c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_ETHERNET_0,
35288c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_ETHERNET_0,
35298c2ecf20Sopenharmony_ci	Mpi2EthernetPage0_t, *pMpi2EthernetPage0_t;
35308c2ecf20Sopenharmony_ci
35318c2ecf20Sopenharmony_ci#define MPI2_ETHERNETPAGE0_PAGEVERSION   (0x00)
35328c2ecf20Sopenharmony_ci
35338c2ecf20Sopenharmony_ci/*values for Ethernet Page 0 Status field */
35348c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_IPV6_CAPABLE             (0x80000000)
35358c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_IPV4_CAPABLE             (0x40000000)
35368c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_CONSOLE_CONNECTED        (0x20000000)
35378c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_DEFAULT_IF               (0x00000100)
35388c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_FW_DWNLD_ENABLED         (0x00000080)
35398c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_TELNET_ENABLED           (0x00000040)
35408c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_SSH2_ENABLED             (0x00000020)
35418c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_DHCP_CLIENT_ENABLED      (0x00000010)
35428c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_IPV6_ENABLED             (0x00000008)
35438c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_IPV4_ENABLED             (0x00000004)
35448c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_IPV6_ADDRESSES           (0x00000002)
35458c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_STATUS_ETH_IF_ENABLED           (0x00000001)
35468c2ecf20Sopenharmony_ci
35478c2ecf20Sopenharmony_ci/*values for Ethernet Page 0 MediaState field */
35488c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_DUPLEX_MASK                  (0x80)
35498c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_HALF_DUPLEX                  (0x00)
35508c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_FULL_DUPLEX                  (0x80)
35518c2ecf20Sopenharmony_ci
35528c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_CONNECT_SPEED_MASK           (0x07)
35538c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_NOT_CONNECTED                (0x00)
35548c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_10MBIT                       (0x01)
35558c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_100MBIT                      (0x02)
35568c2ecf20Sopenharmony_ci#define MPI2_ETHPG0_MS_1GBIT                        (0x03)
35578c2ecf20Sopenharmony_ci
35588c2ecf20Sopenharmony_ci
35598c2ecf20Sopenharmony_ci/*Ethernet Page 1 */
35608c2ecf20Sopenharmony_ci
35618c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_ETHERNET_1 {
35628c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
35638c2ecf20Sopenharmony_ci		Header;                 /*0x00 */
35648c2ecf20Sopenharmony_ci	U32
35658c2ecf20Sopenharmony_ci		Reserved0;              /*0x08 */
35668c2ecf20Sopenharmony_ci	U32
35678c2ecf20Sopenharmony_ci		Flags;                  /*0x0C */
35688c2ecf20Sopenharmony_ci	U8
35698c2ecf20Sopenharmony_ci		MediaState;             /*0x10 */
35708c2ecf20Sopenharmony_ci	U8
35718c2ecf20Sopenharmony_ci		Reserved1;              /*0x11 */
35728c2ecf20Sopenharmony_ci	U16
35738c2ecf20Sopenharmony_ci		Reserved2;              /*0x12 */
35748c2ecf20Sopenharmony_ci	U8
35758c2ecf20Sopenharmony_ci		MacAddress[6];          /*0x14 */
35768c2ecf20Sopenharmony_ci	U8
35778c2ecf20Sopenharmony_ci		Reserved3;              /*0x1A */
35788c2ecf20Sopenharmony_ci	U8
35798c2ecf20Sopenharmony_ci		Reserved4;              /*0x1B */
35808c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR
35818c2ecf20Sopenharmony_ci		StaticIpAddress;        /*0x1C */
35828c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR
35838c2ecf20Sopenharmony_ci		StaticSubnetMask;       /*0x2C */
35848c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR
35858c2ecf20Sopenharmony_ci		StaticGatewayIpAddress; /*0x3C */
35868c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR
35878c2ecf20Sopenharmony_ci		StaticDNS1IpAddress;    /*0x4C */
35888c2ecf20Sopenharmony_ci	MPI2_ETHERNET_IP_ADDR
35898c2ecf20Sopenharmony_ci		StaticDNS2IpAddress;    /*0x5C */
35908c2ecf20Sopenharmony_ci	U32
35918c2ecf20Sopenharmony_ci		Reserved5;              /*0x6C */
35928c2ecf20Sopenharmony_ci	U32
35938c2ecf20Sopenharmony_ci		Reserved6;              /*0x70 */
35948c2ecf20Sopenharmony_ci	U32
35958c2ecf20Sopenharmony_ci		Reserved7;              /*0x74 */
35968c2ecf20Sopenharmony_ci	U32
35978c2ecf20Sopenharmony_ci		Reserved8;              /*0x78 */
35988c2ecf20Sopenharmony_ci	U8
35998c2ecf20Sopenharmony_ci		HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
36008c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_ETHERNET_1,
36018c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_ETHERNET_1,
36028c2ecf20Sopenharmony_ci	Mpi2EthernetPage1_t, *pMpi2EthernetPage1_t;
36038c2ecf20Sopenharmony_ci
36048c2ecf20Sopenharmony_ci#define MPI2_ETHERNETPAGE1_PAGEVERSION   (0x00)
36058c2ecf20Sopenharmony_ci
36068c2ecf20Sopenharmony_ci/*values for Ethernet Page 1 Flags field */
36078c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_SET_DEFAULT_IF             (0x00000100)
36088c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_FW_DOWNLOAD         (0x00000080)
36098c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_TELNET              (0x00000040)
36108c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_SSH2                (0x00000020)
36118c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_DHCP_CLIENT         (0x00000010)
36128c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_IPV6                (0x00000008)
36138c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_IPV4                (0x00000004)
36148c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_USE_IPV6_ADDRESSES         (0x00000002)
36158c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_FLAG_ENABLE_ETH_IF              (0x00000001)
36168c2ecf20Sopenharmony_ci
36178c2ecf20Sopenharmony_ci/*values for Ethernet Page 1 MediaState field */
36188c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DUPLEX_MASK                  (0x80)
36198c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_HALF_DUPLEX                  (0x00)
36208c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_FULL_DUPLEX                  (0x80)
36218c2ecf20Sopenharmony_ci
36228c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DATA_RATE_MASK               (0x07)
36238c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DATA_RATE_AUTO               (0x00)
36248c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DATA_RATE_10MBIT             (0x01)
36258c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DATA_RATE_100MBIT            (0x02)
36268c2ecf20Sopenharmony_ci#define MPI2_ETHPG1_MS_DATA_RATE_1GBIT              (0x03)
36278c2ecf20Sopenharmony_ci
36288c2ecf20Sopenharmony_ci
36298c2ecf20Sopenharmony_ci/****************************************************************************
36308c2ecf20Sopenharmony_ci*  Extended Manufacturing Config Pages
36318c2ecf20Sopenharmony_ci****************************************************************************/
36328c2ecf20Sopenharmony_ci
36338c2ecf20Sopenharmony_ci/*
36348c2ecf20Sopenharmony_ci *Generic structure to use for product-specific extended manufacturing pages
36358c2ecf20Sopenharmony_ci *(currently Extended Manufacturing Page 40 through Extended Manufacturing
36368c2ecf20Sopenharmony_ci *Page 60).
36378c2ecf20Sopenharmony_ci */
36388c2ecf20Sopenharmony_ci
36398c2ecf20Sopenharmony_citypedef struct _MPI2_CONFIG_PAGE_EXT_MAN_PS {
36408c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER
36418c2ecf20Sopenharmony_ci		Header;                 /*0x00 */
36428c2ecf20Sopenharmony_ci	U32
36438c2ecf20Sopenharmony_ci		ProductSpecificInfo;    /*0x08 */
36448c2ecf20Sopenharmony_ci} MPI2_CONFIG_PAGE_EXT_MAN_PS,
36458c2ecf20Sopenharmony_ci	*PTR_MPI2_CONFIG_PAGE_EXT_MAN_PS,
36468c2ecf20Sopenharmony_ci	Mpi2ExtManufacturingPagePS_t,
36478c2ecf20Sopenharmony_ci	*pMpi2ExtManufacturingPagePS_t;
36488c2ecf20Sopenharmony_ci
36498c2ecf20Sopenharmony_ci/*PageVersion should be provided by product-specific code */
36508c2ecf20Sopenharmony_ci
36518c2ecf20Sopenharmony_ci
36528c2ecf20Sopenharmony_ci
36538c2ecf20Sopenharmony_ci/****************************************************************************
36548c2ecf20Sopenharmony_ci*  values for fields used by several types of PCIe Config Pages
36558c2ecf20Sopenharmony_ci****************************************************************************/
36568c2ecf20Sopenharmony_ci
36578c2ecf20Sopenharmony_ci/*values for NegotiatedLinkRates fields */
36588c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_MASK_PHYSICAL          (0x0F)
36598c2ecf20Sopenharmony_ci/*link rates used for Negotiated Physical Link Rate */
36608c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_UNKNOWN                (0x00)
36618c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_PHY_DISABLED           (0x01)
36628c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_2_5                    (0x02)
36638c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_5_0                    (0x03)
36648c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_8_0                    (0x04)
36658c2ecf20Sopenharmony_ci#define MPI26_PCIE_NEG_LINK_RATE_16_0                   (0x05)
36668c2ecf20Sopenharmony_ci
36678c2ecf20Sopenharmony_ci
36688c2ecf20Sopenharmony_ci/****************************************************************************
36698c2ecf20Sopenharmony_ci*  PCIe IO Unit Config Pages (MPI v2.6 and later)
36708c2ecf20Sopenharmony_ci****************************************************************************/
36718c2ecf20Sopenharmony_ci
36728c2ecf20Sopenharmony_ci/*PCIe IO Unit Page 0 */
36738c2ecf20Sopenharmony_ci
36748c2ecf20Sopenharmony_citypedef struct _MPI26_PCIE_IO_UNIT0_PHY_DATA {
36758c2ecf20Sopenharmony_ci	U8	Link;                   /*0x00 */
36768c2ecf20Sopenharmony_ci	U8	LinkFlags;              /*0x01 */
36778c2ecf20Sopenharmony_ci	U8	PhyFlags;               /*0x02 */
36788c2ecf20Sopenharmony_ci	U8	NegotiatedLinkRate;     /*0x03 */
36798c2ecf20Sopenharmony_ci	U32	ControllerPhyDeviceInfo;/*0x04 */
36808c2ecf20Sopenharmony_ci	U16	AttachedDevHandle;      /*0x08 */
36818c2ecf20Sopenharmony_ci	U16	ControllerDevHandle;    /*0x0A */
36828c2ecf20Sopenharmony_ci	U32	EnumerationStatus;      /*0x0C */
36838c2ecf20Sopenharmony_ci	U32	Reserved1;              /*0x10 */
36848c2ecf20Sopenharmony_ci} MPI26_PCIE_IO_UNIT0_PHY_DATA,
36858c2ecf20Sopenharmony_ci	*PTR_MPI26_PCIE_IO_UNIT0_PHY_DATA,
36868c2ecf20Sopenharmony_ci	Mpi26PCIeIOUnit0PhyData_t, *pMpi26PCIeIOUnit0PhyData_t;
36878c2ecf20Sopenharmony_ci
36888c2ecf20Sopenharmony_ci/*
36898c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
36908c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
36918c2ecf20Sopenharmony_ci */
36928c2ecf20Sopenharmony_ci#ifndef MPI26_PCIE_IOUNIT0_PHY_MAX
36938c2ecf20Sopenharmony_ci#define MPI26_PCIE_IOUNIT0_PHY_MAX      (1)
36948c2ecf20Sopenharmony_ci#endif
36958c2ecf20Sopenharmony_ci
36968c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PIOUNIT_0 {
36978c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header; /*0x00 */
36988c2ecf20Sopenharmony_ci	U32	Reserved1;                              /*0x08 */
36998c2ecf20Sopenharmony_ci	U8	NumPhys;                                /*0x0C */
37008c2ecf20Sopenharmony_ci	U8	InitStatus;                             /*0x0D */
37018c2ecf20Sopenharmony_ci	U16	Reserved3;                              /*0x0E */
37028c2ecf20Sopenharmony_ci	MPI26_PCIE_IO_UNIT0_PHY_DATA
37038c2ecf20Sopenharmony_ci		PhyData[MPI26_PCIE_IOUNIT0_PHY_MAX];    /*0x10 */
37048c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PIOUNIT_0,
37058c2ecf20Sopenharmony_ci	*PTR_MPI26_CONFIG_PAGE_PIOUNIT_0,
37068c2ecf20Sopenharmony_ci	Mpi26PCIeIOUnitPage0_t, *pMpi26PCIeIOUnitPage0_t;
37078c2ecf20Sopenharmony_ci
37088c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNITPAGE0_PAGEVERSION                   (0x00)
37098c2ecf20Sopenharmony_ci
37108c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 0 LinkFlags */
37118c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT0_LINKFLAGS_ENUMERATION_IN_PROGRESS (0x08)
37128c2ecf20Sopenharmony_ci
37138c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 0 PhyFlags */
37148c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED             (0x08)
37158c2ecf20Sopenharmony_ci
37168c2ecf20Sopenharmony_ci/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
37178c2ecf20Sopenharmony_ci
37188c2ecf20Sopenharmony_ci/*see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo
37198c2ecf20Sopenharmony_ci *values
37208c2ecf20Sopenharmony_ci */
37218c2ecf20Sopenharmony_ci
37228c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 0 EnumerationStatus */
37238c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED          (0x40000000)
37248c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT0_ES_MAX_DEVICES_EXCEEDED           (0x20000000)
37258c2ecf20Sopenharmony_ci
37268c2ecf20Sopenharmony_ci
37278c2ecf20Sopenharmony_ci/*PCIe IO Unit Page 1 */
37288c2ecf20Sopenharmony_ci
37298c2ecf20Sopenharmony_citypedef struct _MPI26_PCIE_IO_UNIT1_PHY_DATA {
37308c2ecf20Sopenharmony_ci	U8	Link;                       /*0x00 */
37318c2ecf20Sopenharmony_ci	U8	LinkFlags;                  /*0x01 */
37328c2ecf20Sopenharmony_ci	U8	PhyFlags;                   /*0x02 */
37338c2ecf20Sopenharmony_ci	U8	MaxMinLinkRate;             /*0x03 */
37348c2ecf20Sopenharmony_ci	U32	ControllerPhyDeviceInfo;    /*0x04 */
37358c2ecf20Sopenharmony_ci	U32	Reserved1;                  /*0x08 */
37368c2ecf20Sopenharmony_ci} MPI26_PCIE_IO_UNIT1_PHY_DATA,
37378c2ecf20Sopenharmony_ci	*PTR_MPI26_PCIE_IO_UNIT1_PHY_DATA,
37388c2ecf20Sopenharmony_ci	Mpi26PCIeIOUnit1PhyData_t, *pMpi26PCIeIOUnit1PhyData_t;
37398c2ecf20Sopenharmony_ci
37408c2ecf20Sopenharmony_ci/*values for LinkFlags */
37418c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SEPARATE_REFCLK     (0x00)
37428c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_LINKFLAGS_SRIS_EN                 (0x01)
37438c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_LINKFLAGS_SRNS_EN                 (0x02)
37448c2ecf20Sopenharmony_ci
37458c2ecf20Sopenharmony_ci/*
37468c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
37478c2ecf20Sopenharmony_ci *one and check the value returned for NumPhys at runtime.
37488c2ecf20Sopenharmony_ci */
37498c2ecf20Sopenharmony_ci#ifndef MPI26_PCIE_IOUNIT1_PHY_MAX
37508c2ecf20Sopenharmony_ci#define MPI26_PCIE_IOUNIT1_PHY_MAX      (1)
37518c2ecf20Sopenharmony_ci#endif
37528c2ecf20Sopenharmony_ci
37538c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PIOUNIT_1 {
37548c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
37558c2ecf20Sopenharmony_ci	U16	ControlFlags;                       /*0x08 */
37568c2ecf20Sopenharmony_ci	U16	Reserved;                           /*0x0A */
37578c2ecf20Sopenharmony_ci	U16	AdditionalControlFlags;             /*0x0C */
37588c2ecf20Sopenharmony_ci	U16	NVMeMaxQueueDepth;                  /*0x0E */
37598c2ecf20Sopenharmony_ci	U8	NumPhys;                            /*0x10 */
37608c2ecf20Sopenharmony_ci	U8	DMDReportPCIe;                      /*0x11 */
37618c2ecf20Sopenharmony_ci	U16	Reserved2;                          /*0x12 */
37628c2ecf20Sopenharmony_ci	MPI26_PCIE_IO_UNIT1_PHY_DATA
37638c2ecf20Sopenharmony_ci		PhyData[MPI26_PCIE_IOUNIT1_PHY_MAX];/*0x14 */
37648c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PIOUNIT_1,
37658c2ecf20Sopenharmony_ci	*PTR_MPI26_CONFIG_PAGE_PIOUNIT_1,
37668c2ecf20Sopenharmony_ci	Mpi26PCIeIOUnitPage1_t, *pMpi26PCIeIOUnitPage1_t;
37678c2ecf20Sopenharmony_ci
37688c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNITPAGE1_PAGEVERSION   (0x00)
37698c2ecf20Sopenharmony_ci
37708c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 1 PhyFlags */
37718c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE                      (0x08)
37728c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_PHYFLAGS_ENDPOINT_ONLY                    (0x01)
37738c2ecf20Sopenharmony_ci
37748c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 1 MaxMinLinkRate */
37758c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_MASK                             (0xF0)
37768c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_SHIFT                            (4)
37778c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_2_5                              (0x20)
37788c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_5_0                              (0x30)
37798c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_8_0                              (0x40)
37808c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_MAX_RATE_16_0                             (0x50)
37818c2ecf20Sopenharmony_ci
37828c2ecf20Sopenharmony_ci/*values for PCIe IO Unit Page 1 DMDReportPCIe */
37838c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_MASK                          (0x80)
37848c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_1_SEC                         (0x00)
37858c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_16_SEC                        (0x80)
37868c2ecf20Sopenharmony_ci#define MPI26_PCIEIOUNIT1_DMDRPT_DELAY_TIME_MASK                    (0x7F)
37878c2ecf20Sopenharmony_ci
37888c2ecf20Sopenharmony_ci/*see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo
37898c2ecf20Sopenharmony_ci *values
37908c2ecf20Sopenharmony_ci */
37918c2ecf20Sopenharmony_ci
37928c2ecf20Sopenharmony_ci
37938c2ecf20Sopenharmony_ci/****************************************************************************
37948c2ecf20Sopenharmony_ci*  PCIe Switch Config Pages (MPI v2.6 and later)
37958c2ecf20Sopenharmony_ci****************************************************************************/
37968c2ecf20Sopenharmony_ci
37978c2ecf20Sopenharmony_ci/*PCIe Switch Page 0 */
37988c2ecf20Sopenharmony_ci
37998c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PSWITCH_0 {
38008c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
38018c2ecf20Sopenharmony_ci	U8	PhysicalPort;               /*0x08 */
38028c2ecf20Sopenharmony_ci	U8	Reserved1;                  /*0x09 */
38038c2ecf20Sopenharmony_ci	U16	Reserved2;                  /*0x0A */
38048c2ecf20Sopenharmony_ci	U16	DevHandle;                  /*0x0C */
38058c2ecf20Sopenharmony_ci	U16	ParentDevHandle;            /*0x0E */
38068c2ecf20Sopenharmony_ci	U8	NumPorts;                   /*0x10 */
38078c2ecf20Sopenharmony_ci	U8	PCIeLevel;                  /*0x11 */
38088c2ecf20Sopenharmony_ci	U16	Reserved3;                  /*0x12 */
38098c2ecf20Sopenharmony_ci	U32	Reserved4;                  /*0x14 */
38108c2ecf20Sopenharmony_ci	U32	Reserved5;                  /*0x18 */
38118c2ecf20Sopenharmony_ci	U32	Reserved6;                  /*0x1C */
38128c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PSWITCH_0, *PTR_MPI26_CONFIG_PAGE_PSWITCH_0,
38138c2ecf20Sopenharmony_ci	Mpi26PCIeSwitchPage0_t, *pMpi26PCIeSwitchPage0_t;
38148c2ecf20Sopenharmony_ci
38158c2ecf20Sopenharmony_ci#define MPI26_PCIESWITCH0_PAGEVERSION       (0x00)
38168c2ecf20Sopenharmony_ci
38178c2ecf20Sopenharmony_ci
38188c2ecf20Sopenharmony_ci/*PCIe Switch Page 1 */
38198c2ecf20Sopenharmony_ci
38208c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PSWITCH_1 {
38218c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
38228c2ecf20Sopenharmony_ci	U8	PhysicalPort;               /*0x08 */
38238c2ecf20Sopenharmony_ci	U8	Reserved1;                  /*0x09 */
38248c2ecf20Sopenharmony_ci	U16	Reserved2;                  /*0x0A */
38258c2ecf20Sopenharmony_ci	U8	NumPorts;                   /*0x0C */
38268c2ecf20Sopenharmony_ci	U8	PortNum;                    /*0x0D */
38278c2ecf20Sopenharmony_ci	U16	AttachedDevHandle;          /*0x0E */
38288c2ecf20Sopenharmony_ci	U16	SwitchDevHandle;            /*0x10 */
38298c2ecf20Sopenharmony_ci	U8	NegotiatedPortWidth;        /*0x12 */
38308c2ecf20Sopenharmony_ci	U8	NegotiatedLinkRate;         /*0x13 */
38318c2ecf20Sopenharmony_ci	U32	Reserved4;                  /*0x14 */
38328c2ecf20Sopenharmony_ci	U32	Reserved5;                  /*0x18 */
38338c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PSWITCH_1, *PTR_MPI26_CONFIG_PAGE_PSWITCH_1,
38348c2ecf20Sopenharmony_ci	Mpi26PCIeSwitchPage1_t, *pMpi26PCIeSwitchPage1_t;
38358c2ecf20Sopenharmony_ci
38368c2ecf20Sopenharmony_ci#define MPI26_PCIESWITCH1_PAGEVERSION       (0x00)
38378c2ecf20Sopenharmony_ci
38388c2ecf20Sopenharmony_ci/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
38398c2ecf20Sopenharmony_ci
38408c2ecf20Sopenharmony_ci/* defines for the Flags field */
38418c2ecf20Sopenharmony_ci#define MPI26_PCIESWITCH1_2_RETIMER_PRESENCE         (0x0002)
38428c2ecf20Sopenharmony_ci#define MPI26_PCIESWITCH1_RETIMER_PRESENCE           (0x0001)
38438c2ecf20Sopenharmony_ci
38448c2ecf20Sopenharmony_ci/****************************************************************************
38458c2ecf20Sopenharmony_ci*  PCIe Device Config Pages (MPI v2.6 and later)
38468c2ecf20Sopenharmony_ci****************************************************************************/
38478c2ecf20Sopenharmony_ci
38488c2ecf20Sopenharmony_ci/*PCIe Device Page 0 */
38498c2ecf20Sopenharmony_ci
38508c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PCIEDEV_0 {
38518c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
38528c2ecf20Sopenharmony_ci	U16	Slot;                   /*0x08 */
38538c2ecf20Sopenharmony_ci	U16	EnclosureHandle;        /*0x0A */
38548c2ecf20Sopenharmony_ci	U64	WWID;                   /*0x0C */
38558c2ecf20Sopenharmony_ci	U16	ParentDevHandle;        /*0x14 */
38568c2ecf20Sopenharmony_ci	U8	PortNum;                /*0x16 */
38578c2ecf20Sopenharmony_ci	U8	AccessStatus;           /*0x17 */
38588c2ecf20Sopenharmony_ci	U16	DevHandle;              /*0x18 */
38598c2ecf20Sopenharmony_ci	U8	PhysicalPort;           /*0x1A */
38608c2ecf20Sopenharmony_ci	U8	Reserved1;              /*0x1B */
38618c2ecf20Sopenharmony_ci	U32	DeviceInfo;             /*0x1C */
38628c2ecf20Sopenharmony_ci	U32	Flags;                  /*0x20 */
38638c2ecf20Sopenharmony_ci	U8	SupportedLinkRates;     /*0x24 */
38648c2ecf20Sopenharmony_ci	U8	MaxPortWidth;           /*0x25 */
38658c2ecf20Sopenharmony_ci	U8	NegotiatedPortWidth;    /*0x26 */
38668c2ecf20Sopenharmony_ci	U8	NegotiatedLinkRate;     /*0x27 */
38678c2ecf20Sopenharmony_ci	U8	EnclosureLevel;         /*0x28 */
38688c2ecf20Sopenharmony_ci	U8	Reserved2;              /*0x29 */
38698c2ecf20Sopenharmony_ci	U16	Reserved3;              /*0x2A */
38708c2ecf20Sopenharmony_ci	U8	ConnectorName[4];       /*0x2C */
38718c2ecf20Sopenharmony_ci	U32	Reserved4;              /*0x30 */
38728c2ecf20Sopenharmony_ci	U32	Reserved5;              /*0x34 */
38738c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PCIEDEV_0, *PTR_MPI26_CONFIG_PAGE_PCIEDEV_0,
38748c2ecf20Sopenharmony_ci	Mpi26PCIeDevicePage0_t, *pMpi26PCIeDevicePage0_t;
38758c2ecf20Sopenharmony_ci
38768c2ecf20Sopenharmony_ci#define MPI26_PCIEDEVICE0_PAGEVERSION       (0x01)
38778c2ecf20Sopenharmony_ci
38788c2ecf20Sopenharmony_ci/*values for PCIe Device Page 0 AccessStatus field */
38798c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NO_ERRORS                    (0x00)
38808c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NEEDS_INITIALIZATION         (0x04)
38818c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_CAPABILITY_FAILED            (0x02)
38828c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_DEVICE_BLOCKED               (0x07)
38838c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_MEMORY_SPACE_ACCESS_FAILED   (0x08)
38848c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_UNSUPPORTED_DEVICE           (0x09)
38858c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_MSIX_REQUIRED                (0x0A)
38868c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_UNKNOWN                      (0x10)
38878c2ecf20Sopenharmony_ci
38888c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_READY_TIMEOUT           (0x30)
38898c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_DEVCFG_UNSUPPORTED      (0x31)
38908c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_IDENTIFY_FAILED         (0x32)
38918c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_QCONFIG_FAILED          (0x33)
38928c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_QCREATION_FAILED        (0x34)
38938c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_EVENTCFG_FAILED         (0x35)
38948c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x36)
38958c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_IDLE_TIMEOUT            (0x37)
38968c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_NVME_FAILURE_STATUS          (0x38)
38978c2ecf20Sopenharmony_ci
38988c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_ASTATUS_INIT_FAIL_MAX                (0x3F)
38998c2ecf20Sopenharmony_ci
39008c2ecf20Sopenharmony_ci/*see mpi2_pci.h for the MPI26_PCIE_DEVINFO_ defines used for the DeviceInfo
39018c2ecf20Sopenharmony_ci *field
39028c2ecf20Sopenharmony_ci */
39038c2ecf20Sopenharmony_ci
39048c2ecf20Sopenharmony_ci/*values for PCIe Device Page 0 Flags field*/
39058c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_2_RETIMER_PRESENCE             (0x00020000)
39068c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_RETIMER_PRESENCE               (0x00010000)
39078c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_UNAUTHORIZED_DEVICE            (0x00008000)
39088c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ENABLED_FAST_PATH              (0x00004000)
39098c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE              (0x00002000)
39108c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ASYNCHRONOUS_NOTIFICATION      (0x00000400)
39118c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ATA_SW_PRESERVATION            (0x00000200)
39128c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_UNSUPPORTED_DEVICE             (0x00000100)
39138c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ATA_48BIT_LBA_SUPPORTED        (0x00000080)
39148c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ATA_SMART_SUPPORTED            (0x00000040)
39158c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ATA_NCQ_SUPPORTED              (0x00000020)
39168c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ATA_FUA_SUPPORTED              (0x00000010)
39178c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_ENCL_LEVEL_VALID               (0x00000002)
39188c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT                 (0x00000001)
39198c2ecf20Sopenharmony_ci
39208c2ecf20Sopenharmony_ci/* values for PCIe Device Page 0 SupportedLinkRates field */
39218c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_LINK_RATE_16_0_SUPPORTED             (0x08)
39228c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_LINK_RATE_8_0_SUPPORTED              (0x04)
39238c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_LINK_RATE_5_0_SUPPORTED              (0x02)
39248c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV0_LINK_RATE_2_5_SUPPORTED              (0x01)
39258c2ecf20Sopenharmony_ci
39268c2ecf20Sopenharmony_ci/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
39278c2ecf20Sopenharmony_ci
39288c2ecf20Sopenharmony_ci
39298c2ecf20Sopenharmony_ci/*PCIe Device Page 2 */
39308c2ecf20Sopenharmony_ci
39318c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PCIEDEV_2 {
39328c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
39338c2ecf20Sopenharmony_ci	U16	DevHandle;		/*0x08 */
39348c2ecf20Sopenharmony_ci	U8	ControllerResetTO;		/* 0x0A */
39358c2ecf20Sopenharmony_ci	U8	Reserved1;		/* 0x0B */
39368c2ecf20Sopenharmony_ci	U32	MaximumDataTransferSize;	/*0x0C */
39378c2ecf20Sopenharmony_ci	U32	Capabilities;		/*0x10 */
39388c2ecf20Sopenharmony_ci	U16	NOIOB;		/* 0x14 */
39398c2ecf20Sopenharmony_ci	U16     ShutdownLatency;        /* 0x16 */
39408c2ecf20Sopenharmony_ci	U16     VendorID;               /* 0x18 */
39418c2ecf20Sopenharmony_ci	U16     DeviceID;               /* 0x1A */
39428c2ecf20Sopenharmony_ci	U16     SubsystemVendorID;      /* 0x1C */
39438c2ecf20Sopenharmony_ci	U16     SubsystemID;            /* 0x1E */
39448c2ecf20Sopenharmony_ci	U8      RevisionID;             /* 0x20 */
39458c2ecf20Sopenharmony_ci	U8      Reserved21[3];          /* 0x21 */
39468c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PCIEDEV_2, *PTR_MPI26_CONFIG_PAGE_PCIEDEV_2,
39478c2ecf20Sopenharmony_ci	Mpi26PCIeDevicePage2_t, *pMpi26PCIeDevicePage2_t;
39488c2ecf20Sopenharmony_ci
39498c2ecf20Sopenharmony_ci#define MPI26_PCIEDEVICE2_PAGEVERSION       (0x01)
39508c2ecf20Sopenharmony_ci
39518c2ecf20Sopenharmony_ci/*defines for PCIe Device Page 2 Capabilities field */
39528c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV2_CAP_DATA_BLK_ALIGN_AND_GRAN     (0x00000008)
39538c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV2_CAP_SGL_FORMAT                  (0x00000004)
39548c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV2_CAP_BIT_BUCKET_SUPPORT          (0x00000002)
39558c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV2_CAP_SGL_SUPPORT                 (0x00000001)
39568c2ecf20Sopenharmony_ci
39578c2ecf20Sopenharmony_ci/* Defines for the NOIOB field */
39588c2ecf20Sopenharmony_ci#define MPI26_PCIEDEV2_NOIOB_UNSUPPORTED                (0x0000)
39598c2ecf20Sopenharmony_ci
39608c2ecf20Sopenharmony_ci/****************************************************************************
39618c2ecf20Sopenharmony_ci*  PCIe Link Config Pages (MPI v2.6 and later)
39628c2ecf20Sopenharmony_ci****************************************************************************/
39638c2ecf20Sopenharmony_ci
39648c2ecf20Sopenharmony_ci/*PCIe Link Page 1 */
39658c2ecf20Sopenharmony_ci
39668c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PCIELINK_1 {
39678c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
39688c2ecf20Sopenharmony_ci	U8	Link;				/*0x08 */
39698c2ecf20Sopenharmony_ci	U8	Reserved1;			/*0x09 */
39708c2ecf20Sopenharmony_ci	U16	Reserved2;			/*0x0A */
39718c2ecf20Sopenharmony_ci	U32	CorrectableErrorCount;		/*0x0C */
39728c2ecf20Sopenharmony_ci	U16	NonFatalErrorCount;		/*0x10 */
39738c2ecf20Sopenharmony_ci	U16	Reserved3;			/*0x12 */
39748c2ecf20Sopenharmony_ci	U16	FatalErrorCount;		/*0x14 */
39758c2ecf20Sopenharmony_ci	U16	Reserved4;			/*0x16 */
39768c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PCIELINK_1, *PTR_MPI26_CONFIG_PAGE_PCIELINK_1,
39778c2ecf20Sopenharmony_ci	Mpi26PcieLinkPage1_t, *pMpi26PcieLinkPage1_t;
39788c2ecf20Sopenharmony_ci
39798c2ecf20Sopenharmony_ci#define MPI26_PCIELINK1_PAGEVERSION            (0x00)
39808c2ecf20Sopenharmony_ci
39818c2ecf20Sopenharmony_ci/*PCIe Link Page 2 */
39828c2ecf20Sopenharmony_ci
39838c2ecf20Sopenharmony_citypedef struct _MPI26_PCIELINK2_LINK_EVENT {
39848c2ecf20Sopenharmony_ci	U8	LinkEventCode;		/*0x00 */
39858c2ecf20Sopenharmony_ci	U8	Reserved1;		/*0x01 */
39868c2ecf20Sopenharmony_ci	U16	Reserved2;		/*0x02 */
39878c2ecf20Sopenharmony_ci	U32	LinkEventInfo;		/*0x04 */
39888c2ecf20Sopenharmony_ci} MPI26_PCIELINK2_LINK_EVENT, *PTR_MPI26_PCIELINK2_LINK_EVENT,
39898c2ecf20Sopenharmony_ci	Mpi26PcieLink2LinkEvent_t, *pMpi26PcieLink2LinkEvent_t;
39908c2ecf20Sopenharmony_ci
39918c2ecf20Sopenharmony_ci/*use MPI26_PCIELINK3_EVTCODE_ for the LinkEventCode field */
39928c2ecf20Sopenharmony_ci
39938c2ecf20Sopenharmony_ci
39948c2ecf20Sopenharmony_ci/*
39958c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
39968c2ecf20Sopenharmony_ci *one and check the value returned for NumLinkEvents at runtime.
39978c2ecf20Sopenharmony_ci */
39988c2ecf20Sopenharmony_ci#ifndef MPI26_PCIELINK2_LINK_EVENT_MAX
39998c2ecf20Sopenharmony_ci#define MPI26_PCIELINK2_LINK_EVENT_MAX      (1)
40008c2ecf20Sopenharmony_ci#endif
40018c2ecf20Sopenharmony_ci
40028c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PCIELINK_2 {
40038c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
40048c2ecf20Sopenharmony_ci	U8	Link;                       /*0x08 */
40058c2ecf20Sopenharmony_ci	U8	Reserved1;                  /*0x09 */
40068c2ecf20Sopenharmony_ci	U16	Reserved2;                  /*0x0A */
40078c2ecf20Sopenharmony_ci	U8	NumLinkEvents;              /*0x0C */
40088c2ecf20Sopenharmony_ci	U8	Reserved3;                  /*0x0D */
40098c2ecf20Sopenharmony_ci	U16	Reserved4;                  /*0x0E */
40108c2ecf20Sopenharmony_ci	MPI26_PCIELINK2_LINK_EVENT
40118c2ecf20Sopenharmony_ci		LinkEvent[MPI26_PCIELINK2_LINK_EVENT_MAX];	/*0x10 */
40128c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PCIELINK_2, *PTR_MPI26_CONFIG_PAGE_PCIELINK_2,
40138c2ecf20Sopenharmony_ci	Mpi26PcieLinkPage2_t, *pMpi26PcieLinkPage2_t;
40148c2ecf20Sopenharmony_ci
40158c2ecf20Sopenharmony_ci#define MPI26_PCIELINK2_PAGEVERSION            (0x00)
40168c2ecf20Sopenharmony_ci
40178c2ecf20Sopenharmony_ci/*PCIe Link Page 3 */
40188c2ecf20Sopenharmony_ci
40198c2ecf20Sopenharmony_citypedef struct _MPI26_PCIELINK3_LINK_EVENT_CONFIG {
40208c2ecf20Sopenharmony_ci	U8	LinkEventCode;      /*0x00 */
40218c2ecf20Sopenharmony_ci	U8	Reserved1;          /*0x01 */
40228c2ecf20Sopenharmony_ci	U16	Reserved2;          /*0x02 */
40238c2ecf20Sopenharmony_ci	U8	CounterType;        /*0x04 */
40248c2ecf20Sopenharmony_ci	U8	ThresholdWindow;    /*0x05 */
40258c2ecf20Sopenharmony_ci	U8	TimeUnits;          /*0x06 */
40268c2ecf20Sopenharmony_ci	U8	Reserved3;          /*0x07 */
40278c2ecf20Sopenharmony_ci	U32	EventThreshold;     /*0x08 */
40288c2ecf20Sopenharmony_ci	U16	ThresholdFlags;     /*0x0C */
40298c2ecf20Sopenharmony_ci	U16	Reserved4;          /*0x0E */
40308c2ecf20Sopenharmony_ci} MPI26_PCIELINK3_LINK_EVENT_CONFIG, *PTR_MPI26_PCIELINK3_LINK_EVENT_CONFIG,
40318c2ecf20Sopenharmony_ci	Mpi26PcieLink3LinkEventConfig_t, *pMpi26PcieLink3LinkEventConfig_t;
40328c2ecf20Sopenharmony_ci
40338c2ecf20Sopenharmony_ci/*values for LinkEventCode field */
40348c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_NO_EVENT                              (0x00)
40358c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_CORRECTABLE_ERROR_RECEIVED            (0x01)
40368c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_NON_FATAL_ERROR_RECEIVED              (0x02)
40378c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_FATAL_ERROR_RECEIVED                  (0x03)
40388c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_DATA_LINK_ERROR_DETECTED              (0x04)
40398c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_TRANSACTION_LAYER_ERROR_DETECTED      (0x05)
40408c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_TLP_ECRC_ERROR_DETECTED               (0x06)
40418c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_POISONED_TLP                          (0x07)
40428c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_RECEIVED_NAK_DLLP                     (0x08)
40438c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_SENT_NAK_DLLP                         (0x09)
40448c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_RECOVERY_STATE                  (0x0A)
40458c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_RXL0S_STATE                     (0x0B)
40468c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_TXL0S_STATE                     (0x0C)
40478c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_L1_STATE                        (0x0D)
40488c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_DISABLED_STATE                  (0x0E)
40498c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_LTSSM_HOT_RESET_STATE                 (0x0F)
40508c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_SYSTEM_ERROR                          (0x10)
40518c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_DECODE_ERROR                          (0x11)
40528c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_EVTCODE_DISPARITY_ERROR                       (0x12)
40538c2ecf20Sopenharmony_ci
40548c2ecf20Sopenharmony_ci/*values for the CounterType field */
40558c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_COUNTER_TYPE_WRAPPING               (0x00)
40568c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_COUNTER_TYPE_SATURATING             (0x01)
40578c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_COUNTER_TYPE_PEAK_VALUE             (0x02)
40588c2ecf20Sopenharmony_ci
40598c2ecf20Sopenharmony_ci/*values for the TimeUnits field */
40608c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_TM_UNITS_10_MICROSECONDS            (0x00)
40618c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_TM_UNITS_100_MICROSECONDS           (0x01)
40628c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_TM_UNITS_1_MILLISECOND              (0x02)
40638c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_TM_UNITS_10_MILLISECONDS            (0x03)
40648c2ecf20Sopenharmony_ci
40658c2ecf20Sopenharmony_ci/*values for the ThresholdFlags field */
40668c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_TFLAGS_EVENT_NOTIFY                 (0x0001)
40678c2ecf20Sopenharmony_ci
40688c2ecf20Sopenharmony_ci/*
40698c2ecf20Sopenharmony_ci *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
40708c2ecf20Sopenharmony_ci *one and check the value returned for NumLinkEvents at runtime.
40718c2ecf20Sopenharmony_ci */
40728c2ecf20Sopenharmony_ci#ifndef MPI26_PCIELINK3_LINK_EVENT_MAX
40738c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_LINK_EVENT_MAX      (1)
40748c2ecf20Sopenharmony_ci#endif
40758c2ecf20Sopenharmony_ci
40768c2ecf20Sopenharmony_citypedef struct _MPI26_CONFIG_PAGE_PCIELINK_3 {
40778c2ecf20Sopenharmony_ci	MPI2_CONFIG_EXTENDED_PAGE_HEADER	Header;	/*0x00 */
40788c2ecf20Sopenharmony_ci	U8	Link;                       /*0x08 */
40798c2ecf20Sopenharmony_ci	U8	Reserved1;                  /*0x09 */
40808c2ecf20Sopenharmony_ci	U16	Reserved2;                  /*0x0A */
40818c2ecf20Sopenharmony_ci	U8	NumLinkEvents;              /*0x0C */
40828c2ecf20Sopenharmony_ci	U8	Reserved3;                  /*0x0D */
40838c2ecf20Sopenharmony_ci	U16	Reserved4;                  /*0x0E */
40848c2ecf20Sopenharmony_ci	MPI26_PCIELINK3_LINK_EVENT_CONFIG
40858c2ecf20Sopenharmony_ci		LinkEventConfig[MPI26_PCIELINK3_LINK_EVENT_MAX]; /*0x10 */
40868c2ecf20Sopenharmony_ci} MPI26_CONFIG_PAGE_PCIELINK_3, *PTR_MPI26_CONFIG_PAGE_PCIELINK_3,
40878c2ecf20Sopenharmony_ci	Mpi26PcieLinkPage3_t, *pMpi26PcieLinkPage3_t;
40888c2ecf20Sopenharmony_ci
40898c2ecf20Sopenharmony_ci#define MPI26_PCIELINK3_PAGEVERSION            (0x00)
40908c2ecf20Sopenharmony_ci
40918c2ecf20Sopenharmony_ci
40928c2ecf20Sopenharmony_ci#endif
4093