xref: /linux/drivers/message/fusion/lsi/mpi_cnfg.h (revision c1a71d1c0440c47e006845f8accc1f212ca86852)
11da177e4SLinus Torvalds /*
2*c1a71d1cSMoore, Eric Dean   *  Copyright (c) 2000-2005 LSI Logic Corporation.
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  *
51da177e4SLinus Torvalds  *           Name:  mpi_cnfg.h
61da177e4SLinus Torvalds  *          Title:  MPI Config message, structures, and Pages
71da177e4SLinus Torvalds  *  Creation Date:  July 27, 2000
81da177e4SLinus Torvalds  *
9*c1a71d1cSMoore, Eric Dean   *    mpi_cnfg.h Version:  01.05.08
101da177e4SLinus Torvalds  *
111da177e4SLinus Torvalds  *  Version History
121da177e4SLinus Torvalds  *  ---------------
131da177e4SLinus Torvalds  *
141da177e4SLinus Torvalds  *  Date      Version   Description
151da177e4SLinus Torvalds  *  --------  --------  ------------------------------------------------------
161da177e4SLinus Torvalds  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
171da177e4SLinus Torvalds  *  06-06-00  01.00.01  Update version number for 1.0 release.
181da177e4SLinus Torvalds  *  06-08-00  01.00.02  Added _PAGEVERSION definitions for all pages.
191da177e4SLinus Torvalds  *                      Added FcPhLowestVersion, FcPhHighestVersion, Reserved2
201da177e4SLinus Torvalds  *                      fields to FC_DEVICE_0 page, updated the page version.
211da177e4SLinus Torvalds  *                      Changed _FREE_RUNNING_CLOCK to _PACING_TRANSFERS in
221da177e4SLinus Torvalds  *                      SCSI_PORT_0, SCSI_DEVICE_0 and SCSI_DEVICE_1 pages
231da177e4SLinus Torvalds  *                      and updated the page versions.
241da177e4SLinus Torvalds  *                      Added _RESPONSE_ID_MASK definition to SCSI_PORT_1
251da177e4SLinus Torvalds  *                      page and updated the page version.
261da177e4SLinus Torvalds  *                      Added Information field and _INFO_PARAMS_NEGOTIATED
271da177e4SLinus Torvalds  *                      definitionto SCSI_DEVICE_0 page.
281da177e4SLinus Torvalds  *  06-22-00  01.00.03  Removed batch controls from LAN_0 page and updated the
291da177e4SLinus Torvalds  *                      page version.
301da177e4SLinus Torvalds  *                      Added BucketsRemaining to LAN_1 page, redefined the
311da177e4SLinus Torvalds  *                      state values, and updated the page version.
321da177e4SLinus Torvalds  *                      Revised bus width definitions in SCSI_PORT_0,
331da177e4SLinus Torvalds  *                      SCSI_DEVICE_0 and SCSI_DEVICE_1 pages.
341da177e4SLinus Torvalds  *  06-30-00  01.00.04  Added MaxReplySize to LAN_1 page and updated the page
351da177e4SLinus Torvalds  *                      version.
361da177e4SLinus Torvalds  *                      Moved FC_DEVICE_0 PageAddress description to spec.
371da177e4SLinus Torvalds  *  07-27-00  01.00.05  Corrected the SubsystemVendorID and SubsystemID field
381da177e4SLinus Torvalds  *                      widths in IOC_0 page and updated the page version.
391da177e4SLinus Torvalds  *  11-02-00  01.01.01  Original release for post 1.0 work
401da177e4SLinus Torvalds  *                      Added Manufacturing pages, IO Unit Page 2, SCSI SPI
411da177e4SLinus Torvalds  *                      Port Page 2, FC Port Page 4, FC Port Page 5
421da177e4SLinus Torvalds  *  11-15-00  01.01.02  Interim changes to match proposals
431da177e4SLinus Torvalds  *  12-04-00  01.01.03  Config page changes to match MPI rev 1.00.01.
441da177e4SLinus Torvalds  *  12-05-00  01.01.04  Modified config page actions.
451da177e4SLinus Torvalds  *  01-09-01  01.01.05  Added defines for page address formats.
461da177e4SLinus Torvalds  *                      Data size for Manufacturing pages 2 and 3 no longer
471da177e4SLinus Torvalds  *                      defined here.
481da177e4SLinus Torvalds  *                      Io Unit Page 2 size is fixed at 4 adapters and some
491da177e4SLinus Torvalds  *                      flags were changed.
501da177e4SLinus Torvalds  *                      SCSI Port Page 2 Device Settings modified.
511da177e4SLinus Torvalds  *                      New fields added to FC Port Page 0 and some flags
521da177e4SLinus Torvalds  *                      cleaned up.
531da177e4SLinus Torvalds  *                      Removed impedance flash from FC Port Page 1.
541da177e4SLinus Torvalds  *                      Added FC Port pages 6 and 7.
551da177e4SLinus Torvalds  *  01-25-01  01.01.06  Added MaxInitiators field to FcPortPage0.
561da177e4SLinus Torvalds  *  01-29-01  01.01.07  Changed some defines to make them 32 character unique.
571da177e4SLinus Torvalds  *                      Added some LinkType defines for FcPortPage0.
581da177e4SLinus Torvalds  *  02-20-01  01.01.08  Started using MPI_POINTER.
591da177e4SLinus Torvalds  *  02-27-01  01.01.09  Replaced MPI_CONFIG_PAGETYPE_SCSI_LUN with
601da177e4SLinus Torvalds  *                      MPI_CONFIG_PAGETYPE_RAID_VOLUME.
611da177e4SLinus Torvalds  *                      Added definitions and structures for IOC Page 2 and
621da177e4SLinus Torvalds  *                      RAID Volume Page 2.
631da177e4SLinus Torvalds  *  03-27-01  01.01.10  Added CONFIG_PAGE_FC_PORT_8 and CONFIG_PAGE_FC_PORT_9.
641da177e4SLinus Torvalds  *                      CONFIG_PAGE_FC_PORT_3 now supports persistent by DID.
651da177e4SLinus Torvalds  *                      Added VendorId and ProductRevLevel fields to
661da177e4SLinus Torvalds  *                      RAIDVOL2_IM_PHYS_ID struct.
671da177e4SLinus Torvalds  *                      Modified values for MPI_FCPORTPAGE0_FLAGS_ATTACH_
681da177e4SLinus Torvalds  *                      defines to make them compatible to MPI version 1.0.
691da177e4SLinus Torvalds  *                      Added structure offset comments.
701da177e4SLinus Torvalds  *  04-09-01  01.01.11  Added some new defines for the PageAddress field and
711da177e4SLinus Torvalds  *                      removed some obsolete ones.
721da177e4SLinus Torvalds  *                      Added IO Unit Page 3.
731da177e4SLinus Torvalds  *                      Modified defines for Scsi Port Page 2.
741da177e4SLinus Torvalds  *                      Modified RAID Volume Pages.
751da177e4SLinus Torvalds  *  08-08-01  01.02.01  Original release for v1.2 work.
761da177e4SLinus Torvalds  *                      Added SepID and SepBus to RVP2 IMPhysicalDisk struct.
771da177e4SLinus Torvalds  *                      Added defines for the SEP bits in RVP2 VolumeSettings.
781da177e4SLinus Torvalds  *                      Modified the DeviceSettings field in RVP2 to use the
791da177e4SLinus Torvalds  *                      proper structure.
801da177e4SLinus Torvalds  *                      Added defines for SES, SAF-TE, and cross channel for
811da177e4SLinus Torvalds  *                      IOCPage2 CapabilitiesFlags.
821da177e4SLinus Torvalds  *                      Removed define for MPI_IOUNITPAGE2_FLAGS_RAID_DISABLE.
831da177e4SLinus Torvalds  *                      Removed define for
841da177e4SLinus Torvalds  *                      MPI_SCSIPORTPAGE2_PORT_FLAGS_PARITY_ENABLE.
851da177e4SLinus Torvalds  *                      Added define for MPI_CONFIG_PAGEATTR_RO_PERSISTENT.
861da177e4SLinus Torvalds  *  08-29-01 01.02.02   Fixed value for MPI_MANUFACTPAGE_DEVID_53C1035.
871da177e4SLinus Torvalds  *                      Added defines for MPI_FCPORTPAGE1_FLAGS_HARD_ALPA_ONLY
881da177e4SLinus Torvalds  *                      and MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY.
891da177e4SLinus Torvalds  *                      Removed MPI_SCSIPORTPAGE0_CAP_PACING_TRANSFERS,
901da177e4SLinus Torvalds  *                      MPI_SCSIDEVPAGE0_NP_PACING_TRANSFERS, and
911da177e4SLinus Torvalds  *                      MPI_SCSIDEVPAGE1_RP_PACING_TRANSFERS, and
921da177e4SLinus Torvalds  *                      MPI_SCSIDEVPAGE1_CONF_PPR_ALLOWED.
931da177e4SLinus Torvalds  *                      Added defines for MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED
941da177e4SLinus Torvalds  *                      and MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED.
951da177e4SLinus Torvalds  *                      Added OnBusTimerValue to CONFIG_PAGE_SCSI_PORT_1.
961da177e4SLinus Torvalds  *                      Added rejected bits to SCSI Device Page 0 Information.
971da177e4SLinus Torvalds  *                      Increased size of ALPA array in FC Port Page 2 by one
981da177e4SLinus Torvalds  *                      and removed a one byte reserved field.
991da177e4SLinus Torvalds  *  09-28-01 01.02.03   Swapped NegWireSpeedLow and NegWireSpeedLow in
1001da177e4SLinus Torvalds  *                      CONFIG_PAGE_LAN_1 to match preferred 64-bit ordering.
1011da177e4SLinus Torvalds  *                      Added structures for Manufacturing Page 4, IO Unit
1021da177e4SLinus Torvalds  *                      Page 3, IOC Page 3, IOC Page 4, RAID Volume Page 0, and
1031da177e4SLinus Torvalds  *                      RAID PhysDisk Page 0.
1041da177e4SLinus Torvalds  *  10-04-01 01.02.04   Added define for MPI_CONFIG_PAGETYPE_RAID_PHYSDISK.
1051da177e4SLinus Torvalds  *                      Modified some of the new defines to make them 32
1061da177e4SLinus Torvalds  *                      character unique.
1071da177e4SLinus Torvalds  *                      Modified how variable length pages (arrays) are defined.
1081da177e4SLinus Torvalds  *                      Added generic defines for hot spare pools and RAID
1091da177e4SLinus Torvalds  *                      volume types.
1101da177e4SLinus Torvalds  *  11-01-01 01.02.05   Added define for MPI_IOUNITPAGE1_DISABLE_IR.
1111da177e4SLinus Torvalds  *  03-14-02 01.02.06   Added PCISlotNum field to CONFIG_PAGE_IOC_1 along with
1121da177e4SLinus Torvalds  *                      related define, and bumped the page version define.
1131da177e4SLinus Torvalds  *  05-31-02 01.02.07   Added a Flags field to CONFIG_PAGE_IOC_2_RAID_VOL in a
1141da177e4SLinus Torvalds  *                      reserved byte and added a define.
1151da177e4SLinus Torvalds  *                      Added define for
1161da177e4SLinus Torvalds  *                      MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE.
1171da177e4SLinus Torvalds  *                      Added new config page: CONFIG_PAGE_IOC_5.
1181da177e4SLinus Torvalds  *                      Added MaxAliases, MaxHardAliases, and NumCurrentAliases
1191da177e4SLinus Torvalds  *                      fields to CONFIG_PAGE_FC_PORT_0.
1201da177e4SLinus Torvalds  *                      Added AltConnector and NumRequestedAliases fields to
1211da177e4SLinus Torvalds  *                      CONFIG_PAGE_FC_PORT_1.
1221da177e4SLinus Torvalds  *                      Added new config page: CONFIG_PAGE_FC_PORT_10.
1231da177e4SLinus Torvalds  *  07-12-02 01.02.08   Added more MPI_MANUFACTPAGE_DEVID_ defines.
1241da177e4SLinus Torvalds  *                      Added additional MPI_SCSIDEVPAGE0_NP_ defines.
1251da177e4SLinus Torvalds  *                      Added more MPI_SCSIDEVPAGE1_RP_ defines.
1261da177e4SLinus Torvalds  *                      Added define for
1271da177e4SLinus Torvalds  *                      MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE.
1281da177e4SLinus Torvalds  *                      Added new config page: CONFIG_PAGE_SCSI_DEVICE_3.
1291da177e4SLinus Torvalds  *                      Modified MPI_FCPORTPAGE5_FLAGS_ defines.
1301da177e4SLinus Torvalds  *  09-16-02 01.02.09   Added MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG define.
1311da177e4SLinus Torvalds  *  11-15-02 01.02.10   Added ConnectedID defines for CONFIG_PAGE_SCSI_PORT_0.
1321da177e4SLinus Torvalds  *                      Added more Flags defines for CONFIG_PAGE_FC_PORT_1.
1331da177e4SLinus Torvalds  *                      Added more Flags defines for CONFIG_PAGE_FC_DEVICE_0.
1341da177e4SLinus Torvalds  *  04-01-03 01.02.11   Added RR_TOV field and additional Flags defines for
1351da177e4SLinus Torvalds  *                      CONFIG_PAGE_FC_PORT_1.
1361da177e4SLinus Torvalds  *                      Added define MPI_FCPORTPAGE5_FLAGS_DISABLE to disable
1371da177e4SLinus Torvalds  *                      an alias.
1381da177e4SLinus Torvalds  *                      Added more device id defines.
1391da177e4SLinus Torvalds  *  06-26-03 01.02.12   Added MPI_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID define.
1401da177e4SLinus Torvalds  *                      Added TargetConfig and IDConfig fields to
1411da177e4SLinus Torvalds  *                      CONFIG_PAGE_SCSI_PORT_1.
1421da177e4SLinus Torvalds  *                      Added more PortFlags defines for CONFIG_PAGE_SCSI_PORT_2
1431da177e4SLinus Torvalds  *                      to control DV.
1441da177e4SLinus Torvalds  *                      Added more Flags defines for CONFIG_PAGE_FC_PORT_1.
1451da177e4SLinus Torvalds  *                      In CONFIG_PAGE_FC_DEVICE_0, replaced Reserved1 field
1461da177e4SLinus Torvalds  *                      with ADISCHardALPA.
1471da177e4SLinus Torvalds  *                      Added MPI_FC_DEVICE_PAGE0_PROT_FCP_RETRY define.
148*c1a71d1cSMoore, Eric Dean   *  01-16-04 01.02.13   Added InitiatorDeviceTimeout and InitiatorIoPendTimeout
149*c1a71d1cSMoore, Eric Dean   *                      fields and related defines to CONFIG_PAGE_FC_PORT_1.
150*c1a71d1cSMoore, Eric Dean   *                      Added define for
151*c1a71d1cSMoore, Eric Dean   *                      MPI_FCPORTPAGE1_FLAGS_SOFT_ALPA_FALLBACK.
152*c1a71d1cSMoore, Eric Dean   *                      Added new fields to the substructures of
153*c1a71d1cSMoore, Eric Dean   *                      CONFIG_PAGE_FC_PORT_10.
154*c1a71d1cSMoore, Eric Dean   *  04-29-04 01.02.14   Added define for IDP bit for CONFIG_PAGE_SCSI_PORT_0,
155*c1a71d1cSMoore, Eric Dean   *                      CONFIG_PAGE_SCSI_DEVICE_0, and
156*c1a71d1cSMoore, Eric Dean   *                      CONFIG_PAGE_SCSI_DEVICE_1. Also bumped Page Version for
157*c1a71d1cSMoore, Eric Dean   *                      these pages.
158*c1a71d1cSMoore, Eric Dean   *  05-11-04 01.03.01   Added structure for CONFIG_PAGE_INBAND_0.
159*c1a71d1cSMoore, Eric Dean   *  08-19-04 01.05.01   Modified MSG_CONFIG request to support extended config
160*c1a71d1cSMoore, Eric Dean   *                      pages.
161*c1a71d1cSMoore, Eric Dean   *                      Added a new structure for extended config page header.
162*c1a71d1cSMoore, Eric Dean   *                      Added new extended config pages types and structures for
163*c1a71d1cSMoore, Eric Dean   *                      SAS IO Unit, SAS Expander, SAS Device, and SAS PHY.
164*c1a71d1cSMoore, Eric Dean   *                      Replaced a reserved byte in CONFIG_PAGE_MANUFACTURING_4
165*c1a71d1cSMoore, Eric Dean   *                      to add a Flags field.
166*c1a71d1cSMoore, Eric Dean   *                      Two new Manufacturing config pages (5 and 6).
167*c1a71d1cSMoore, Eric Dean   *                      Two new bits defined for IO Unit Page 1 Flags field.
168*c1a71d1cSMoore, Eric Dean   *                      Modified CONFIG_PAGE_IO_UNIT_2 to add three new fields
169*c1a71d1cSMoore, Eric Dean   *                      to specify the BIOS boot device.
170*c1a71d1cSMoore, Eric Dean   *                      Four new Flags bits defined for IO Unit Page 2.
171*c1a71d1cSMoore, Eric Dean   *                      Added IO Unit Page 4.
172*c1a71d1cSMoore, Eric Dean   *                      Added EEDP Flags settings to IOC Page 1.
173*c1a71d1cSMoore, Eric Dean   *                      Added new BIOS Page 1 config page.
174*c1a71d1cSMoore, Eric Dean   *  10-05-04 01.05.02   Added define for
175*c1a71d1cSMoore, Eric Dean   *                      MPI_IOCPAGE1_INITIATOR_CONTEXT_REPLY_DISABLE.
176*c1a71d1cSMoore, Eric Dean   *                      Added new Flags field to CONFIG_PAGE_MANUFACTURING_5 and
177*c1a71d1cSMoore, Eric Dean   *                      associated defines.
178*c1a71d1cSMoore, Eric Dean   *                      Added more defines for SAS IO Unit Page 0
179*c1a71d1cSMoore, Eric Dean   *                      DiscoveryStatus field.
180*c1a71d1cSMoore, Eric Dean   *                      Added define for MPI_SAS_IOUNIT0_DS_SUBTRACTIVE_LINK
181*c1a71d1cSMoore, Eric Dean   *                      and MPI_SAS_IOUNIT0_DS_TABLE_LINK.
182*c1a71d1cSMoore, Eric Dean   *                      Added defines for Physical Mapping Modes to SAS IO Unit
183*c1a71d1cSMoore, Eric Dean   *                      Page 2.
184*c1a71d1cSMoore, Eric Dean   *                      Added define for
185*c1a71d1cSMoore, Eric Dean   *                      MPI_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH.
186*c1a71d1cSMoore, Eric Dean   *  10-27-04 01.05.03   Added defines for new SAS PHY page addressing mode.
187*c1a71d1cSMoore, Eric Dean   *                      Added defines for MaxTargetSpinUp to BIOS Page 1.
188*c1a71d1cSMoore, Eric Dean   *                      Added 5 new ControlFlags defines for SAS IO Unit
189*c1a71d1cSMoore, Eric Dean   *                      Page 1.
190*c1a71d1cSMoore, Eric Dean   *                      Added MaxNumPhysicalMappedIDs field to SAS IO Unit
191*c1a71d1cSMoore, Eric Dean   *                      Page 2.
192*c1a71d1cSMoore, Eric Dean   *                      Added AccessStatus field to SAS Device Page 0 and added
193*c1a71d1cSMoore, Eric Dean   *                      new Flags bits for supported SATA features.
194*c1a71d1cSMoore, Eric Dean   *  12-07-04  01.05.04  Added config page structures for BIOS Page 2, RAID
195*c1a71d1cSMoore, Eric Dean   *                      Volume Page 1, and RAID Physical Disk Page 1.
196*c1a71d1cSMoore, Eric Dean   *                      Replaced IO Unit Page 1 BootTargetID,BootBus, and
197*c1a71d1cSMoore, Eric Dean   *                      BootAdapterNum with reserved field.
198*c1a71d1cSMoore, Eric Dean   *                      Added DataScrubRate and ResyncRate to RAID Volume
199*c1a71d1cSMoore, Eric Dean   *                      Page 0.
200*c1a71d1cSMoore, Eric Dean   *                      Added MPI_SAS_IOUNIT2_FLAGS_RESERVE_ID_0_FOR_BOOT
201*c1a71d1cSMoore, Eric Dean   *                      define.
202*c1a71d1cSMoore, Eric Dean   *  12-09-04  01.05.05  Added Target Mode Large CDB Enable to FC Port Page 1
203*c1a71d1cSMoore, Eric Dean   *                      Flags field.
204*c1a71d1cSMoore, Eric Dean   *                      Added Auto Port Config flag define for SAS IOUNIT
205*c1a71d1cSMoore, Eric Dean   *                      Page 1 ControlFlags.
206*c1a71d1cSMoore, Eric Dean   *                      Added Disabled bad Phy define to Expander Page 1
207*c1a71d1cSMoore, Eric Dean   *                      Discovery Info field.
208*c1a71d1cSMoore, Eric Dean   *                      Added SAS/SATA device support to SAS IOUnit Page 1
209*c1a71d1cSMoore, Eric Dean   *                      ControlFlags.
210*c1a71d1cSMoore, Eric Dean   *                      Added Unsupported device to SAS Dev Page 0 Flags field
211*c1a71d1cSMoore, Eric Dean   *                      Added disable use SATA Hash Address for SAS IOUNIT
212*c1a71d1cSMoore, Eric Dean   *                      page 1 in ControlFields.
213*c1a71d1cSMoore, Eric Dean   *  01-15-05  01.05.06  Added defaults for data scrub rate and resync rate to
214*c1a71d1cSMoore, Eric Dean   *                      Manufacturing Page 4.
215*c1a71d1cSMoore, Eric Dean   *                      Added new defines for BIOS Page 1 IOCSettings field.
216*c1a71d1cSMoore, Eric Dean   *                      Added ExtDiskIdentifier field to RAID Physical Disk
217*c1a71d1cSMoore, Eric Dean   *                      Page 0.
218*c1a71d1cSMoore, Eric Dean   *                      Added new defines for SAS IO Unit Page 1 ControlFlags
219*c1a71d1cSMoore, Eric Dean   *                      and to SAS Device Page 0 Flags to control SATA devices.
220*c1a71d1cSMoore, Eric Dean   *                      Added defines and structures for the new Log Page 0, a
221*c1a71d1cSMoore, Eric Dean   *                      new type of configuration page.
222*c1a71d1cSMoore, Eric Dean   *  02-09-05  01.05.07  Added InactiveStatus field to RAID Volume Page 0.
223*c1a71d1cSMoore, Eric Dean   *                      Added WWID field to RAID Volume Page 1.
224*c1a71d1cSMoore, Eric Dean   *                      Added PhysicalPort field to SAS Expander pages 0 and 1.
225*c1a71d1cSMoore, Eric Dean   *  03-11-05  01.05.08  Removed the EEDP flags from IOC Page 1.
226*c1a71d1cSMoore, Eric Dean   *                      Added Enclosure/Slot boot device format to BIOS Page 2.
227*c1a71d1cSMoore, Eric Dean   *                      New status value for RAID Volume Page 0 VolumeStatus
228*c1a71d1cSMoore, Eric Dean   *                      (VolumeState subfield).
229*c1a71d1cSMoore, Eric Dean   *                      New value for RAID Physical Page 0 InactiveStatus.
230*c1a71d1cSMoore, Eric Dean   *                      Added Inactive Volume Member flag RAID Physical Disk
231*c1a71d1cSMoore, Eric Dean   *                      Page 0 PhysDiskStatus field.
232*c1a71d1cSMoore, Eric Dean   *                      New physical mapping mode in SAS IO Unit Page 2.
233*c1a71d1cSMoore, Eric Dean   *                      Added CONFIG_PAGE_SAS_ENCLOSURE_0.
234*c1a71d1cSMoore, Eric Dean   *                      Added Slot and Enclosure fields to SAS Device Page 0.
2351da177e4SLinus Torvalds  *  --------------------------------------------------------------------------
2361da177e4SLinus Torvalds  */
2371da177e4SLinus Torvalds 
2381da177e4SLinus Torvalds #ifndef MPI_CNFG_H
2391da177e4SLinus Torvalds #define MPI_CNFG_H
2401da177e4SLinus Torvalds 
2411da177e4SLinus Torvalds 
2421da177e4SLinus Torvalds /*****************************************************************************
2431da177e4SLinus Torvalds *
2441da177e4SLinus Torvalds *       C o n f i g    M e s s a g e    a n d    S t r u c t u r e s
2451da177e4SLinus Torvalds *
2461da177e4SLinus Torvalds *****************************************************************************/
2471da177e4SLinus Torvalds 
2481da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_HEADER
2491da177e4SLinus Torvalds {
2501da177e4SLinus Torvalds     U8                      PageVersion;                /* 00h */
2511da177e4SLinus Torvalds     U8                      PageLength;                 /* 01h */
2521da177e4SLinus Torvalds     U8                      PageNumber;                 /* 02h */
2531da177e4SLinus Torvalds     U8                      PageType;                   /* 03h */
254*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_HEADER, MPI_POINTER PTR_CONFIG_PAGE_HEADER,
2551da177e4SLinus Torvalds   ConfigPageHeader_t, MPI_POINTER pConfigPageHeader_t;
2561da177e4SLinus Torvalds 
2571da177e4SLinus Torvalds typedef union _CONFIG_PAGE_HEADER_UNION
2581da177e4SLinus Torvalds {
2591da177e4SLinus Torvalds    ConfigPageHeader_t  Struct;
2601da177e4SLinus Torvalds    U8                  Bytes[4];
2611da177e4SLinus Torvalds    U16                 Word16[2];
2621da177e4SLinus Torvalds    U32                 Word32;
2631da177e4SLinus Torvalds } ConfigPageHeaderUnion, MPI_POINTER pConfigPageHeaderUnion,
264*c1a71d1cSMoore, Eric Dean    CONFIG_PAGE_HEADER_UNION, MPI_POINTER PTR_CONFIG_PAGE_HEADER_UNION;
2651da177e4SLinus Torvalds 
2661da177e4SLinus Torvalds typedef struct _CONFIG_EXTENDED_PAGE_HEADER
2671da177e4SLinus Torvalds {
2681da177e4SLinus Torvalds     U8                  PageVersion;                /* 00h */
2691da177e4SLinus Torvalds     U8                  Reserved1;                  /* 01h */
2701da177e4SLinus Torvalds     U8                  PageNumber;                 /* 02h */
2711da177e4SLinus Torvalds     U8                  PageType;                   /* 03h */
2721da177e4SLinus Torvalds     U16                 ExtPageLength;              /* 04h */
2731da177e4SLinus Torvalds     U8                  ExtPageType;                /* 06h */
2741da177e4SLinus Torvalds     U8                  Reserved2;                  /* 07h */
275*c1a71d1cSMoore, Eric Dean  } CONFIG_EXTENDED_PAGE_HEADER, MPI_POINTER PTR_CONFIG_EXTENDED_PAGE_HEADER,
2761da177e4SLinus Torvalds   ConfigExtendedPageHeader_t, MPI_POINTER pConfigExtendedPageHeader_t;
2771da177e4SLinus Torvalds 
2781da177e4SLinus Torvalds 
2791da177e4SLinus Torvalds 
2801da177e4SLinus Torvalds /****************************************************************************
2811da177e4SLinus Torvalds *   PageType field values
2821da177e4SLinus Torvalds ****************************************************************************/
2831da177e4SLinus Torvalds #define MPI_CONFIG_PAGEATTR_READ_ONLY               (0x00)
2841da177e4SLinus Torvalds #define MPI_CONFIG_PAGEATTR_CHANGEABLE              (0x10)
2851da177e4SLinus Torvalds #define MPI_CONFIG_PAGEATTR_PERSISTENT              (0x20)
2861da177e4SLinus Torvalds #define MPI_CONFIG_PAGEATTR_RO_PERSISTENT           (0x30)
2871da177e4SLinus Torvalds #define MPI_CONFIG_PAGEATTR_MASK                    (0xF0)
2881da177e4SLinus Torvalds 
2891da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_IO_UNIT                 (0x00)
2901da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_IOC                     (0x01)
2911da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_BIOS                    (0x02)
2921da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_SCSI_PORT               (0x03)
2931da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_SCSI_DEVICE             (0x04)
2941da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_FC_PORT                 (0x05)
2951da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_FC_DEVICE               (0x06)
2961da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_LAN                     (0x07)
2971da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_RAID_VOLUME             (0x08)
2981da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_MANUFACTURING           (0x09)
2991da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_RAID_PHYSDISK           (0x0A)
3001da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_INBAND                  (0x0B)
3011da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_EXTENDED                (0x0F)
3021da177e4SLinus Torvalds #define MPI_CONFIG_PAGETYPE_MASK                    (0x0F)
3031da177e4SLinus Torvalds 
3041da177e4SLinus Torvalds #define MPI_CONFIG_TYPENUM_MASK                     (0x0FFF)
3051da177e4SLinus Torvalds 
3061da177e4SLinus Torvalds 
3071da177e4SLinus Torvalds /****************************************************************************
3081da177e4SLinus Torvalds *   ExtPageType field values
3091da177e4SLinus Torvalds ****************************************************************************/
3101da177e4SLinus Torvalds #define MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT          (0x10)
3111da177e4SLinus Torvalds #define MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER         (0x11)
3121da177e4SLinus Torvalds #define MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE           (0x12)
3131da177e4SLinus Torvalds #define MPI_CONFIG_EXTPAGETYPE_SAS_PHY              (0x13)
314*c1a71d1cSMoore, Eric Dean  #define MPI_CONFIG_EXTPAGETYPE_LOG                  (0x14)
315*c1a71d1cSMoore, Eric Dean  #define MPI_CONFIG_EXTPAGETYPE_ENCLOSURE            (0x15)
3161da177e4SLinus Torvalds 
3171da177e4SLinus Torvalds 
3181da177e4SLinus Torvalds /****************************************************************************
3191da177e4SLinus Torvalds *   PageAddress field values
3201da177e4SLinus Torvalds ****************************************************************************/
3211da177e4SLinus Torvalds #define MPI_SCSI_PORT_PGAD_PORT_MASK                (0x000000FF)
3221da177e4SLinus Torvalds 
323*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_FORM_MASK                   (0xF0000000)
324*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_FORM_BUS_TID                (0x00000000)
3251da177e4SLinus Torvalds #define MPI_SCSI_DEVICE_TARGET_ID_MASK              (0x000000FF)
3261da177e4SLinus Torvalds #define MPI_SCSI_DEVICE_TARGET_ID_SHIFT             (0)
3271da177e4SLinus Torvalds #define MPI_SCSI_DEVICE_BUS_MASK                    (0x0000FF00)
3281da177e4SLinus Torvalds #define MPI_SCSI_DEVICE_BUS_SHIFT                   (8)
329*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_FORM_TARGET_MODE            (0x10000000)
330*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_RESPOND_ID_MASK          (0x000000FF)
331*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_RESPOND_ID_SHIFT         (0)
332*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_BUS_MASK                 (0x0000FF00)
333*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_BUS_SHIFT                (8)
334*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_INIT_ID_MASK             (0x00FF0000)
335*c1a71d1cSMoore, Eric Dean  #define MPI_SCSI_DEVICE_TM_INIT_ID_SHIFT            (16)
3361da177e4SLinus Torvalds 
3371da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_PORT_MASK                  (0xF0000000)
3381da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_PORT_SHIFT                 (28)
3391da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_FORM_MASK                  (0x0F000000)
3401da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_FORM_INDEX                 (0x01000000)
3411da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_INDEX_MASK                 (0x0000FFFF)
3421da177e4SLinus Torvalds #define MPI_FC_PORT_PGAD_INDEX_SHIFT                (0)
3431da177e4SLinus Torvalds 
3441da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_PORT_MASK                (0xF0000000)
3451da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_PORT_SHIFT               (28)
3461da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_FORM_MASK                (0x0F000000)
3471da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_FORM_NEXT_DID            (0x00000000)
3481da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_ND_PORT_MASK             (0xF0000000)
3491da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_ND_PORT_SHIFT            (28)
3501da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_ND_DID_MASK              (0x00FFFFFF)
3511da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_ND_DID_SHIFT             (0)
3521da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_FORM_BUS_TID             (0x01000000)
3531da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_BT_BUS_MASK              (0x0000FF00)
3541da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT             (8)
3551da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_BT_TID_MASK              (0x000000FF)
3561da177e4SLinus Torvalds #define MPI_FC_DEVICE_PGAD_BT_TID_SHIFT             (0)
3571da177e4SLinus Torvalds 
3581da177e4SLinus Torvalds #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_MASK          (0x000000FF)
3591da177e4SLinus Torvalds #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_SHIFT         (0)
3601da177e4SLinus Torvalds 
361*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_FORM_MASK             (0xF0000000)
362*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_FORM_SHIFT            (28)
363*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE  (0x00000000)
364*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE_PHY_NUM   (0x00000001)
365*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE           (0x00000002)
366*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_GNH_MASK_HANDLE       (0x0000FFFF)
367*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_GNH_SHIFT_HANDLE      (0)
368*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_HPN_MASK_PHY          (0x00FF0000)
369*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_PHY         (16)
370*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_HPN_MASK_HANDLE       (0x0000FFFF)
371*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_HANDLE      (0)
372*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_H_MASK_HANDLE         (0x0000FFFF)
373*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPAND_PGAD_H_SHIFT_HANDLE        (0)
374*c1a71d1cSMoore, Eric Dean  
3751da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_FORM_MASK               (0xF0000000)
3761da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_FORM_SHIFT              (28)
3771da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE    (0x00000000)
3781da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID      (0x00000001)
3791da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_FORM_HANDLE             (0x00000002)
3801da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_MASK         (0x0000FFFF)
3811da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_SHIFT        (0)
3821da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_BT_BUS_MASK             (0x0000FF00)
3831da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_BT_BUS_SHIFT            (8)
3841da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_BT_TID_MASK             (0x000000FF)
3851da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_BT_TID_SHIFT            (0)
3861da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_H_HANDLE_MASK           (0x0000FFFF)
3871da177e4SLinus Torvalds #define MPI_SAS_DEVICE_PGAD_H_HANDLE_SHIFT          (0)
3881da177e4SLinus Torvalds 
389*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_FORM_MASK                  (0xF0000000)
390*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_FORM_SHIFT                 (28)
391*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER            (0x0)
392*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_FORM_PHY_TBL_INDEX         (0x1)
393*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_PHY_NUMBER_MASK            (0x000000FF)
394*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_PHY_NUMBER_SHIFT           (0)
395*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_PHY_TBL_INDEX_MASK         (0x0000FFFF)
396*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_PHY_PGAD_PHY_TBL_INDEX_SHIFT        (0)
397*c1a71d1cSMoore, Eric Dean  
398*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_FORM_MASK               (0xF0000000)
399*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_FORM_SHIFT              (28)
400*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE    (0x00000000)
401*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_FORM_HANDLE             (0x00000001)
402*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_GNH_HANDLE_MASK         (0x0000FFFF)
403*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_GNH_HANDLE_SHIFT        (0)
404*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_H_HANDLE_MASK           (0x0000FFFF)
405*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLOS_PGAD_H_HANDLE_SHIFT          (0)
406*c1a71d1cSMoore, Eric Dean  
4071da177e4SLinus Torvalds 
4081da177e4SLinus Torvalds 
4091da177e4SLinus Torvalds /****************************************************************************
4101da177e4SLinus Torvalds *   Config Request Message
4111da177e4SLinus Torvalds ****************************************************************************/
4121da177e4SLinus Torvalds typedef struct _MSG_CONFIG
4131da177e4SLinus Torvalds {
4141da177e4SLinus Torvalds     U8                      Action;                     /* 00h */
4151da177e4SLinus Torvalds     U8                      Reserved;                   /* 01h */
4161da177e4SLinus Torvalds     U8                      ChainOffset;                /* 02h */
4171da177e4SLinus Torvalds     U8                      Function;                   /* 03h */
4181da177e4SLinus Torvalds     U16                     ExtPageLength;              /* 04h */
4191da177e4SLinus Torvalds     U8                      ExtPageType;                /* 06h */
4201da177e4SLinus Torvalds     U8                      MsgFlags;                   /* 07h */
4211da177e4SLinus Torvalds     U32                     MsgContext;                 /* 08h */
4221da177e4SLinus Torvalds     U8                      Reserved2[8];               /* 0Ch */
423*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 14h */
4241da177e4SLinus Torvalds     U32                     PageAddress;                /* 18h */
4251da177e4SLinus Torvalds     SGE_IO_UNION            PageBufferSGE;              /* 1Ch */
4261da177e4SLinus Torvalds } MSG_CONFIG, MPI_POINTER PTR_MSG_CONFIG,
4271da177e4SLinus Torvalds   Config_t, MPI_POINTER pConfig_t;
4281da177e4SLinus Torvalds 
4291da177e4SLinus Torvalds 
4301da177e4SLinus Torvalds /****************************************************************************
4311da177e4SLinus Torvalds *   Action field values
4321da177e4SLinus Torvalds ****************************************************************************/
4331da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_HEADER               (0x00)
4341da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_READ_CURRENT         (0x01)
4351da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT        (0x02)
4361da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_DEFAULT              (0x03)
4371da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM          (0x04)
4381da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_READ_DEFAULT         (0x05)
4391da177e4SLinus Torvalds #define MPI_CONFIG_ACTION_PAGE_READ_NVRAM           (0x06)
4401da177e4SLinus Torvalds 
4411da177e4SLinus Torvalds 
4421da177e4SLinus Torvalds /* Config Reply Message */
4431da177e4SLinus Torvalds typedef struct _MSG_CONFIG_REPLY
4441da177e4SLinus Torvalds {
4451da177e4SLinus Torvalds     U8                      Action;                     /* 00h */
4461da177e4SLinus Torvalds     U8                      Reserved;                   /* 01h */
4471da177e4SLinus Torvalds     U8                      MsgLength;                  /* 02h */
4481da177e4SLinus Torvalds     U8                      Function;                   /* 03h */
4491da177e4SLinus Torvalds     U16                     ExtPageLength;              /* 04h */
4501da177e4SLinus Torvalds     U8                      ExtPageType;                /* 06h */
4511da177e4SLinus Torvalds     U8                      MsgFlags;                   /* 07h */
4521da177e4SLinus Torvalds     U32                     MsgContext;                 /* 08h */
4531da177e4SLinus Torvalds     U8                      Reserved2[2];               /* 0Ch */
4541da177e4SLinus Torvalds     U16                     IOCStatus;                  /* 0Eh */
4551da177e4SLinus Torvalds     U32                     IOCLogInfo;                 /* 10h */
456*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 14h */
4571da177e4SLinus Torvalds } MSG_CONFIG_REPLY, MPI_POINTER PTR_MSG_CONFIG_REPLY,
4581da177e4SLinus Torvalds   ConfigReply_t, MPI_POINTER pConfigReply_t;
4591da177e4SLinus Torvalds 
4601da177e4SLinus Torvalds 
4611da177e4SLinus Torvalds 
4621da177e4SLinus Torvalds /*****************************************************************************
4631da177e4SLinus Torvalds *
4641da177e4SLinus Torvalds *               C o n f i g u r a t i o n    P a g e s
4651da177e4SLinus Torvalds *
4661da177e4SLinus Torvalds *****************************************************************************/
4671da177e4SLinus Torvalds 
4681da177e4SLinus Torvalds /****************************************************************************
4691da177e4SLinus Torvalds *   Manufacturing Config pages
4701da177e4SLinus Torvalds ****************************************************************************/
4711da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_VENDORID_LSILOGIC          (0x1000)
4721da177e4SLinus Torvalds /* Fibre Channel */
4731da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVICEID_FC909             (0x0621)
4741da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVICEID_FC919             (0x0624)
4751da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVICEID_FC929             (0x0622)
4761da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVICEID_FC919X            (0x0628)
4771da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVICEID_FC929X            (0x0626)
478*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVICEID_FC939X            (0x0642)
479*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVICEID_FC949X            (0x0640)
4801da177e4SLinus Torvalds /* SCSI */
4811da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_53C1030              (0x0030)
4821da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_53C1030ZC            (0x0031)
4831da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_1030_53C1035         (0x0032)
4841da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_1030ZC_53C1035       (0x0033)
4851da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_53C1035              (0x0040)
4861da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_53C1035ZC            (0x0041)
4871da177e4SLinus Torvalds /* SAS */
4881da177e4SLinus Torvalds #define MPI_MANUFACTPAGE_DEVID_SAS1064              (0x0050)
489*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1064A             (0x005C)
490*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1064E             (0x0056)
491*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1066              (0x005E)
492*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1066E             (0x005A)
493*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1068              (0x0054)
494*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1068E             (0x0058)
495*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTPAGE_DEVID_SAS1078              (0x0060)
4961da177e4SLinus Torvalds 
4971da177e4SLinus Torvalds 
4981da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_0
4991da177e4SLinus Torvalds {
500*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
5011da177e4SLinus Torvalds     U8                      ChipName[16];               /* 04h */
5021da177e4SLinus Torvalds     U8                      ChipRevision[8];            /* 14h */
5031da177e4SLinus Torvalds     U8                      BoardName[16];              /* 1Ch */
5041da177e4SLinus Torvalds     U8                      BoardAssembly[16];          /* 2Ch */
5051da177e4SLinus Torvalds     U8                      BoardTracerNumber[16];      /* 3Ch */
5061da177e4SLinus Torvalds 
507*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_0, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_0,
5081da177e4SLinus Torvalds   ManufacturingPage0_t, MPI_POINTER pManufacturingPage0_t;
5091da177e4SLinus Torvalds 
5101da177e4SLinus Torvalds #define MPI_MANUFACTURING0_PAGEVERSION                 (0x00)
5111da177e4SLinus Torvalds 
5121da177e4SLinus Torvalds 
5131da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_1
5141da177e4SLinus Torvalds {
515*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
5161da177e4SLinus Torvalds     U8                      VPD[256];                   /* 04h */
517*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_1, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_1,
5181da177e4SLinus Torvalds   ManufacturingPage1_t, MPI_POINTER pManufacturingPage1_t;
5191da177e4SLinus Torvalds 
5201da177e4SLinus Torvalds #define MPI_MANUFACTURING1_PAGEVERSION                 (0x00)
5211da177e4SLinus Torvalds 
5221da177e4SLinus Torvalds 
5231da177e4SLinus Torvalds typedef struct _MPI_CHIP_REVISION_ID
5241da177e4SLinus Torvalds {
5251da177e4SLinus Torvalds     U16 DeviceID;                                       /* 00h */
5261da177e4SLinus Torvalds     U8  PCIRevisionID;                                  /* 02h */
5271da177e4SLinus Torvalds     U8  Reserved;                                       /* 03h */
5281da177e4SLinus Torvalds } MPI_CHIP_REVISION_ID, MPI_POINTER PTR_MPI_CHIP_REVISION_ID,
5291da177e4SLinus Torvalds   MpiChipRevisionId_t, MPI_POINTER pMpiChipRevisionId_t;
5301da177e4SLinus Torvalds 
5311da177e4SLinus Torvalds 
5321da177e4SLinus Torvalds /*
5331da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
5341da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
5351da177e4SLinus Torvalds  */
5361da177e4SLinus Torvalds #ifndef MPI_MAN_PAGE_2_HW_SETTINGS_WORDS
5371da177e4SLinus Torvalds #define MPI_MAN_PAGE_2_HW_SETTINGS_WORDS    (1)
5381da177e4SLinus Torvalds #endif
5391da177e4SLinus Torvalds 
5401da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_2
5411da177e4SLinus Torvalds {
542*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                                 /* 00h */
5431da177e4SLinus Torvalds     MPI_CHIP_REVISION_ID    ChipId;                                 /* 04h */
5441da177e4SLinus Torvalds     U32                     HwSettings[MPI_MAN_PAGE_2_HW_SETTINGS_WORDS];/* 08h */
545*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_2, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_2,
5461da177e4SLinus Torvalds   ManufacturingPage2_t, MPI_POINTER pManufacturingPage2_t;
5471da177e4SLinus Torvalds 
5481da177e4SLinus Torvalds #define MPI_MANUFACTURING2_PAGEVERSION                  (0x00)
5491da177e4SLinus Torvalds 
5501da177e4SLinus Torvalds 
5511da177e4SLinus Torvalds /*
5521da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
5531da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
5541da177e4SLinus Torvalds  */
5551da177e4SLinus Torvalds #ifndef MPI_MAN_PAGE_3_INFO_WORDS
5561da177e4SLinus Torvalds #define MPI_MAN_PAGE_3_INFO_WORDS           (1)
5571da177e4SLinus Torvalds #endif
5581da177e4SLinus Torvalds 
5591da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_3
5601da177e4SLinus Torvalds {
561*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER                  Header;                     /* 00h */
5621da177e4SLinus Torvalds     MPI_CHIP_REVISION_ID                ChipId;                     /* 04h */
5631da177e4SLinus Torvalds     U32                                 Info[MPI_MAN_PAGE_3_INFO_WORDS];/* 08h */
564*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_3, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_3,
5651da177e4SLinus Torvalds   ManufacturingPage3_t, MPI_POINTER pManufacturingPage3_t;
5661da177e4SLinus Torvalds 
5671da177e4SLinus Torvalds #define MPI_MANUFACTURING3_PAGEVERSION                  (0x00)
5681da177e4SLinus Torvalds 
5691da177e4SLinus Torvalds 
5701da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_4
5711da177e4SLinus Torvalds {
572*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER              Header;             /* 00h */
5731da177e4SLinus Torvalds     U32                             Reserved1;          /* 04h */
5741da177e4SLinus Torvalds     U8                              InfoOffset0;        /* 08h */
5751da177e4SLinus Torvalds     U8                              InfoSize0;          /* 09h */
5761da177e4SLinus Torvalds     U8                              InfoOffset1;        /* 0Ah */
5771da177e4SLinus Torvalds     U8                              InfoSize1;          /* 0Bh */
5781da177e4SLinus Torvalds     U8                              InquirySize;        /* 0Ch */
5791da177e4SLinus Torvalds     U8                              Flags;              /* 0Dh */
5801da177e4SLinus Torvalds     U16                             Reserved2;          /* 0Eh */
5811da177e4SLinus Torvalds     U8                              InquiryData[56];    /* 10h */
5821da177e4SLinus Torvalds     U32                             ISVolumeSettings;   /* 48h */
5831da177e4SLinus Torvalds     U32                             IMEVolumeSettings;  /* 4Ch */
5841da177e4SLinus Torvalds     U32                             IMVolumeSettings;   /* 50h */
585*c1a71d1cSMoore, Eric Dean      U32                             Reserved3;          /* 54h */
586*c1a71d1cSMoore, Eric Dean      U32                             Reserved4;          /* 58h */
587*c1a71d1cSMoore, Eric Dean      U8                              ISDataScrubRate;    /* 5Ch */
588*c1a71d1cSMoore, Eric Dean      U8                              ISResyncRate;       /* 5Dh */
589*c1a71d1cSMoore, Eric Dean      U16                             Reserved5;          /* 5Eh */
590*c1a71d1cSMoore, Eric Dean      U8                              IMEDataScrubRate;   /* 60h */
591*c1a71d1cSMoore, Eric Dean      U8                              IMEResyncRate;      /* 61h */
592*c1a71d1cSMoore, Eric Dean      U16                             Reserved6;          /* 62h */
593*c1a71d1cSMoore, Eric Dean      U8                              IMDataScrubRate;    /* 64h */
594*c1a71d1cSMoore, Eric Dean      U8                              IMResyncRate;       /* 65h */
595*c1a71d1cSMoore, Eric Dean      U16                             Reserved7;          /* 66h */
596*c1a71d1cSMoore, Eric Dean      U32                             Reserved8;          /* 68h */
597*c1a71d1cSMoore, Eric Dean      U32                             Reserved9;          /* 6Ch */
598*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4,
5991da177e4SLinus Torvalds   ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t;
6001da177e4SLinus Torvalds 
601*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTURING4_PAGEVERSION                  (0x02)
6021da177e4SLinus Torvalds 
6031da177e4SLinus Torvalds /* defines for the Flags field */
6041da177e4SLinus Torvalds #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA                 (0x01)
6051da177e4SLinus Torvalds 
6061da177e4SLinus Torvalds 
6071da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_5
6081da177e4SLinus Torvalds {
609*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER              Header;             /* 00h */
6101da177e4SLinus Torvalds     U64                             BaseWWID;           /* 04h */
611*c1a71d1cSMoore, Eric Dean      U8                              Flags;              /* 0Ch */
612*c1a71d1cSMoore, Eric Dean      U8                              Reserved1;          /* 0Dh */
613*c1a71d1cSMoore, Eric Dean      U16                             Reserved2;          /* 0Eh */
614*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_5, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_5,
6151da177e4SLinus Torvalds   ManufacturingPage5_t, MPI_POINTER pManufacturingPage5_t;
6161da177e4SLinus Torvalds 
617*c1a71d1cSMoore, Eric Dean  #define MPI_MANUFACTURING5_PAGEVERSION                  (0x01)
618*c1a71d1cSMoore, Eric Dean  
619*c1a71d1cSMoore, Eric Dean  /* defines for the Flags field */
620*c1a71d1cSMoore, Eric Dean  #define MPI_MANPAGE5_TWO_WWID_PER_PHY                   (0x01)
6211da177e4SLinus Torvalds 
6221da177e4SLinus Torvalds 
6231da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_MANUFACTURING_6
6241da177e4SLinus Torvalds {
625*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER              Header;             /* 00h */
6261da177e4SLinus Torvalds     U32                             ProductSpecificInfo;/* 04h */
627*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_MANUFACTURING_6, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_6,
6281da177e4SLinus Torvalds   ManufacturingPage6_t, MPI_POINTER pManufacturingPage6_t;
6291da177e4SLinus Torvalds 
6301da177e4SLinus Torvalds #define MPI_MANUFACTURING6_PAGEVERSION                  (0x00)
6311da177e4SLinus Torvalds 
6321da177e4SLinus Torvalds 
6331da177e4SLinus Torvalds /****************************************************************************
6341da177e4SLinus Torvalds *   IO Unit Config Pages
6351da177e4SLinus Torvalds ****************************************************************************/
6361da177e4SLinus Torvalds 
6371da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IO_UNIT_0
6381da177e4SLinus Torvalds {
639*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
6401da177e4SLinus Torvalds     U64                     UniqueValue;                /* 04h */
641*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_0,
6421da177e4SLinus Torvalds   IOUnitPage0_t, MPI_POINTER pIOUnitPage0_t;
6431da177e4SLinus Torvalds 
6441da177e4SLinus Torvalds #define MPI_IOUNITPAGE0_PAGEVERSION                     (0x00)
6451da177e4SLinus Torvalds 
6461da177e4SLinus Torvalds 
6471da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IO_UNIT_1
6481da177e4SLinus Torvalds {
649*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
6501da177e4SLinus Torvalds     U32                     Flags;                      /* 04h */
651*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_1,
6521da177e4SLinus Torvalds   IOUnitPage1_t, MPI_POINTER pIOUnitPage1_t;
6531da177e4SLinus Torvalds 
6541da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_PAGEVERSION                     (0x01)
6551da177e4SLinus Torvalds 
6561da177e4SLinus Torvalds /* IO Unit Page 1 Flags defines */
6571da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_MULTI_FUNCTION                  (0x00000000)
6581da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_SINGLE_FUNCTION                 (0x00000001)
6591da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_MULTI_PATHING                   (0x00000002)
6601da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_SINGLE_PATHING                  (0x00000000)
6611da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID         (0x00000004)
6621da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_DISABLE_QUEUE_FULL_HANDLING     (0x00000020)
6631da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_DISABLE_IR                      (0x00000040)
6641da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_FORCE_32                        (0x00000080)
6651da177e4SLinus Torvalds #define MPI_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE        (0x00000100)
6661da177e4SLinus Torvalds 
6671da177e4SLinus Torvalds 
6681da177e4SLinus Torvalds typedef struct _MPI_ADAPTER_INFO
6691da177e4SLinus Torvalds {
6701da177e4SLinus Torvalds     U8      PciBusNumber;                               /* 00h */
6711da177e4SLinus Torvalds     U8      PciDeviceAndFunctionNumber;                 /* 01h */
6721da177e4SLinus Torvalds     U16     AdapterFlags;                               /* 02h */
6731da177e4SLinus Torvalds } MPI_ADAPTER_INFO, MPI_POINTER PTR_MPI_ADAPTER_INFO,
6741da177e4SLinus Torvalds   MpiAdapterInfo_t, MPI_POINTER pMpiAdapterInfo_t;
6751da177e4SLinus Torvalds 
6761da177e4SLinus Torvalds #define MPI_ADAPTER_INFO_FLAGS_EMBEDDED                 (0x0001)
6771da177e4SLinus Torvalds #define MPI_ADAPTER_INFO_FLAGS_INIT_STATUS              (0x0002)
6781da177e4SLinus Torvalds 
6791da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IO_UNIT_2
6801da177e4SLinus Torvalds {
681*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
6821da177e4SLinus Torvalds     U32                     Flags;                      /* 04h */
6831da177e4SLinus Torvalds     U32                     BiosVersion;                /* 08h */
6841da177e4SLinus Torvalds     MPI_ADAPTER_INFO        AdapterOrder[4];            /* 0Ch */
685*c1a71d1cSMoore, Eric Dean      U32                     Reserved1;                  /* 1Ch */
686*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_2,
6871da177e4SLinus Torvalds   IOUnitPage2_t, MPI_POINTER pIOUnitPage2_t;
6881da177e4SLinus Torvalds 
689*c1a71d1cSMoore, Eric Dean  #define MPI_IOUNITPAGE2_PAGEVERSION                     (0x02)
6901da177e4SLinus Torvalds 
6911da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_PAUSE_ON_ERROR            (0x00000002)
6921da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_VERBOSE_ENABLE            (0x00000004)
6931da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_COLOR_VIDEO_DISABLE       (0x00000008)
6941da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_DONT_HOOK_INT_40          (0x00000010)
6951da177e4SLinus Torvalds 
6961da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_DEV_LIST_DISPLAY_MASK     (0x000000E0)
6971da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_INSTALLED_DEV_DISPLAY     (0x00000000)
6981da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DISPLAY           (0x00000020)
6991da177e4SLinus Torvalds #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DEV_DISPLAY       (0x00000040)
7001da177e4SLinus Torvalds 
7011da177e4SLinus Torvalds 
7021da177e4SLinus Torvalds /*
7031da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
7041da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
7051da177e4SLinus Torvalds  */
7061da177e4SLinus Torvalds #ifndef MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX
7071da177e4SLinus Torvalds #define MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX     (1)
7081da177e4SLinus Torvalds #endif
7091da177e4SLinus Torvalds 
7101da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IO_UNIT_3
7111da177e4SLinus Torvalds {
712*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                                   /* 00h */
7131da177e4SLinus Torvalds     U8                      GPIOCount;                                /* 04h */
7141da177e4SLinus Torvalds     U8                      Reserved1;                                /* 05h */
7151da177e4SLinus Torvalds     U16                     Reserved2;                                /* 06h */
7161da177e4SLinus Torvalds     U16                     GPIOVal[MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX]; /* 08h */
717*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IO_UNIT_3, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_3,
7181da177e4SLinus Torvalds   IOUnitPage3_t, MPI_POINTER pIOUnitPage3_t;
7191da177e4SLinus Torvalds 
7201da177e4SLinus Torvalds #define MPI_IOUNITPAGE3_PAGEVERSION                     (0x01)
7211da177e4SLinus Torvalds 
7221da177e4SLinus Torvalds #define MPI_IOUNITPAGE3_GPIO_FUNCTION_MASK              (0xFC)
7231da177e4SLinus Torvalds #define MPI_IOUNITPAGE3_GPIO_FUNCTION_SHIFT             (2)
7241da177e4SLinus Torvalds #define MPI_IOUNITPAGE3_GPIO_SETTING_OFF                (0x00)
7251da177e4SLinus Torvalds #define MPI_IOUNITPAGE3_GPIO_SETTING_ON                 (0x01)
7261da177e4SLinus Torvalds 
7271da177e4SLinus Torvalds 
728*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_IO_UNIT_4
729*c1a71d1cSMoore, Eric Dean  {
730*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                                   /* 00h */
731*c1a71d1cSMoore, Eric Dean      U32                     Reserved1;                                /* 04h */
732*c1a71d1cSMoore, Eric Dean      SGE_SIMPLE_UNION        FWImageSGE;                               /* 08h */
733*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IO_UNIT_4, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_4,
734*c1a71d1cSMoore, Eric Dean    IOUnitPage4_t, MPI_POINTER pIOUnitPage4_t;
735*c1a71d1cSMoore, Eric Dean  
736*c1a71d1cSMoore, Eric Dean  #define MPI_IOUNITPAGE4_PAGEVERSION                     (0x00)
737*c1a71d1cSMoore, Eric Dean  
738*c1a71d1cSMoore, Eric Dean  
7391da177e4SLinus Torvalds /****************************************************************************
7401da177e4SLinus Torvalds *   IOC Config Pages
7411da177e4SLinus Torvalds ****************************************************************************/
7421da177e4SLinus Torvalds 
7431da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_0
7441da177e4SLinus Torvalds {
745*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
7461da177e4SLinus Torvalds     U32                     TotalNVStore;               /* 04h */
7471da177e4SLinus Torvalds     U32                     FreeNVStore;                /* 08h */
7481da177e4SLinus Torvalds     U16                     VendorID;                   /* 0Ch */
7491da177e4SLinus Torvalds     U16                     DeviceID;                   /* 0Eh */
7501da177e4SLinus Torvalds     U8                      RevisionID;                 /* 10h */
7511da177e4SLinus Torvalds     U8                      Reserved[3];                /* 11h */
7521da177e4SLinus Torvalds     U32                     ClassCode;                  /* 14h */
7531da177e4SLinus Torvalds     U16                     SubsystemVendorID;          /* 18h */
7541da177e4SLinus Torvalds     U16                     SubsystemID;                /* 1Ah */
755*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_0, MPI_POINTER PTR_CONFIG_PAGE_IOC_0,
7561da177e4SLinus Torvalds   IOCPage0_t, MPI_POINTER pIOCPage0_t;
7571da177e4SLinus Torvalds 
7581da177e4SLinus Torvalds #define MPI_IOCPAGE0_PAGEVERSION                        (0x01)
7591da177e4SLinus Torvalds 
7601da177e4SLinus Torvalds 
7611da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_1
7621da177e4SLinus Torvalds {
763*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
7641da177e4SLinus Torvalds     U32                     Flags;                      /* 04h */
7651da177e4SLinus Torvalds     U32                     CoalescingTimeout;          /* 08h */
7661da177e4SLinus Torvalds     U8                      CoalescingDepth;            /* 0Ch */
7671da177e4SLinus Torvalds     U8                      PCISlotNum;                 /* 0Dh */
7681da177e4SLinus Torvalds     U8                      Reserved[2];                /* 0Eh */
769*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_1, MPI_POINTER PTR_CONFIG_PAGE_IOC_1,
7701da177e4SLinus Torvalds   IOCPage1_t, MPI_POINTER pIOCPage1_t;
7711da177e4SLinus Torvalds 
772*c1a71d1cSMoore, Eric Dean  #define MPI_IOCPAGE1_PAGEVERSION                        (0x02)
7731da177e4SLinus Torvalds 
7741da177e4SLinus Torvalds /* defines for the Flags field */
775*c1a71d1cSMoore, Eric Dean  #define MPI_IOCPAGE1_INITIATOR_CONTEXT_REPLY_DISABLE    (0x00000010)
7761da177e4SLinus Torvalds #define MPI_IOCPAGE1_REPLY_COALESCING                   (0x00000001)
7771da177e4SLinus Torvalds 
7781da177e4SLinus Torvalds #define MPI_IOCPAGE1_PCISLOTNUM_UNKNOWN                 (0xFF)
7791da177e4SLinus Torvalds 
7801da177e4SLinus Torvalds 
7811da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_2_RAID_VOL
7821da177e4SLinus Torvalds {
7831da177e4SLinus Torvalds     U8                          VolumeID;               /* 00h */
7841da177e4SLinus Torvalds     U8                          VolumeBus;              /* 01h */
7851da177e4SLinus Torvalds     U8                          VolumeIOC;              /* 02h */
7861da177e4SLinus Torvalds     U8                          VolumePageNumber;       /* 03h */
7871da177e4SLinus Torvalds     U8                          VolumeType;             /* 04h */
7881da177e4SLinus Torvalds     U8                          Flags;                  /* 05h */
7891da177e4SLinus Torvalds     U16                         Reserved3;              /* 06h */
790*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_2_RAID_VOL, MPI_POINTER PTR_CONFIG_PAGE_IOC_2_RAID_VOL,
7911da177e4SLinus Torvalds   ConfigPageIoc2RaidVol_t, MPI_POINTER pConfigPageIoc2RaidVol_t;
7921da177e4SLinus Torvalds 
7931da177e4SLinus Torvalds /* IOC Page 2 Volume RAID Type values, also used in RAID Volume pages */
7941da177e4SLinus Torvalds 
7951da177e4SLinus Torvalds #define MPI_RAID_VOL_TYPE_IS                        (0x00)
7961da177e4SLinus Torvalds #define MPI_RAID_VOL_TYPE_IME                       (0x01)
7971da177e4SLinus Torvalds #define MPI_RAID_VOL_TYPE_IM                        (0x02)
7981da177e4SLinus Torvalds 
7991da177e4SLinus Torvalds /* IOC Page 2 Volume Flags values */
8001da177e4SLinus Torvalds 
8011da177e4SLinus Torvalds #define MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE           (0x08)
8021da177e4SLinus Torvalds 
8031da177e4SLinus Torvalds /*
8041da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
8051da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
8061da177e4SLinus Torvalds  */
8071da177e4SLinus Torvalds #ifndef MPI_IOC_PAGE_2_RAID_VOLUME_MAX
8081da177e4SLinus Torvalds #define MPI_IOC_PAGE_2_RAID_VOLUME_MAX      (1)
8091da177e4SLinus Torvalds #endif
8101da177e4SLinus Torvalds 
8111da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_2
8121da177e4SLinus Torvalds {
813*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER          Header;                              /* 00h */
8141da177e4SLinus Torvalds     U32                         CapabilitiesFlags;                   /* 04h */
8151da177e4SLinus Torvalds     U8                          NumActiveVolumes;                    /* 08h */
8161da177e4SLinus Torvalds     U8                          MaxVolumes;                          /* 09h */
8171da177e4SLinus Torvalds     U8                          NumActivePhysDisks;                  /* 0Ah */
8181da177e4SLinus Torvalds     U8                          MaxPhysDisks;                        /* 0Bh */
819*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_IOC_2_RAID_VOL  RaidVolume[MPI_IOC_PAGE_2_RAID_VOLUME_MAX];/* 0Ch */
820*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_2, MPI_POINTER PTR_CONFIG_PAGE_IOC_2,
8211da177e4SLinus Torvalds   IOCPage2_t, MPI_POINTER pIOCPage2_t;
8221da177e4SLinus Torvalds 
8231da177e4SLinus Torvalds #define MPI_IOCPAGE2_PAGEVERSION                        (0x02)
8241da177e4SLinus Torvalds 
8251da177e4SLinus Torvalds /* IOC Page 2 Capabilities flags */
8261da177e4SLinus Torvalds 
8271da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_IS_SUPPORT               (0x00000001)
8281da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_IME_SUPPORT              (0x00000002)
8291da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_IM_SUPPORT               (0x00000004)
8301da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_SES_SUPPORT              (0x20000000)
8311da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_SAFTE_SUPPORT            (0x40000000)
8321da177e4SLinus Torvalds #define MPI_IOCPAGE2_CAP_FLAGS_CROSS_CHANNEL_SUPPORT    (0x80000000)
8331da177e4SLinus Torvalds 
8341da177e4SLinus Torvalds 
8351da177e4SLinus Torvalds typedef struct _IOC_3_PHYS_DISK
8361da177e4SLinus Torvalds {
8371da177e4SLinus Torvalds     U8                          PhysDiskID;             /* 00h */
8381da177e4SLinus Torvalds     U8                          PhysDiskBus;            /* 01h */
8391da177e4SLinus Torvalds     U8                          PhysDiskIOC;            /* 02h */
8401da177e4SLinus Torvalds     U8                          PhysDiskNum;            /* 03h */
8411da177e4SLinus Torvalds } IOC_3_PHYS_DISK, MPI_POINTER PTR_IOC_3_PHYS_DISK,
8421da177e4SLinus Torvalds   Ioc3PhysDisk_t, MPI_POINTER pIoc3PhysDisk_t;
8431da177e4SLinus Torvalds 
8441da177e4SLinus Torvalds /*
8451da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
8461da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
8471da177e4SLinus Torvalds  */
8481da177e4SLinus Torvalds #ifndef MPI_IOC_PAGE_3_PHYSDISK_MAX
8491da177e4SLinus Torvalds #define MPI_IOC_PAGE_3_PHYSDISK_MAX         (1)
8501da177e4SLinus Torvalds #endif
8511da177e4SLinus Torvalds 
8521da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_3
8531da177e4SLinus Torvalds {
854*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER          Header;                                /* 00h */
8551da177e4SLinus Torvalds     U8                          NumPhysDisks;                          /* 04h */
8561da177e4SLinus Torvalds     U8                          Reserved1;                             /* 05h */
8571da177e4SLinus Torvalds     U16                         Reserved2;                             /* 06h */
8581da177e4SLinus Torvalds     IOC_3_PHYS_DISK             PhysDisk[MPI_IOC_PAGE_3_PHYSDISK_MAX]; /* 08h */
859*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_3, MPI_POINTER PTR_CONFIG_PAGE_IOC_3,
8601da177e4SLinus Torvalds   IOCPage3_t, MPI_POINTER pIOCPage3_t;
8611da177e4SLinus Torvalds 
8621da177e4SLinus Torvalds #define MPI_IOCPAGE3_PAGEVERSION                        (0x00)
8631da177e4SLinus Torvalds 
8641da177e4SLinus Torvalds 
8651da177e4SLinus Torvalds typedef struct _IOC_4_SEP
8661da177e4SLinus Torvalds {
8671da177e4SLinus Torvalds     U8                          SEPTargetID;            /* 00h */
8681da177e4SLinus Torvalds     U8                          SEPBus;                 /* 01h */
8691da177e4SLinus Torvalds     U16                         Reserved;               /* 02h */
8701da177e4SLinus Torvalds } IOC_4_SEP, MPI_POINTER PTR_IOC_4_SEP,
8711da177e4SLinus Torvalds   Ioc4Sep_t, MPI_POINTER pIoc4Sep_t;
8721da177e4SLinus Torvalds 
8731da177e4SLinus Torvalds /*
8741da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
8751da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
8761da177e4SLinus Torvalds  */
8771da177e4SLinus Torvalds #ifndef MPI_IOC_PAGE_4_SEP_MAX
8781da177e4SLinus Torvalds #define MPI_IOC_PAGE_4_SEP_MAX              (1)
8791da177e4SLinus Torvalds #endif
8801da177e4SLinus Torvalds 
8811da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_4
8821da177e4SLinus Torvalds {
883*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER          Header;                         /* 00h */
8841da177e4SLinus Torvalds     U8                          ActiveSEP;                      /* 04h */
8851da177e4SLinus Torvalds     U8                          MaxSEP;                         /* 05h */
8861da177e4SLinus Torvalds     U16                         Reserved1;                      /* 06h */
8871da177e4SLinus Torvalds     IOC_4_SEP                   SEP[MPI_IOC_PAGE_4_SEP_MAX];    /* 08h */
888*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_4, MPI_POINTER PTR_CONFIG_PAGE_IOC_4,
8891da177e4SLinus Torvalds   IOCPage4_t, MPI_POINTER pIOCPage4_t;
8901da177e4SLinus Torvalds 
8911da177e4SLinus Torvalds #define MPI_IOCPAGE4_PAGEVERSION                        (0x00)
8921da177e4SLinus Torvalds 
8931da177e4SLinus Torvalds 
8941da177e4SLinus Torvalds typedef struct _IOC_5_HOT_SPARE
8951da177e4SLinus Torvalds {
8961da177e4SLinus Torvalds     U8                          PhysDiskNum;            /* 00h */
8971da177e4SLinus Torvalds     U8                          Reserved;               /* 01h */
8981da177e4SLinus Torvalds     U8                          HotSparePool;           /* 02h */
8991da177e4SLinus Torvalds     U8                          Flags;                   /* 03h */
9001da177e4SLinus Torvalds } IOC_5_HOT_SPARE, MPI_POINTER PTR_IOC_5_HOT_SPARE,
9011da177e4SLinus Torvalds   Ioc5HotSpare_t, MPI_POINTER pIoc5HotSpare_t;
9021da177e4SLinus Torvalds 
9031da177e4SLinus Torvalds /* IOC Page 5 HotSpare Flags */
9041da177e4SLinus Torvalds #define MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE                 (0x01)
9051da177e4SLinus Torvalds 
9061da177e4SLinus Torvalds /*
9071da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
9081da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
9091da177e4SLinus Torvalds  */
9101da177e4SLinus Torvalds #ifndef MPI_IOC_PAGE_5_HOT_SPARE_MAX
9111da177e4SLinus Torvalds #define MPI_IOC_PAGE_5_HOT_SPARE_MAX        (1)
9121da177e4SLinus Torvalds #endif
9131da177e4SLinus Torvalds 
9141da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_IOC_5
9151da177e4SLinus Torvalds {
916*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER          Header;                         /* 00h */
9171da177e4SLinus Torvalds     U32                         Reserved1;                      /* 04h */
9181da177e4SLinus Torvalds     U8                          NumHotSpares;                   /* 08h */
9191da177e4SLinus Torvalds     U8                          Reserved2;                      /* 09h */
9201da177e4SLinus Torvalds     U16                         Reserved3;                      /* 0Ah */
9211da177e4SLinus Torvalds     IOC_5_HOT_SPARE             HotSpare[MPI_IOC_PAGE_5_HOT_SPARE_MAX]; /* 0Ch */
922*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_IOC_5, MPI_POINTER PTR_CONFIG_PAGE_IOC_5,
9231da177e4SLinus Torvalds   IOCPage5_t, MPI_POINTER pIOCPage5_t;
9241da177e4SLinus Torvalds 
9251da177e4SLinus Torvalds #define MPI_IOCPAGE5_PAGEVERSION                        (0x00)
9261da177e4SLinus Torvalds 
9271da177e4SLinus Torvalds 
9281da177e4SLinus Torvalds /****************************************************************************
929*c1a71d1cSMoore, Eric Dean  *   BIOS Config Pages
9301da177e4SLinus Torvalds ****************************************************************************/
9311da177e4SLinus Torvalds 
9321da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_BIOS_1
9331da177e4SLinus Torvalds {
934*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
9351da177e4SLinus Torvalds     U32                     BiosOptions;                /* 04h */
9361da177e4SLinus Torvalds     U32                     IOCSettings;                /* 08h */
9371da177e4SLinus Torvalds     U32                     Reserved1;                  /* 0Ch */
9381da177e4SLinus Torvalds     U32                     DeviceSettings;             /* 10h */
9391da177e4SLinus Torvalds     U16                     NumberOfDevices;            /* 14h */
9401da177e4SLinus Torvalds     U16                     Reserved2;                  /* 16h */
9411da177e4SLinus Torvalds     U16                     IOTimeoutBlockDevicesNonRM; /* 18h */
9421da177e4SLinus Torvalds     U16                     IOTimeoutSequential;        /* 1Ah */
9431da177e4SLinus Torvalds     U16                     IOTimeoutOther;             /* 1Ch */
9441da177e4SLinus Torvalds     U16                     IOTimeoutBlockDevicesRM;    /* 1Eh */
945*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_BIOS_1, MPI_POINTER PTR_CONFIG_PAGE_BIOS_1,
9461da177e4SLinus Torvalds   BIOSPage1_t, MPI_POINTER pBIOSPage1_t;
9471da177e4SLinus Torvalds 
948*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_PAGEVERSION                       (0x01)
9491da177e4SLinus Torvalds 
9501da177e4SLinus Torvalds /* values for the BiosOptions field */
9511da177e4SLinus Torvalds #define MPI_BIOSPAGE1_OPTIONS_SPI_ENABLE                (0x00000400)
9521da177e4SLinus Torvalds #define MPI_BIOSPAGE1_OPTIONS_FC_ENABLE                 (0x00000200)
9531da177e4SLinus Torvalds #define MPI_BIOSPAGE1_OPTIONS_SAS_ENABLE                (0x00000100)
9541da177e4SLinus Torvalds #define MPI_BIOSPAGE1_OPTIONS_DISABLE_BIOS              (0x00000001)
9551da177e4SLinus Torvalds 
9561da177e4SLinus Torvalds /* values for the IOCSettings field */
957*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_IOCSET_MASK_BOOT_PREFERENCE       (0x00030000)
958*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_IOCSET_ENCLOSURE_SLOT_BOOT        (0x00000000)
959*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_IOCSET_SAS_ADDRESS_BOOT           (0x00010000)
960*c1a71d1cSMoore, Eric Dean  
961*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_IOCSET_MASK_MAX_TARGET_SPIN_UP    (0x0000F000)
962*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE1_IOCSET_SHIFT_MAX_TARGET_SPIN_UP   (12)
963*c1a71d1cSMoore, Eric Dean  
9641da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_MASK_SPINUP_DELAY          (0x00000F00)
9651da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_SHIFT_SPINUP_DELAY         (8)
9661da177e4SLinus Torvalds 
9671da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_MASK_RM_SETTING            (0x000000C0)
9681da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_NONE_RM_SETTING            (0x00000000)
9691da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_BOOT_RM_SETTING            (0x00000040)
9701da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_MEDIA_RM_SETTING           (0x00000080)
9711da177e4SLinus Torvalds 
9721da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_MASK_ADAPTER_SUPPORT       (0x00000030)
9731da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_NO_SUPPORT                 (0x00000000)
9741da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_BIOS_SUPPORT               (0x00000010)
9751da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_OS_SUPPORT                 (0x00000020)
9761da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_ALL_SUPPORT                (0x00000030)
9771da177e4SLinus Torvalds 
9781da177e4SLinus Torvalds #define MPI_BIOSPAGE1_IOCSET_ALTERNATE_CHS              (0x00000008)
9791da177e4SLinus Torvalds 
9801da177e4SLinus Torvalds /* values for the DeviceSettings field */
9811da177e4SLinus Torvalds #define MPI_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN            (0x00000008)
9821da177e4SLinus Torvalds #define MPI_BIOSPAGE1_DEVSET_DISABLE_RM_LUN             (0x00000004)
9831da177e4SLinus Torvalds #define MPI_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN         (0x00000002)
9841da177e4SLinus Torvalds #define MPI_BIOSPAGE1_DEVSET_DISABLE_OTHER_LUN          (0x00000001)
9851da177e4SLinus Torvalds 
986*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_ADAPTER_ORDER
987*c1a71d1cSMoore, Eric Dean  {
988*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                              /* 00h */
989*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 04h */
990*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 08h */
991*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 0Ch */
992*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 10h */
993*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 14h */
994*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 18h */
995*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 1Ch */
996*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 20h */
997*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 24h */
998*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 28h */
999*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 2Ch */
1000*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 30h */
1001*c1a71d1cSMoore, Eric Dean      U32         Reserved14;                             /* 34h */
1002*c1a71d1cSMoore, Eric Dean      U32         Reserved15;                             /* 38h */
1003*c1a71d1cSMoore, Eric Dean      U32         Reserved16;                             /* 3Ch */
1004*c1a71d1cSMoore, Eric Dean      U32         Reserved17;                             /* 40h */
1005*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_ADAPTER_ORDER, MPI_POINTER PTR_MPI_BOOT_DEVICE_ADAPTER_ORDER;
1006*c1a71d1cSMoore, Eric Dean  
1007*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_ADAPTER_NUMBER
1008*c1a71d1cSMoore, Eric Dean  {
1009*c1a71d1cSMoore, Eric Dean      U8          TargetID;                               /* 00h */
1010*c1a71d1cSMoore, Eric Dean      U8          Bus;                                    /* 01h */
1011*c1a71d1cSMoore, Eric Dean      U8          AdapterNumber;                          /* 02h */
1012*c1a71d1cSMoore, Eric Dean      U8          Reserved1;                              /* 03h */
1013*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 04h */
1014*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 08h */
1015*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 0Ch */
1016*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1017*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 18h */
1018*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 1Ch */
1019*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 20h */
1020*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 24h */
1021*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 28h */
1022*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 2Ch */
1023*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 30h */
1024*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 34h */
1025*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 38h */
1026*c1a71d1cSMoore, Eric Dean      U32         Reserved14;                             /* 3Ch */
1027*c1a71d1cSMoore, Eric Dean      U32         Reserved15;                             /* 40h */
1028*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_ADAPTER_NUMBER, MPI_POINTER PTR_MPI_BOOT_DEVICE_ADAPTER_NUMBER;
1029*c1a71d1cSMoore, Eric Dean  
1030*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_PCI_ADDRESS
1031*c1a71d1cSMoore, Eric Dean  {
1032*c1a71d1cSMoore, Eric Dean      U8          TargetID;                               /* 00h */
1033*c1a71d1cSMoore, Eric Dean      U8          Bus;                                    /* 01h */
1034*c1a71d1cSMoore, Eric Dean      U16         PCIAddress;                             /* 02h */
1035*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                              /* 04h */
1036*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 08h */
1037*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 0Ch */
1038*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1039*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 18h */
1040*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 1Ch */
1041*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 20h */
1042*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 24h */
1043*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 28h */
1044*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 2Ch */
1045*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 30h */
1046*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 34h */
1047*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 38h */
1048*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 3Ch */
1049*c1a71d1cSMoore, Eric Dean      U32         Reserved14;                             /* 40h */
1050*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_PCI_ADDRESS, MPI_POINTER PTR_MPI_BOOT_DEVICE_PCI_ADDRESS;
1051*c1a71d1cSMoore, Eric Dean  
1052*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_SLOT_NUMBER
1053*c1a71d1cSMoore, Eric Dean  {
1054*c1a71d1cSMoore, Eric Dean      U8          TargetID;                               /* 00h */
1055*c1a71d1cSMoore, Eric Dean      U8          Bus;                                    /* 01h */
1056*c1a71d1cSMoore, Eric Dean      U8          PCISlotNumber;                          /* 02h */
1057*c1a71d1cSMoore, Eric Dean      U8          Reserved1;                              /* 03h */
1058*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 04h */
1059*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 08h */
1060*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 0Ch */
1061*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1062*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 18h */
1063*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 1Ch */
1064*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 20h */
1065*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 24h */
1066*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 28h */
1067*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 2Ch */
1068*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 30h */
1069*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 34h */
1070*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 38h */
1071*c1a71d1cSMoore, Eric Dean      U32         Reserved14;                             /* 3Ch */
1072*c1a71d1cSMoore, Eric Dean      U32         Reserved15;                             /* 40h */
1073*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_PCI_SLOT_NUMBER, MPI_POINTER PTR_MPI_BOOT_DEVICE_PCI_SLOT_NUMBER;
1074*c1a71d1cSMoore, Eric Dean  
1075*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_FC_WWN
1076*c1a71d1cSMoore, Eric Dean  {
1077*c1a71d1cSMoore, Eric Dean      U64         WWPN;                                   /* 00h */
1078*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                              /* 08h */
1079*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 0Ch */
1080*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1081*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 18h */
1082*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 1Ch */
1083*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 20h */
1084*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 24h */
1085*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 28h */
1086*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 2Ch */
1087*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 30h */
1088*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 34h */
1089*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 38h */
1090*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 3Ch */
1091*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 40h */
1092*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_FC_WWN, MPI_POINTER PTR_MPI_BOOT_DEVICE_FC_WWN;
1093*c1a71d1cSMoore, Eric Dean  
1094*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_SAS_WWN
1095*c1a71d1cSMoore, Eric Dean  {
1096*c1a71d1cSMoore, Eric Dean      U64         SASAddress;                             /* 00h */
1097*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                              /* 08h */
1098*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 0Ch */
1099*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1100*c1a71d1cSMoore, Eric Dean      U32         Reserved3;                              /* 18h */
1101*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 1Ch */
1102*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 20h */
1103*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 24h */
1104*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 28h */
1105*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 2Ch */
1106*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 30h */
1107*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 34h */
1108*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 38h */
1109*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 3Ch */
1110*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 40h */
1111*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_SAS_WWN, MPI_POINTER PTR_MPI_BOOT_DEVICE_SAS_WWN;
1112*c1a71d1cSMoore, Eric Dean  
1113*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_BOOT_DEVICE_ENCLOSURE_SLOT
1114*c1a71d1cSMoore, Eric Dean  {
1115*c1a71d1cSMoore, Eric Dean      U64         EnclosureLogicalID;                     /* 00h */
1116*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                              /* 08h */
1117*c1a71d1cSMoore, Eric Dean      U32         Reserved2;                              /* 0Ch */
1118*c1a71d1cSMoore, Eric Dean      U8          LUN[8];                                 /* 10h */
1119*c1a71d1cSMoore, Eric Dean      U16         SlotNumber;                             /* 18h */
1120*c1a71d1cSMoore, Eric Dean      U16         Reserved3;                              /* 1Ah */
1121*c1a71d1cSMoore, Eric Dean      U32         Reserved4;                              /* 1Ch */
1122*c1a71d1cSMoore, Eric Dean      U32         Reserved5;                              /* 20h */
1123*c1a71d1cSMoore, Eric Dean      U32         Reserved6;                              /* 24h */
1124*c1a71d1cSMoore, Eric Dean      U32         Reserved7;                              /* 28h */
1125*c1a71d1cSMoore, Eric Dean      U32         Reserved8;                              /* 2Ch */
1126*c1a71d1cSMoore, Eric Dean      U32         Reserved9;                              /* 30h */
1127*c1a71d1cSMoore, Eric Dean      U32         Reserved10;                             /* 34h */
1128*c1a71d1cSMoore, Eric Dean      U32         Reserved11;                             /* 38h */
1129*c1a71d1cSMoore, Eric Dean      U32         Reserved12;                             /* 3Ch */
1130*c1a71d1cSMoore, Eric Dean      U32         Reserved13;                             /* 40h */
1131*c1a71d1cSMoore, Eric Dean  } MPI_BOOT_DEVICE_ENCLOSURE_SLOT,
1132*c1a71d1cSMoore, Eric Dean    MPI_POINTER PTR_MPI_BOOT_DEVICE_ENCLOSURE_SLOT;
1133*c1a71d1cSMoore, Eric Dean  
1134*c1a71d1cSMoore, Eric Dean  typedef union _MPI_BIOSPAGE2_BOOT_DEVICE
1135*c1a71d1cSMoore, Eric Dean  {
1136*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_ADAPTER_ORDER   AdapterOrder;
1137*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_ADAPTER_NUMBER  AdapterNumber;
1138*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_PCI_ADDRESS     PCIAddress;
1139*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_PCI_SLOT_NUMBER PCISlotNumber;
1140*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_FC_WWN          FcWwn;
1141*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_SAS_WWN         SasWwn;
1142*c1a71d1cSMoore, Eric Dean      MPI_BOOT_DEVICE_ENCLOSURE_SLOT  EnclosureSlot;
1143*c1a71d1cSMoore, Eric Dean  } MPI_BIOSPAGE2_BOOT_DEVICE, MPI_POINTER PTR_MPI_BIOSPAGE2_BOOT_DEVICE;
1144*c1a71d1cSMoore, Eric Dean  
1145*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_BIOS_2
1146*c1a71d1cSMoore, Eric Dean  {
1147*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER          Header;                 /* 00h */
1148*c1a71d1cSMoore, Eric Dean      U32                         Reserved1;              /* 04h */
1149*c1a71d1cSMoore, Eric Dean      U32                         Reserved2;              /* 08h */
1150*c1a71d1cSMoore, Eric Dean      U32                         Reserved3;              /* 0Ch */
1151*c1a71d1cSMoore, Eric Dean      U32                         Reserved4;              /* 10h */
1152*c1a71d1cSMoore, Eric Dean      U32                         Reserved5;              /* 14h */
1153*c1a71d1cSMoore, Eric Dean      U32                         Reserved6;              /* 18h */
1154*c1a71d1cSMoore, Eric Dean      U8                          BootDeviceForm;         /* 1Ch */
1155*c1a71d1cSMoore, Eric Dean      U8                          Reserved7;              /* 1Dh */
1156*c1a71d1cSMoore, Eric Dean      U16                         Reserved8;              /* 1Eh */
1157*c1a71d1cSMoore, Eric Dean      MPI_BIOSPAGE2_BOOT_DEVICE   BootDevice;             /* 20h */
1158*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_BIOS_2, MPI_POINTER PTR_CONFIG_PAGE_BIOS_2,
1159*c1a71d1cSMoore, Eric Dean    BIOSPage2_t, MPI_POINTER pBIOSPage2_t;
1160*c1a71d1cSMoore, Eric Dean  
1161*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_PAGEVERSION                       (0x01)
1162*c1a71d1cSMoore, Eric Dean  
1163*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_MASK                         (0x0F)
1164*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_ADAPTER_ORDER                (0x00)
1165*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_ADAPTER_NUMBER               (0x01)
1166*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_PCI_ADDRESS                  (0x02)
1167*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_PCI_SLOT_NUMBER              (0x03)
1168*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_FC_WWN                       (0x04)
1169*c1a71d1cSMoore, Eric Dean  #define MPI_BIOSPAGE2_FORM_SAS_WWN                      (0x05)
1170*c1a71d1cSMoore, Eric Dean  
11711da177e4SLinus Torvalds 
11721da177e4SLinus Torvalds /****************************************************************************
11731da177e4SLinus Torvalds *   SCSI Port Config Pages
11741da177e4SLinus Torvalds ****************************************************************************/
11751da177e4SLinus Torvalds 
11761da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_PORT_0
11771da177e4SLinus Torvalds {
1178*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
11791da177e4SLinus Torvalds     U32                     Capabilities;               /* 04h */
11801da177e4SLinus Torvalds     U32                     PhysicalInterface;          /* 08h */
1181*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_0,
11821da177e4SLinus Torvalds   SCSIPortPage0_t, MPI_POINTER pSCSIPortPage0_t;
11831da177e4SLinus Torvalds 
1184*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIPORTPAGE0_PAGEVERSION                   (0x02)
11851da177e4SLinus Torvalds 
11861da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_IU                        (0x00000001)
11871da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_DT                        (0x00000002)
11881da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_QAS                       (0x00000004)
11891da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_MIN_SYNC_PERIOD_MASK      (0x0000FF00)
11901da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_ASYNC                    (0x00)
11911da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_5                        (0x32)
11921da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_10                       (0x19)
11931da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_20                       (0x0C)
11941da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_33_33                    (0x0B)
11951da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_40                       (0x0A)
11961da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_80                       (0x09)
11971da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_160                      (0x08)
11981da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_SYNC_UNKNOWN                  (0xFF)
11991da177e4SLinus Torvalds 
12001da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_SHIFT_MIN_SYNC_PERIOD     (8)
12011da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(Cap)      \
12021da177e4SLinus Torvalds     (  ((Cap) & MPI_SCSIPORTPAGE0_CAP_MASK_MIN_SYNC_PERIOD) \
12031da177e4SLinus Torvalds     >> MPI_SCSIPORTPAGE0_CAP_SHIFT_MIN_SYNC_PERIOD          \
12041da177e4SLinus Torvalds     )
12051da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK      (0x00FF0000)
12061da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_SHIFT_MAX_SYNC_OFFSET     (16)
12071da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_GET_MAX_SYNC_OFFSET(Cap)      \
12081da177e4SLinus Torvalds     (  ((Cap) & MPI_SCSIPORTPAGE0_CAP_MASK_MAX_SYNC_OFFSET) \
12091da177e4SLinus Torvalds     >> MPI_SCSIPORTPAGE0_CAP_SHIFT_MAX_SYNC_OFFSET          \
12101da177e4SLinus Torvalds     )
1211*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIPORTPAGE0_CAP_IDP                       (0x08000000)
12121da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_WIDE                      (0x20000000)
12131da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_CAP_AIP                       (0x80000000)
12141da177e4SLinus Torvalds 
12151da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_TYPE_MASK          (0x00000003)
12161da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_HVD                (0x01)
12171da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_SE                 (0x02)
12181da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_LVD                (0x03)
12191da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_MASK_CONNECTED_ID         (0xFF000000)
12201da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_SHIFT_CONNECTED_ID        (24)
12211da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_BUS_FREE_CONNECTED_ID     (0xFE)
12221da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE0_PHY_UNKNOWN_CONNECTED_ID      (0xFF)
12231da177e4SLinus Torvalds 
12241da177e4SLinus Torvalds 
12251da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_PORT_1
12261da177e4SLinus Torvalds {
1227*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
12281da177e4SLinus Torvalds     U32                     Configuration;              /* 04h */
12291da177e4SLinus Torvalds     U32                     OnBusTimerValue;            /* 08h */
12301da177e4SLinus Torvalds     U8                      TargetConfig;               /* 0Ch */
12311da177e4SLinus Torvalds     U8                      Reserved1;                  /* 0Dh */
12321da177e4SLinus Torvalds     U16                     IDConfig;                   /* 0Eh */
1233*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_1,
12341da177e4SLinus Torvalds   SCSIPortPage1_t, MPI_POINTER pSCSIPortPage1_t;
12351da177e4SLinus Torvalds 
12361da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_PAGEVERSION                   (0x03)
12371da177e4SLinus Torvalds 
12381da177e4SLinus Torvalds /* Configuration values */
12391da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_CFG_PORT_SCSI_ID_MASK         (0x000000FF)
12401da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_CFG_PORT_RESPONSE_ID_MASK     (0xFFFF0000)
12411da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_CFG_SHIFT_PORT_RESPONSE_ID    (16)
12421da177e4SLinus Torvalds 
12431da177e4SLinus Torvalds /* TargetConfig values */
12441da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_TARGCONFIG_TARG_ONLY        (0x01)
12451da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE1_TARGCONFIG_INIT_TARG        (0x02)
12461da177e4SLinus Torvalds 
12471da177e4SLinus Torvalds 
12481da177e4SLinus Torvalds typedef struct _MPI_DEVICE_INFO
12491da177e4SLinus Torvalds {
12501da177e4SLinus Torvalds     U8      Timeout;                                    /* 00h */
12511da177e4SLinus Torvalds     U8      SyncFactor;                                 /* 01h */
12521da177e4SLinus Torvalds     U16     DeviceFlags;                                /* 02h */
12531da177e4SLinus Torvalds } MPI_DEVICE_INFO, MPI_POINTER PTR_MPI_DEVICE_INFO,
12541da177e4SLinus Torvalds   MpiDeviceInfo_t, MPI_POINTER pMpiDeviceInfo_t;
12551da177e4SLinus Torvalds 
12561da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_PORT_2
12571da177e4SLinus Torvalds {
1258*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER  Header;                         /* 00h */
12591da177e4SLinus Torvalds     U32                 PortFlags;                      /* 04h */
12601da177e4SLinus Torvalds     U32                 PortSettings;                   /* 08h */
12611da177e4SLinus Torvalds     MPI_DEVICE_INFO     DeviceSettings[16];             /* 0Ch */
1262*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_2,
12631da177e4SLinus Torvalds   SCSIPortPage2_t, MPI_POINTER pSCSIPortPage2_t;
12641da177e4SLinus Torvalds 
12651da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PAGEVERSION                       (0x02)
12661da177e4SLinus Torvalds 
12671da177e4SLinus Torvalds /* PortFlags values */
12681da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_SCAN_HIGH_TO_LOW       (0x00000001)
12691da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET       (0x00000004)
12701da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_ALTERNATE_CHS          (0x00000008)
12711da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_TERMINATION_DISABLE    (0x00000010)
12721da177e4SLinus Torvalds 
12731da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_DV_MASK                (0x00000060)
12741da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_FULL_DV                (0x00000000)
12751da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY          (0x00000020)
12761da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV                 (0x00000060)
12771da177e4SLinus Torvalds 
12781da177e4SLinus Torvalds 
12791da177e4SLinus Torvalds /* PortSettings values */
12801da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_HOST_ID_MASK                 (0x0000000F)
12811da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_MASK_INIT_HBA                (0x00000030)
12821da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_DISABLE_INIT_HBA             (0x00000000)
12831da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_BIOS_INIT_HBA                (0x00000010)
12841da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_OS_INIT_HBA                  (0x00000020)
12851da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_BIOS_OS_INIT_HBA             (0x00000030)
12861da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_REMOVABLE_MEDIA              (0x000000C0)
12871da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_RM_NONE                      (0x00000000)
12881da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_RM_BOOT_ONLY                 (0x00000040)
12891da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_RM_WITH_MEDIA                (0x00000080)
12901da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_SPINUP_DELAY_MASK            (0x00000F00)
12911da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_SHIFT_SPINUP_DELAY           (8)
12921da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS    (0x00003000)
12931da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_NEGO_MASTER_SETTINGS         (0x00000000)
12941da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_NONE_MASTER_SETTINGS         (0x00001000)
12951da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS          (0x00003000)
12961da177e4SLinus Torvalds 
12971da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_DISCONNECT_ENABLE          (0x0001)
12981da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_ID_SCAN_ENABLE             (0x0002)
12991da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_LUN_SCAN_ENABLE            (0x0004)
13001da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE           (0x0008)
13011da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE               (0x0010)
13021da177e4SLinus Torvalds #define MPI_SCSIPORTPAGE2_DEVICE_BOOT_CHOICE                (0x0020)
13031da177e4SLinus Torvalds 
13041da177e4SLinus Torvalds 
13051da177e4SLinus Torvalds /****************************************************************************
13061da177e4SLinus Torvalds *   SCSI Target Device Config Pages
13071da177e4SLinus Torvalds ****************************************************************************/
13081da177e4SLinus Torvalds 
13091da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_DEVICE_0
13101da177e4SLinus Torvalds {
1311*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
13121da177e4SLinus Torvalds     U32                     NegotiatedParameters;       /* 04h */
13131da177e4SLinus Torvalds     U32                     Information;                /* 08h */
1314*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_0,
13151da177e4SLinus Torvalds   SCSIDevicePage0_t, MPI_POINTER pSCSIDevicePage0_t;
13161da177e4SLinus Torvalds 
1317*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIDEVPAGE0_PAGEVERSION                    (0x04)
13181da177e4SLinus Torvalds 
13191da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_IU                          (0x00000001)
13201da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_DT                          (0x00000002)
13211da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_QAS                         (0x00000004)
13221da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_HOLD_MCS                    (0x00000008)
13231da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_WR_FLOW                     (0x00000010)
13241da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_RD_STRM                     (0x00000020)
13251da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_RTI                         (0x00000040)
13261da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_PCOMP_EN                    (0x00000080)
13271da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK        (0x0000FF00)
13281da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_PERIOD           (8)
13291da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK        (0x00FF0000)
13301da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_OFFSET           (16)
1331*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIDEVPAGE0_NP_IDP                         (0x08000000)
13321da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_WIDE                        (0x20000000)
13331da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_NP_AIP                         (0x80000000)
13341da177e4SLinus Torvalds 
13351da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_INFO_PARAMS_NEGOTIATED         (0x00000001)
13361da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_INFO_SDTR_REJECTED             (0x00000002)
13371da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_INFO_WDTR_REJECTED             (0x00000004)
13381da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE0_INFO_PPR_REJECTED              (0x00000008)
13391da177e4SLinus Torvalds 
13401da177e4SLinus Torvalds 
13411da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_DEVICE_1
13421da177e4SLinus Torvalds {
1343*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
13441da177e4SLinus Torvalds     U32                     RequestedParameters;        /* 04h */
13451da177e4SLinus Torvalds     U32                     Reserved;                   /* 08h */
13461da177e4SLinus Torvalds     U32                     Configuration;              /* 0Ch */
1347*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_DEVICE_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_1,
13481da177e4SLinus Torvalds   SCSIDevicePage1_t, MPI_POINTER pSCSIDevicePage1_t;
13491da177e4SLinus Torvalds 
1350*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIDEVPAGE1_PAGEVERSION                    (0x05)
13511da177e4SLinus Torvalds 
13521da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_IU                          (0x00000001)
13531da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_DT                          (0x00000002)
13541da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_QAS                         (0x00000004)
13551da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_HOLD_MCS                    (0x00000008)
13561da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_WR_FLOW                     (0x00000010)
13571da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_RD_STRM                     (0x00000020)
13581da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_RTI                         (0x00000040)
13591da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_PCOMP_EN                    (0x00000080)
13601da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK        (0x0000FF00)
13611da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD       (8)
13621da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK        (0x00FF0000)
13631da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_SHIFT_MAX_SYNC_OFFSET       (16)
1364*c1a71d1cSMoore, Eric Dean  #define MPI_SCSIDEVPAGE1_RP_IDP                         (0x08000000)
13651da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_WIDE                        (0x20000000)
13661da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_RP_AIP                         (0x80000000)
13671da177e4SLinus Torvalds 
13681da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED           (0x00000002)
13691da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED           (0x00000004)
13701da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE    (0x00000008)
13711da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG             (0x00000010)
13721da177e4SLinus Torvalds 
13731da177e4SLinus Torvalds 
13741da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_DEVICE_2
13751da177e4SLinus Torvalds {
1376*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
13771da177e4SLinus Torvalds     U32                     DomainValidation;           /* 04h */
13781da177e4SLinus Torvalds     U32                     ParityPipeSelect;           /* 08h */
13791da177e4SLinus Torvalds     U32                     DataPipeSelect;             /* 0Ch */
1380*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_DEVICE_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_2,
13811da177e4SLinus Torvalds   SCSIDevicePage2_t, MPI_POINTER pSCSIDevicePage2_t;
13821da177e4SLinus Torvalds 
13831da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_PAGEVERSION                    (0x01)
13841da177e4SLinus Torvalds 
13851da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_ISI_ENABLE                  (0x00000010)
13861da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_SECONDARY_DRIVER_ENABLE     (0x00000020)
13871da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_SLEW_RATE_CTRL              (0x00000380)
13881da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_PRIM_DRIVE_STR_CTRL         (0x00001C00)
13891da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_SECOND_DRIVE_STR_CTRL       (0x0000E000)
13901da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_XCLKH_ST                    (0x10000000)
13911da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_XCLKS_ST                    (0x20000000)
13921da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_XCLKH_DT                    (0x40000000)
13931da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DV_XCLKS_DT                    (0x80000000)
13941da177e4SLinus Torvalds 
13951da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_PPS_PPS_MASK                   (0x00000003)
13961da177e4SLinus Torvalds 
13971da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_0_PL_SELECT_MASK       (0x00000003)
13981da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_1_PL_SELECT_MASK       (0x0000000C)
13991da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_2_PL_SELECT_MASK       (0x00000030)
14001da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_3_PL_SELECT_MASK       (0x000000C0)
14011da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_4_PL_SELECT_MASK       (0x00000300)
14021da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_5_PL_SELECT_MASK       (0x00000C00)
14031da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_6_PL_SELECT_MASK       (0x00003000)
14041da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_7_PL_SELECT_MASK       (0x0000C000)
14051da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_8_PL_SELECT_MASK       (0x00030000)
14061da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_9_PL_SELECT_MASK       (0x000C0000)
14071da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_10_PL_SELECT_MASK      (0x00300000)
14081da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_11_PL_SELECT_MASK      (0x00C00000)
14091da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_12_PL_SELECT_MASK      (0x03000000)
14101da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_13_PL_SELECT_MASK      (0x0C000000)
14111da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_14_PL_SELECT_MASK      (0x30000000)
14121da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE2_DPS_BIT_15_PL_SELECT_MASK      (0xC0000000)
14131da177e4SLinus Torvalds 
14141da177e4SLinus Torvalds 
14151da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SCSI_DEVICE_3
14161da177e4SLinus Torvalds {
1417*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
14181da177e4SLinus Torvalds     U16                     MsgRejectCount;             /* 04h */
14191da177e4SLinus Torvalds     U16                     PhaseErrorCount;            /* 06h */
14201da177e4SLinus Torvalds     U16                     ParityErrorCount;           /* 08h */
14211da177e4SLinus Torvalds     U16                     Reserved;                   /* 0Ah */
1422*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SCSI_DEVICE_3, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_3,
14231da177e4SLinus Torvalds   SCSIDevicePage3_t, MPI_POINTER pSCSIDevicePage3_t;
14241da177e4SLinus Torvalds 
14251da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE3_PAGEVERSION                    (0x00)
14261da177e4SLinus Torvalds 
14271da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE3_MAX_COUNTER                    (0xFFFE)
14281da177e4SLinus Torvalds #define MPI_SCSIDEVPAGE3_UNSUPPORTED_COUNTER            (0xFFFF)
14291da177e4SLinus Torvalds 
14301da177e4SLinus Torvalds 
14311da177e4SLinus Torvalds /****************************************************************************
14321da177e4SLinus Torvalds *   FC Port Config Pages
14331da177e4SLinus Torvalds ****************************************************************************/
14341da177e4SLinus Torvalds 
14351da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_0
14361da177e4SLinus Torvalds {
1437*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
14381da177e4SLinus Torvalds     U32                     Flags;                      /* 04h */
14391da177e4SLinus Torvalds     U8                      MPIPortNumber;              /* 08h */
14401da177e4SLinus Torvalds     U8                      LinkType;                   /* 09h */
14411da177e4SLinus Torvalds     U8                      PortState;                  /* 0Ah */
14421da177e4SLinus Torvalds     U8                      Reserved;                   /* 0Bh */
14431da177e4SLinus Torvalds     U32                     PortIdentifier;             /* 0Ch */
14441da177e4SLinus Torvalds     U64                     WWNN;                       /* 10h */
14451da177e4SLinus Torvalds     U64                     WWPN;                       /* 18h */
14461da177e4SLinus Torvalds     U32                     SupportedServiceClass;      /* 20h */
14471da177e4SLinus Torvalds     U32                     SupportedSpeeds;            /* 24h */
14481da177e4SLinus Torvalds     U32                     CurrentSpeed;               /* 28h */
14491da177e4SLinus Torvalds     U32                     MaxFrameSize;               /* 2Ch */
14501da177e4SLinus Torvalds     U64                     FabricWWNN;                 /* 30h */
14511da177e4SLinus Torvalds     U64                     FabricWWPN;                 /* 38h */
14521da177e4SLinus Torvalds     U32                     DiscoveredPortsCount;       /* 40h */
14531da177e4SLinus Torvalds     U32                     MaxInitiators;              /* 44h */
14541da177e4SLinus Torvalds     U8                      MaxAliasesSupported;        /* 48h */
14551da177e4SLinus Torvalds     U8                      MaxHardAliasesSupported;    /* 49h */
14561da177e4SLinus Torvalds     U8                      NumCurrentAliases;          /* 4Ah */
14571da177e4SLinus Torvalds     U8                      Reserved1;                  /* 4Bh */
1458*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_0,
14591da177e4SLinus Torvalds   FCPortPage0_t, MPI_POINTER pFCPortPage0_t;
14601da177e4SLinus Torvalds 
14611da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PAGEVERSION                     (0x02)
14621da177e4SLinus Torvalds 
14631da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_PROT_MASK                 (0x0000000F)
14641da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_INIT             (MPI_PORTFACTS_PROTOCOL_INITIATOR)
14651da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_TARG             (MPI_PORTFACTS_PROTOCOL_TARGET)
14661da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_PROT_LAN                  (MPI_PORTFACTS_PROTOCOL_LAN)
14671da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_PROT_LOGBUSADDR           (MPI_PORTFACTS_PROTOCOL_LOGBUSADDR)
14681da177e4SLinus Torvalds 
14691da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ALIAS_ALPA_SUPPORTED      (0x00000010)
14701da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ALIAS_WWN_SUPPORTED       (0x00000020)
14711da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_FABRIC_WWN_VALID          (0x00000040)
14721da177e4SLinus Torvalds 
14731da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK          (0x00000F00)
14741da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT            (0x00000000)
14751da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_POINT_TO_POINT     (0x00000100)
14761da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PRIVATE_LOOP       (0x00000200)
14771da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_FABRIC_DIRECT      (0x00000400)
14781da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PUBLIC_LOOP        (0x00000800)
14791da177e4SLinus Torvalds 
14801da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_RESERVED                  (0x00)
14811da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_OTHER                     (0x01)
14821da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_UNKNOWN                   (0x02)
14831da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_COPPER                    (0x03)
14841da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1300               (0x04)
14851da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1500               (0x05)
14861da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_50_LASER_MULTI            (0x06)
14871da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_50_LED_MULTI              (0x07)
14881da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_62_LASER_MULTI            (0x08)
14891da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_62_LED_MULTI              (0x09)
14901da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_MULTI_LONG_WAVE           (0x0A)
14911da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_MULTI_SHORT_WAVE          (0x0B)
14921da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_LASER_SHORT_WAVE          (0x0C)
14931da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_LED_SHORT_WAVE            (0x0D)
14941da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_1300_LONG_WAVE            (0x0E)
14951da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_LTYPE_1500_LONG_WAVE            (0x0F)
14961da177e4SLinus Torvalds 
14971da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN               (0x01)      /*(SNIA)HBA_PORTSTATE_UNKNOWN       1 Unknown */
14981da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_ONLINE                (0x02)      /*(SNIA)HBA_PORTSTATE_ONLINE        2 Operational */
14991da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_OFFLINE               (0x03)      /*(SNIA)HBA_PORTSTATE_OFFLINE       3 User Offline */
15001da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_BYPASSED              (0x04)      /*(SNIA)HBA_PORTSTATE_BYPASSED      4 Bypassed */
15011da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_DIAGNOST              (0x05)      /*(SNIA)HBA_PORTSTATE_DIAGNOSTICS   5 In diagnostics mode */
15021da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_LINKDOWN              (0x06)      /*(SNIA)HBA_PORTSTATE_LINKDOWN      6 Link Down */
15031da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_ERROR                 (0x07)      /*(SNIA)HBA_PORTSTATE_ERROR         7 Port Error */
15041da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_PORTSTATE_LOOPBACK              (0x08)      /*(SNIA)HBA_PORTSTATE_LOOPBACK      8 Loopback */
15051da177e4SLinus Torvalds 
15061da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_CLASS_1                 (0x00000001)
15071da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_CLASS_2                 (0x00000002)
15081da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_CLASS_3                 (0x00000004)
15091da177e4SLinus Torvalds 
15101da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN            (0x00000000) /* (SNIA)HBA_PORTSPEED_UNKNOWN 0   Unknown - transceiver incapable of reporting */
15111da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED             (0x00000001) /* (SNIA)HBA_PORTSPEED_1GBIT   1   1 GBit/sec */
15121da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED             (0x00000002) /* (SNIA)HBA_PORTSPEED_2GBIT   2   2 GBit/sec */
15131da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED            (0x00000004) /* (SNIA)HBA_PORTSPEED_10GBIT  4  10 GBit/sec */
15141da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_SUPPORT_4GBIT_SPEED             (0x00000008) /* (SNIA)HBA_PORTSPEED_4GBIT   8   4 GBit/sec */
15151da177e4SLinus Torvalds 
15161da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN            MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN
15171da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT             MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED
15181da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT             MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED
15191da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_10GBIT            MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED
15201da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT             MPI_FCPORTPAGE0_SUPPORT_4GBIT_SPEED
15211da177e4SLinus Torvalds #define MPI_FCPORTPAGE0_CURRENT_SPEED_NOT_NEGOTIATED    (0x00008000)        /* (SNIA)HBA_PORTSPEED_NOT_NEGOTIATED (1<<15) Speed not established */
15221da177e4SLinus Torvalds 
15231da177e4SLinus Torvalds 
15241da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_1
15251da177e4SLinus Torvalds {
1526*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
15271da177e4SLinus Torvalds     U32                     Flags;                      /* 04h */
15281da177e4SLinus Torvalds     U64                     NoSEEPROMWWNN;              /* 08h */
15291da177e4SLinus Torvalds     U64                     NoSEEPROMWWPN;              /* 10h */
15301da177e4SLinus Torvalds     U8                      HardALPA;                   /* 18h */
15311da177e4SLinus Torvalds     U8                      LinkConfig;                 /* 19h */
15321da177e4SLinus Torvalds     U8                      TopologyConfig;             /* 1Ah */
15331da177e4SLinus Torvalds     U8                      AltConnector;               /* 1Bh */
15341da177e4SLinus Torvalds     U8                      NumRequestedAliases;        /* 1Ch */
15351da177e4SLinus Torvalds     U8                      RR_TOV;                     /* 1Dh */
15361da177e4SLinus Torvalds     U8                      InitiatorDeviceTimeout;     /* 1Eh */
15371da177e4SLinus Torvalds     U8                      InitiatorIoPendTimeout;     /* 1Fh */
1538*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_1,
15391da177e4SLinus Torvalds   FCPortPage1_t, MPI_POINTER pFCPortPage1_t;
15401da177e4SLinus Torvalds 
15411da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_PAGEVERSION                     (0x06)
15421da177e4SLinus Torvalds 
15431da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_EXT_FCP_STATUS_EN         (0x08000000)
15441da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY     (0x04000000)
15451da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_FORCE_USE_NOSEEPROM_WWNS  (0x02000000)
15461da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_VERBOSE_RESCAN_EVENTS     (0x01000000)
15471da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_TARGET_MODE_OXID          (0x00800000)
15481da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PORT_OFFLINE              (0x00400000)
15491da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_SOFT_ALPA_FALLBACK        (0x00200000)
1550*c1a71d1cSMoore, Eric Dean  #define MPI_FCPORTPAGE1_FLAGS_TARGET_LARGE_CDB_ENABLE   (0x00000080)
15511da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_MASK_RR_TOV_UNITS         (0x00000070)
15521da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_SUPPRESS_PROT_REG         (0x00000008)
15531da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PLOGI_ON_LOGO             (0x00000004)
15541da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_MAINTAIN_LOGINS           (0x00000002)
15551da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_DID               (0x00000001)
15561da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_WWN               (0x00000000)
15571da177e4SLinus Torvalds 
15581da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_MASK                 (0xF0000000)
15591da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT                (28)
15601da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT             ((U32)MPI_PORTFACTS_PROTOCOL_INITIATOR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
15611da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_TARG             ((U32)MPI_PORTFACTS_PROTOCOL_TARGET << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
15621da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_LAN                  ((U32)MPI_PORTFACTS_PROTOCOL_LAN << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
15631da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_PROT_LOGBUSADDR           ((U32)MPI_PORTFACTS_PROTOCOL_LOGBUSADDR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
15641da177e4SLinus Torvalds 
15651da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_NONE_RR_TOV_UNITS         (0x00000000)
15661da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_THOUSANDTH_RR_TOV_UNITS   (0x00000010)
15671da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_TENTH_RR_TOV_UNITS        (0x00000030)
15681da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_FLAGS_TEN_RR_TOV_UNITS          (0x00000050)
15691da177e4SLinus Torvalds 
15701da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_HARD_ALPA_NOT_USED              (0xFF)
15711da177e4SLinus Torvalds 
15721da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_MASK              (0x0F)
15731da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_1GIG              (0x00)
15741da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_2GIG              (0x01)
15751da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_4GIG              (0x02)
15761da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_10GIG             (0x03)
15771da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_LCONFIG_SPEED_AUTO              (0x0F)
15781da177e4SLinus Torvalds 
15791da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_TOPOLOGY_MASK                   (0x0F)
15801da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_TOPOLOGY_NLPORT                 (0x01)
15811da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_TOPOLOGY_NPORT                  (0x02)
15821da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_TOPOLOGY_AUTO                   (0x0F)
15831da177e4SLinus Torvalds 
15841da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_ALT_CONN_UNKNOWN                (0x00)
15851da177e4SLinus Torvalds 
15861da177e4SLinus Torvalds #define MPI_FCPORTPAGE1_INITIATOR_DEV_TIMEOUT_MASK      (0x7F)
1587*c1a71d1cSMoore, Eric Dean  #define MPI_FCPORTPAGE1_INITIATOR_DEV_UNIT_16           (0x80)
15881da177e4SLinus Torvalds 
15891da177e4SLinus Torvalds 
15901da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_2
15911da177e4SLinus Torvalds {
1592*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
15931da177e4SLinus Torvalds     U8                      NumberActive;               /* 04h */
15941da177e4SLinus Torvalds     U8                      ALPA[127];                  /* 05h */
1595*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_2,
15961da177e4SLinus Torvalds   FCPortPage2_t, MPI_POINTER pFCPortPage2_t;
15971da177e4SLinus Torvalds 
15981da177e4SLinus Torvalds #define MPI_FCPORTPAGE2_PAGEVERSION                     (0x01)
15991da177e4SLinus Torvalds 
16001da177e4SLinus Torvalds 
16011da177e4SLinus Torvalds typedef struct _WWN_FORMAT
16021da177e4SLinus Torvalds {
16031da177e4SLinus Torvalds     U64                     WWNN;                       /* 00h */
16041da177e4SLinus Torvalds     U64                     WWPN;                       /* 08h */
16051da177e4SLinus Torvalds } WWN_FORMAT, MPI_POINTER PTR_WWN_FORMAT,
16061da177e4SLinus Torvalds   WWNFormat, MPI_POINTER pWWNFormat;
16071da177e4SLinus Torvalds 
16081da177e4SLinus Torvalds typedef union _FC_PORT_PERSISTENT_PHYSICAL_ID
16091da177e4SLinus Torvalds {
16101da177e4SLinus Torvalds     WWN_FORMAT              WWN;
16111da177e4SLinus Torvalds     U32                     Did;
16121da177e4SLinus Torvalds } FC_PORT_PERSISTENT_PHYSICAL_ID, MPI_POINTER PTR_FC_PORT_PERSISTENT_PHYSICAL_ID,
16131da177e4SLinus Torvalds   PersistentPhysicalId_t, MPI_POINTER pPersistentPhysicalId_t;
16141da177e4SLinus Torvalds 
16151da177e4SLinus Torvalds typedef struct _FC_PORT_PERSISTENT
16161da177e4SLinus Torvalds {
16171da177e4SLinus Torvalds     FC_PORT_PERSISTENT_PHYSICAL_ID  PhysicalIdentifier; /* 00h */
16181da177e4SLinus Torvalds     U8                              TargetID;           /* 10h */
16191da177e4SLinus Torvalds     U8                              Bus;                /* 11h */
16201da177e4SLinus Torvalds     U16                             Flags;              /* 12h */
16211da177e4SLinus Torvalds } FC_PORT_PERSISTENT, MPI_POINTER PTR_FC_PORT_PERSISTENT,
16221da177e4SLinus Torvalds   PersistentData_t, MPI_POINTER pPersistentData_t;
16231da177e4SLinus Torvalds 
16241da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_SHIFT                      (16)
16251da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_ENTRY_VALID                (0x0001)
16261da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_SCAN_ID                    (0x0002)
16271da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_SCAN_LUNS                  (0x0004)
16281da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_BOOT_DEVICE                (0x0008)
16291da177e4SLinus Torvalds #define MPI_PERSISTENT_FLAGS_BY_DID                     (0x0080)
16301da177e4SLinus Torvalds 
16311da177e4SLinus Torvalds /*
16321da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
16331da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
16341da177e4SLinus Torvalds  */
16351da177e4SLinus Torvalds #ifndef MPI_FC_PORT_PAGE_3_ENTRY_MAX
16361da177e4SLinus Torvalds #define MPI_FC_PORT_PAGE_3_ENTRY_MAX        (1)
16371da177e4SLinus Torvalds #endif
16381da177e4SLinus Torvalds 
16391da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_3
16401da177e4SLinus Torvalds {
1641*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                                 /* 00h */
16421da177e4SLinus Torvalds     FC_PORT_PERSISTENT      Entry[MPI_FC_PORT_PAGE_3_ENTRY_MAX];    /* 04h */
1643*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_3, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_3,
16441da177e4SLinus Torvalds   FCPortPage3_t, MPI_POINTER pFCPortPage3_t;
16451da177e4SLinus Torvalds 
16461da177e4SLinus Torvalds #define MPI_FCPORTPAGE3_PAGEVERSION                     (0x01)
16471da177e4SLinus Torvalds 
16481da177e4SLinus Torvalds 
16491da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_4
16501da177e4SLinus Torvalds {
1651*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
16521da177e4SLinus Torvalds     U32                     PortFlags;                  /* 04h */
16531da177e4SLinus Torvalds     U32                     PortSettings;               /* 08h */
1654*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_4, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_4,
16551da177e4SLinus Torvalds   FCPortPage4_t, MPI_POINTER pFCPortPage4_t;
16561da177e4SLinus Torvalds 
16571da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PAGEVERSION                     (0x00)
16581da177e4SLinus Torvalds 
16591da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_FLAGS_ALTERNATE_CHS        (0x00000008)
16601da177e4SLinus Torvalds 
16611da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_MASK_INIT_HBA              (0x00000030)
16621da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_DISABLE_INIT_HBA           (0x00000000)
16631da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_BIOS_INIT_HBA              (0x00000010)
16641da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_OS_INIT_HBA                (0x00000020)
16651da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_BIOS_OS_INIT_HBA           (0x00000030)
16661da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_REMOVABLE_MEDIA            (0x000000C0)
16671da177e4SLinus Torvalds #define MPI_FCPORTPAGE4_PORT_SPINUP_DELAY_MASK          (0x00000F00)
16681da177e4SLinus Torvalds 
16691da177e4SLinus Torvalds 
16701da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_5_ALIAS_INFO
16711da177e4SLinus Torvalds {
16721da177e4SLinus Torvalds     U8      Flags;                                      /* 00h */
16731da177e4SLinus Torvalds     U8      AliasAlpa;                                  /* 01h */
16741da177e4SLinus Torvalds     U16     Reserved;                                   /* 02h */
16751da177e4SLinus Torvalds     U64     AliasWWNN;                                  /* 04h */
16761da177e4SLinus Torvalds     U64     AliasWWPN;                                  /* 0Ch */
1677*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_5_ALIAS_INFO,
16781da177e4SLinus Torvalds   MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5_ALIAS_INFO,
16791da177e4SLinus Torvalds   FcPortPage5AliasInfo_t, MPI_POINTER pFcPortPage5AliasInfo_t;
16801da177e4SLinus Torvalds 
16811da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_5
16821da177e4SLinus Torvalds {
1683*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER                  Header;         /* 00h */
1684*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_FC_PORT_5_ALIAS_INFO    AliasInfo;      /* 04h */
1685*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_5, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5,
16861da177e4SLinus Torvalds   FCPortPage5_t, MPI_POINTER pFCPortPage5_t;
16871da177e4SLinus Torvalds 
16881da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_PAGEVERSION                     (0x02)
16891da177e4SLinus Torvalds 
16901da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_FLAGS_ALPA_ACQUIRED             (0x01)
16911da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_FLAGS_HARD_ALPA                 (0x02)
16921da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_FLAGS_HARD_WWNN                 (0x04)
16931da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_FLAGS_HARD_WWPN                 (0x08)
16941da177e4SLinus Torvalds #define MPI_FCPORTPAGE5_FLAGS_DISABLE                   (0x10)
16951da177e4SLinus Torvalds 
16961da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_6
16971da177e4SLinus Torvalds {
1698*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
16991da177e4SLinus Torvalds     U32                     Reserved;                   /* 04h */
17001da177e4SLinus Torvalds     U64                     TimeSinceReset;             /* 08h */
17011da177e4SLinus Torvalds     U64                     TxFrames;                   /* 10h */
17021da177e4SLinus Torvalds     U64                     RxFrames;                   /* 18h */
17031da177e4SLinus Torvalds     U64                     TxWords;                    /* 20h */
17041da177e4SLinus Torvalds     U64                     RxWords;                    /* 28h */
17051da177e4SLinus Torvalds     U64                     LipCount;                   /* 30h */
17061da177e4SLinus Torvalds     U64                     NosCount;                   /* 38h */
17071da177e4SLinus Torvalds     U64                     ErrorFrames;                /* 40h */
17081da177e4SLinus Torvalds     U64                     DumpedFrames;               /* 48h */
17091da177e4SLinus Torvalds     U64                     LinkFailureCount;           /* 50h */
17101da177e4SLinus Torvalds     U64                     LossOfSyncCount;            /* 58h */
17111da177e4SLinus Torvalds     U64                     LossOfSignalCount;          /* 60h */
17121da177e4SLinus Torvalds     U64                     PrimativeSeqErrCount;       /* 68h */
17131da177e4SLinus Torvalds     U64                     InvalidTxWordCount;         /* 70h */
17141da177e4SLinus Torvalds     U64                     InvalidCrcCount;            /* 78h */
17151da177e4SLinus Torvalds     U64                     FcpInitiatorIoCount;        /* 80h */
1716*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_6, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_6,
17171da177e4SLinus Torvalds   FCPortPage6_t, MPI_POINTER pFCPortPage6_t;
17181da177e4SLinus Torvalds 
17191da177e4SLinus Torvalds #define MPI_FCPORTPAGE6_PAGEVERSION                     (0x00)
17201da177e4SLinus Torvalds 
17211da177e4SLinus Torvalds 
17221da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_7
17231da177e4SLinus Torvalds {
1724*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
17251da177e4SLinus Torvalds     U32                     Reserved;                   /* 04h */
17261da177e4SLinus Torvalds     U8                      PortSymbolicName[256];      /* 08h */
1727*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_7, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_7,
17281da177e4SLinus Torvalds   FCPortPage7_t, MPI_POINTER pFCPortPage7_t;
17291da177e4SLinus Torvalds 
17301da177e4SLinus Torvalds #define MPI_FCPORTPAGE7_PAGEVERSION                     (0x00)
17311da177e4SLinus Torvalds 
17321da177e4SLinus Torvalds 
17331da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_8
17341da177e4SLinus Torvalds {
1735*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
17361da177e4SLinus Torvalds     U32                     BitVector[8];               /* 04h */
1737*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_8, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_8,
17381da177e4SLinus Torvalds   FCPortPage8_t, MPI_POINTER pFCPortPage8_t;
17391da177e4SLinus Torvalds 
17401da177e4SLinus Torvalds #define MPI_FCPORTPAGE8_PAGEVERSION                     (0x00)
17411da177e4SLinus Torvalds 
17421da177e4SLinus Torvalds 
17431da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_9
17441da177e4SLinus Torvalds {
1745*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
17461da177e4SLinus Torvalds     U32                     Reserved;                   /* 04h */
17471da177e4SLinus Torvalds     U64                     GlobalWWPN;                 /* 08h */
17481da177e4SLinus Torvalds     U64                     GlobalWWNN;                 /* 10h */
17491da177e4SLinus Torvalds     U32                     UnitType;                   /* 18h */
17501da177e4SLinus Torvalds     U32                     PhysicalPortNumber;         /* 1Ch */
17511da177e4SLinus Torvalds     U32                     NumAttachedNodes;           /* 20h */
17521da177e4SLinus Torvalds     U16                     IPVersion;                  /* 24h */
17531da177e4SLinus Torvalds     U16                     UDPPortNumber;              /* 26h */
17541da177e4SLinus Torvalds     U8                      IPAddress[16];              /* 28h */
17551da177e4SLinus Torvalds     U16                     Reserved1;                  /* 38h */
17561da177e4SLinus Torvalds     U16                     TopologyDiscoveryFlags;     /* 3Ah */
1757*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_9, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_9,
17581da177e4SLinus Torvalds   FCPortPage9_t, MPI_POINTER pFCPortPage9_t;
17591da177e4SLinus Torvalds 
17601da177e4SLinus Torvalds #define MPI_FCPORTPAGE9_PAGEVERSION                     (0x00)
17611da177e4SLinus Torvalds 
17621da177e4SLinus Torvalds 
17631da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA
17641da177e4SLinus Torvalds {
17651da177e4SLinus Torvalds     U8                      Id;                         /* 10h */
17661da177e4SLinus Torvalds     U8                      ExtId;                      /* 11h */
17671da177e4SLinus Torvalds     U8                      Connector;                  /* 12h */
17681da177e4SLinus Torvalds     U8                      Transceiver[8];             /* 13h */
17691da177e4SLinus Torvalds     U8                      Encoding;                   /* 1Bh */
17701da177e4SLinus Torvalds     U8                      BitRate_100mbs;             /* 1Ch */
17711da177e4SLinus Torvalds     U8                      Reserved1;                  /* 1Dh */
17721da177e4SLinus Torvalds     U8                      Length9u_km;                /* 1Eh */
17731da177e4SLinus Torvalds     U8                      Length9u_100m;              /* 1Fh */
17741da177e4SLinus Torvalds     U8                      Length50u_10m;              /* 20h */
17751da177e4SLinus Torvalds     U8                      Length62p5u_10m;            /* 21h */
17761da177e4SLinus Torvalds     U8                      LengthCopper_m;             /* 22h */
17771da177e4SLinus Torvalds     U8                      Reseverved2;                /* 22h */
17781da177e4SLinus Torvalds     U8                      VendorName[16];             /* 24h */
17791da177e4SLinus Torvalds     U8                      Reserved3;                  /* 34h */
17801da177e4SLinus Torvalds     U8                      VendorOUI[3];               /* 35h */
17811da177e4SLinus Torvalds     U8                      VendorPN[16];               /* 38h */
17821da177e4SLinus Torvalds     U8                      VendorRev[4];               /* 48h */
1783*c1a71d1cSMoore, Eric Dean      U16                     Wavelength;                 /* 4Ch */
1784*c1a71d1cSMoore, Eric Dean      U8                      Reserved4;                  /* 4Eh */
17851da177e4SLinus Torvalds     U8                      CC_BASE;                    /* 4Fh */
1786*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA,
17871da177e4SLinus Torvalds   MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA,
17881da177e4SLinus Torvalds   FCPortPage10BaseSfpData_t, MPI_POINTER pFCPortPage10BaseSfpData_t;
17891da177e4SLinus Torvalds 
17901da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_UNKNOWN        (0x00)
17911da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_GBIC           (0x01)
17921da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_FIXED          (0x02)
17931da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_SFP            (0x03)
17941da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_SFP_MIN        (0x04)
17951da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_SFP_MAX        (0x7F)
17961da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ID_VEND_SPEC_MASK (0x80)
17971da177e4SLinus Torvalds 
17981da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_UNKNOWN     (0x00)
17991da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF1     (0x01)
18001da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF2     (0x02)
18011da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF3     (0x03)
18021da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_SEEPROM     (0x04)
18031da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF5     (0x05)
18041da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF6     (0x06)
18051da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_MODDEF7     (0x07)
18061da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_EXTID_VNDSPC_MASK (0x80)
18071da177e4SLinus Torvalds 
18081da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_UNKNOWN      (0x00)
18091da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_SC           (0x01)
18101da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_COPPER1      (0x02)
18111da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_COPPER2      (0x03)
18121da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_BNC_TNC      (0x04)
18131da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_COAXIAL      (0x05)
18141da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_FIBERJACK    (0x06)
18151da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_LC           (0x07)
18161da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_MT_RJ        (0x08)
18171da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_MU           (0x09)
18181da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_SG           (0x0A)
18191da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_OPT_PIGT     (0x0B)
18201da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_RSV1_MIN     (0x0C)
18211da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_RSV1_MAX     (0x1F)
18221da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_HSSDC_II     (0x20)
18231da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_CPR_PIGT     (0x21)
18241da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_RSV2_MIN     (0x22)
18251da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_RSV2_MAX     (0x7F)
18261da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_CONN_VNDSPC_MASK  (0x80)
18271da177e4SLinus Torvalds 
18281da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ENCODE_UNSPEC     (0x00)
18291da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ENCODE_8B10B      (0x01)
18301da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ENCODE_4B5B       (0x02)
18311da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ENCODE_NRZ        (0x03)
18321da177e4SLinus Torvalds #define MPI_FCPORT10_BASE_ENCODE_MANCHESTER (0x04)
18331da177e4SLinus Torvalds 
18341da177e4SLinus Torvalds 
18351da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA
18361da177e4SLinus Torvalds {
18371da177e4SLinus Torvalds     U8                      Options[2];                 /* 50h */
18381da177e4SLinus Torvalds     U8                      BitRateMax;                 /* 52h */
18391da177e4SLinus Torvalds     U8                      BitRateMin;                 /* 53h */
18401da177e4SLinus Torvalds     U8                      VendorSN[16];               /* 54h */
18411da177e4SLinus Torvalds     U8                      DateCode[8];                /* 64h */
1842*c1a71d1cSMoore, Eric Dean      U8                      DiagMonitoringType;         /* 6Ch */
1843*c1a71d1cSMoore, Eric Dean      U8                      EnhancedOptions;            /* 6Dh */
1844*c1a71d1cSMoore, Eric Dean      U8                      SFF8472Compliance;          /* 6Eh */
18451da177e4SLinus Torvalds     U8                      CC_EXT;                     /* 6Fh */
1846*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA,
18471da177e4SLinus Torvalds   MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA,
18481da177e4SLinus Torvalds   FCPortPage10ExtendedSfpData_t, MPI_POINTER pFCPortPage10ExtendedSfpData_t;
18491da177e4SLinus Torvalds 
18501da177e4SLinus Torvalds #define MPI_FCPORT10_EXT_OPTION1_RATESEL    (0x20)
18511da177e4SLinus Torvalds #define MPI_FCPORT10_EXT_OPTION1_TX_DISABLE (0x10)
18521da177e4SLinus Torvalds #define MPI_FCPORT10_EXT_OPTION1_TX_FAULT   (0x08)
18531da177e4SLinus Torvalds #define MPI_FCPORT10_EXT_OPTION1_LOS_INVERT (0x04)
18541da177e4SLinus Torvalds #define MPI_FCPORT10_EXT_OPTION1_LOS        (0x02)
18551da177e4SLinus Torvalds 
18561da177e4SLinus Torvalds 
18571da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_PORT_10
18581da177e4SLinus Torvalds {
1859*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER                          Header;             /* 00h */
18601da177e4SLinus Torvalds     U8                                          Flags;              /* 04h */
18611da177e4SLinus Torvalds     U8                                          Reserved1;          /* 05h */
18621da177e4SLinus Torvalds     U16                                         Reserved2;          /* 06h */
18631da177e4SLinus Torvalds     U32                                         HwConfig1;          /* 08h */
18641da177e4SLinus Torvalds     U32                                         HwConfig2;          /* 0Ch */
1865*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA        Base;               /* 10h */
1866*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA    Extended;           /* 50h */
18671da177e4SLinus Torvalds     U8                                          VendorSpecific[32]; /* 70h */
1868*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_PORT_10, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10,
18691da177e4SLinus Torvalds   FCPortPage10_t, MPI_POINTER pFCPortPage10_t;
18701da177e4SLinus Torvalds 
1871*c1a71d1cSMoore, Eric Dean  #define MPI_FCPORTPAGE10_PAGEVERSION                    (0x01)
18721da177e4SLinus Torvalds 
18731da177e4SLinus Torvalds /* standard MODDEF pin definitions (from GBIC spec.) */
18741da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_MASK              (0x00000007)
18751da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF2                  (0x00000001)
18761da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF1                  (0x00000002)
18771da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF0                  (0x00000004)
18781da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_NOGBIC            (0x00000007)
18791da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_CPR_IEEE_CX       (0x00000006)
18801da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_COPPER            (0x00000005)
18811da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_OPTICAL_LW        (0x00000004)
18821da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SEEPROM           (0x00000003)
18831da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SW_OPTICAL        (0x00000002)
18841da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_LX_IEEE_OPT_LW    (0x00000001)
18851da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SX_IEEE_OPT_SW    (0x00000000)
18861da177e4SLinus Torvalds 
18871da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_CC_BASE_OK               (0x00000010)
18881da177e4SLinus Torvalds #define MPI_FCPORTPAGE10_FLAGS_CC_EXT_OK                (0x00000020)
18891da177e4SLinus Torvalds 
18901da177e4SLinus Torvalds 
18911da177e4SLinus Torvalds /****************************************************************************
18921da177e4SLinus Torvalds *   FC Device Config Pages
18931da177e4SLinus Torvalds ****************************************************************************/
18941da177e4SLinus Torvalds 
18951da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_FC_DEVICE_0
18961da177e4SLinus Torvalds {
1897*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
18981da177e4SLinus Torvalds     U64                     WWNN;                       /* 04h */
18991da177e4SLinus Torvalds     U64                     WWPN;                       /* 0Ch */
19001da177e4SLinus Torvalds     U32                     PortIdentifier;             /* 14h */
19011da177e4SLinus Torvalds     U8                      Protocol;                   /* 18h */
19021da177e4SLinus Torvalds     U8                      Flags;                      /* 19h */
19031da177e4SLinus Torvalds     U16                     BBCredit;                   /* 1Ah */
19041da177e4SLinus Torvalds     U16                     MaxRxFrameSize;             /* 1Ch */
19051da177e4SLinus Torvalds     U8                      ADISCHardALPA;              /* 1Eh */
19061da177e4SLinus Torvalds     U8                      PortNumber;                 /* 1Fh */
19071da177e4SLinus Torvalds     U8                      FcPhLowestVersion;          /* 20h */
19081da177e4SLinus Torvalds     U8                      FcPhHighestVersion;         /* 21h */
19091da177e4SLinus Torvalds     U8                      CurrentTargetID;            /* 22h */
19101da177e4SLinus Torvalds     U8                      CurrentBus;                 /* 23h */
1911*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_FC_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_FC_DEVICE_0,
19121da177e4SLinus Torvalds   FCDevicePage0_t, MPI_POINTER pFCDevicePage0_t;
19131da177e4SLinus Torvalds 
19141da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PAGEVERSION                 (0x03)
19151da177e4SLinus Torvalds 
19161da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_FLAGS_TARGETID_BUS_VALID    (0x01)
19171da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_FLAGS_PLOGI_INVALID         (0x02)
19181da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_FLAGS_PRLI_INVALID          (0x04)
19191da177e4SLinus Torvalds 
19201da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PROT_IP                     (0x01)
19211da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PROT_FCP_TARGET             (0x02)
19221da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PROT_FCP_INITIATOR          (0x04)
19231da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PROT_FCP_RETRY              (0x08)
19241da177e4SLinus Torvalds 
19251da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_PORT_MASK      (MPI_FC_DEVICE_PGAD_PORT_MASK)
19261da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_MASK      (MPI_FC_DEVICE_PGAD_FORM_MASK)
19271da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_NEXT_DID  (MPI_FC_DEVICE_PGAD_FORM_NEXT_DID)
19281da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_BUS_TID   (MPI_FC_DEVICE_PGAD_FORM_BUS_TID)
19291da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_DID_MASK       (MPI_FC_DEVICE_PGAD_ND_DID_MASK)
19301da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_MASK       (MPI_FC_DEVICE_PGAD_BT_BUS_MASK)
19311da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_SHIFT      (MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT)
19321da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_PGAD_TID_MASK       (MPI_FC_DEVICE_PGAD_BT_TID_MASK)
19331da177e4SLinus Torvalds 
19341da177e4SLinus Torvalds #define MPI_FC_DEVICE_PAGE0_HARD_ALPA_UNKNOWN   (0xFF)
19351da177e4SLinus Torvalds 
19361da177e4SLinus Torvalds /****************************************************************************
19371da177e4SLinus Torvalds *   RAID Volume Config Pages
19381da177e4SLinus Torvalds ****************************************************************************/
19391da177e4SLinus Torvalds 
19401da177e4SLinus Torvalds typedef struct _RAID_VOL0_PHYS_DISK
19411da177e4SLinus Torvalds {
19421da177e4SLinus Torvalds     U16                         Reserved;               /* 00h */
19431da177e4SLinus Torvalds     U8                          PhysDiskMap;            /* 02h */
19441da177e4SLinus Torvalds     U8                          PhysDiskNum;            /* 03h */
19451da177e4SLinus Torvalds } RAID_VOL0_PHYS_DISK, MPI_POINTER PTR_RAID_VOL0_PHYS_DISK,
19461da177e4SLinus Torvalds   RaidVol0PhysDisk_t, MPI_POINTER pRaidVol0PhysDisk_t;
19471da177e4SLinus Torvalds 
19481da177e4SLinus Torvalds #define MPI_RAIDVOL0_PHYSDISK_PRIMARY                   (0x01)
19491da177e4SLinus Torvalds #define MPI_RAIDVOL0_PHYSDISK_SECONDARY                 (0x02)
19501da177e4SLinus Torvalds 
19511da177e4SLinus Torvalds typedef struct _RAID_VOL0_STATUS
19521da177e4SLinus Torvalds {
19531da177e4SLinus Torvalds     U8                          Flags;                  /* 00h */
19541da177e4SLinus Torvalds     U8                          State;                  /* 01h */
19551da177e4SLinus Torvalds     U16                         Reserved;               /* 02h */
19561da177e4SLinus Torvalds } RAID_VOL0_STATUS, MPI_POINTER PTR_RAID_VOL0_STATUS,
19571da177e4SLinus Torvalds   RaidVol0Status_t, MPI_POINTER pRaidVol0Status_t;
19581da177e4SLinus Torvalds 
19591da177e4SLinus Torvalds /* RAID Volume Page 0 VolumeStatus defines */
19601da177e4SLinus Torvalds 
19611da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_FLAG_ENABLED                (0x01)
19621da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_FLAG_QUIESCED               (0x02)
19631da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS     (0x04)
19641da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE        (0x08)
19651da177e4SLinus Torvalds 
19661da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_STATE_OPTIMAL               (0x00)
19671da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_STATE_DEGRADED              (0x01)
19681da177e4SLinus Torvalds #define MPI_RAIDVOL0_STATUS_STATE_FAILED                (0x02)
1969*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOL0_STATUS_STATE_MISSING               (0x03)
19701da177e4SLinus Torvalds 
19711da177e4SLinus Torvalds typedef struct _RAID_VOL0_SETTINGS
19721da177e4SLinus Torvalds {
19731da177e4SLinus Torvalds     U16                         Settings;       /* 00h */
19741da177e4SLinus Torvalds     U8                          HotSparePool;   /* 01h */ /* MPI_RAID_HOT_SPARE_POOL_ */
19751da177e4SLinus Torvalds     U8                          Reserved;       /* 02h */
19761da177e4SLinus Torvalds } RAID_VOL0_SETTINGS, MPI_POINTER PTR_RAID_VOL0_SETTINGS,
19771da177e4SLinus Torvalds   RaidVol0Settings, MPI_POINTER pRaidVol0Settings;
19781da177e4SLinus Torvalds 
19791da177e4SLinus Torvalds /* RAID Volume Page 0 VolumeSettings defines */
19801da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_WRITE_CACHING_ENABLE       (0x0001)
19811da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_OFFLINE_ON_SMART           (0x0002)
19821da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_AUTO_CONFIGURE             (0x0004)
19831da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_PRIORITY_RESYNC            (0x0008)
1984*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOL0_SETTING_FAST_DATA_SCRUBBING_0102   (0x0020) /* obsolete */
19851da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX      (0x0010)
19861da177e4SLinus Torvalds #define MPI_RAIDVOL0_SETTING_USE_DEFAULTS               (0x8000)
19871da177e4SLinus Torvalds 
19881da177e4SLinus Torvalds /* RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk */
19891da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_0                       (0x01)
19901da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_1                       (0x02)
19911da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_2                       (0x04)
19921da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_3                       (0x08)
19931da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_4                       (0x10)
19941da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_5                       (0x20)
19951da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_6                       (0x40)
19961da177e4SLinus Torvalds #define MPI_RAID_HOT_SPARE_POOL_7                       (0x80)
19971da177e4SLinus Torvalds 
19981da177e4SLinus Torvalds /*
19991da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
20001da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
20011da177e4SLinus Torvalds  */
20021da177e4SLinus Torvalds #ifndef MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX
20031da177e4SLinus Torvalds #define MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX        (1)
20041da177e4SLinus Torvalds #endif
20051da177e4SLinus Torvalds 
20061da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_RAID_VOL_0
20071da177e4SLinus Torvalds {
2008*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;         /* 00h */
20091da177e4SLinus Torvalds     U8                      VolumeID;       /* 04h */
20101da177e4SLinus Torvalds     U8                      VolumeBus;      /* 05h */
20111da177e4SLinus Torvalds     U8                      VolumeIOC;      /* 06h */
20121da177e4SLinus Torvalds     U8                      VolumeType;     /* 07h */ /* MPI_RAID_VOL_TYPE_ */
20131da177e4SLinus Torvalds     RAID_VOL0_STATUS        VolumeStatus;   /* 08h */
20141da177e4SLinus Torvalds     RAID_VOL0_SETTINGS      VolumeSettings; /* 0Ch */
20151da177e4SLinus Torvalds     U32                     MaxLBA;         /* 10h */
20161da177e4SLinus Torvalds     U32                     Reserved1;      /* 14h */
20171da177e4SLinus Torvalds     U32                     StripeSize;     /* 18h */
20181da177e4SLinus Torvalds     U32                     Reserved2;      /* 1Ch */
20191da177e4SLinus Torvalds     U32                     Reserved3;      /* 20h */
20201da177e4SLinus Torvalds     U8                      NumPhysDisks;   /* 24h */
2021*c1a71d1cSMoore, Eric Dean      U8                      DataScrubRate;  /* 25h */
2022*c1a71d1cSMoore, Eric Dean      U8                      ResyncRate;     /* 26h */
2023*c1a71d1cSMoore, Eric Dean      U8                      InactiveStatus; /* 27h */
20241da177e4SLinus Torvalds     RAID_VOL0_PHYS_DISK     PhysDisk[MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX];/* 28h */
2025*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_RAID_VOL_0, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_0,
20261da177e4SLinus Torvalds   RaidVolumePage0_t, MPI_POINTER pRaidVolumePage0_t;
20271da177e4SLinus Torvalds 
2028*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_PAGEVERSION                    (0x04)
2029*c1a71d1cSMoore, Eric Dean  
2030*c1a71d1cSMoore, Eric Dean  /* values for RAID Volume Page 0 InactiveStatus field */
2031*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_UNKNOWN_INACTIVE               (0x00)
2032*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_STALE_METADATA_INACTIVE        (0x01)
2033*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_FOREIGN_VOLUME_INACTIVE        (0x02)
2034*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_INSUFFICIENT_RESOURCE_INACTIVE (0x03)
2035*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_CLONE_VOLUME_INACTIVE          (0x04)
2036*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_INSUFFICIENT_METADATA_INACTIVE (0x05)
2037*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE0_PREVIOUSLY_DELETED             (0x06)
2038*c1a71d1cSMoore, Eric Dean  
2039*c1a71d1cSMoore, Eric Dean  
2040*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_RAID_VOL_1
2041*c1a71d1cSMoore, Eric Dean  {
2042*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;         /* 00h */
2043*c1a71d1cSMoore, Eric Dean      U8                      VolumeID;       /* 01h */
2044*c1a71d1cSMoore, Eric Dean      U8                      VolumeBus;      /* 02h */
2045*c1a71d1cSMoore, Eric Dean      U8                      VolumeIOC;      /* 03h */
2046*c1a71d1cSMoore, Eric Dean      U8                      Reserved0;      /* 04h */
2047*c1a71d1cSMoore, Eric Dean      U8                      GUID[24];       /* 05h */
2048*c1a71d1cSMoore, Eric Dean      U8                      Name[32];       /* 20h */
2049*c1a71d1cSMoore, Eric Dean      U64                     WWID;           /* 40h */
2050*c1a71d1cSMoore, Eric Dean      U32                     Reserved1;      /* 48h */
2051*c1a71d1cSMoore, Eric Dean      U32                     Reserved2;      /* 4Ch */
2052*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_RAID_VOL_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_1,
2053*c1a71d1cSMoore, Eric Dean    RaidVolumePage1_t, MPI_POINTER pRaidVolumePage1_t;
2054*c1a71d1cSMoore, Eric Dean  
2055*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDVOLPAGE1_PAGEVERSION                    (0x01)
20561da177e4SLinus Torvalds 
20571da177e4SLinus Torvalds 
20581da177e4SLinus Torvalds /****************************************************************************
20591da177e4SLinus Torvalds *   RAID Physical Disk Config Pages
20601da177e4SLinus Torvalds ****************************************************************************/
20611da177e4SLinus Torvalds 
20621da177e4SLinus Torvalds typedef struct _RAID_PHYS_DISK0_ERROR_DATA
20631da177e4SLinus Torvalds {
20641da177e4SLinus Torvalds     U8                      ErrorCdbByte;               /* 00h */
20651da177e4SLinus Torvalds     U8                      ErrorSenseKey;              /* 01h */
20661da177e4SLinus Torvalds     U16                     Reserved;                   /* 02h */
20671da177e4SLinus Torvalds     U16                     ErrorCount;                 /* 04h */
20681da177e4SLinus Torvalds     U8                      ErrorASC;                   /* 06h */
20691da177e4SLinus Torvalds     U8                      ErrorASCQ;                  /* 07h */
20701da177e4SLinus Torvalds     U16                     SmartCount;                 /* 08h */
20711da177e4SLinus Torvalds     U8                      SmartASC;                   /* 0Ah */
20721da177e4SLinus Torvalds     U8                      SmartASCQ;                  /* 0Bh */
20731da177e4SLinus Torvalds } RAID_PHYS_DISK0_ERROR_DATA, MPI_POINTER PTR_RAID_PHYS_DISK0_ERROR_DATA,
20741da177e4SLinus Torvalds   RaidPhysDisk0ErrorData_t, MPI_POINTER pRaidPhysDisk0ErrorData_t;
20751da177e4SLinus Torvalds 
20761da177e4SLinus Torvalds typedef struct _RAID_PHYS_DISK_INQUIRY_DATA
20771da177e4SLinus Torvalds {
20781da177e4SLinus Torvalds     U8                          VendorID[8];            /* 00h */
20791da177e4SLinus Torvalds     U8                          ProductID[16];          /* 08h */
20801da177e4SLinus Torvalds     U8                          ProductRevLevel[4];     /* 18h */
20811da177e4SLinus Torvalds     U8                          Info[32];               /* 1Ch */
20821da177e4SLinus Torvalds } RAID_PHYS_DISK0_INQUIRY_DATA, MPI_POINTER PTR_RAID_PHYS_DISK0_INQUIRY_DATA,
20831da177e4SLinus Torvalds   RaidPhysDisk0InquiryData, MPI_POINTER pRaidPhysDisk0InquiryData;
20841da177e4SLinus Torvalds 
20851da177e4SLinus Torvalds typedef struct _RAID_PHYS_DISK0_SETTINGS
20861da177e4SLinus Torvalds {
20871da177e4SLinus Torvalds     U8              SepID;              /* 00h */
20881da177e4SLinus Torvalds     U8              SepBus;             /* 01h */
20891da177e4SLinus Torvalds     U8              HotSparePool;       /* 02h */ /* MPI_RAID_HOT_SPARE_POOL_ */
20901da177e4SLinus Torvalds     U8              PhysDiskSettings;   /* 03h */
20911da177e4SLinus Torvalds } RAID_PHYS_DISK0_SETTINGS, MPI_POINTER PTR_RAID_PHYS_DISK0_SETTINGS,
20921da177e4SLinus Torvalds   RaidPhysDiskSettings_t, MPI_POINTER pRaidPhysDiskSettings_t;
20931da177e4SLinus Torvalds 
20941da177e4SLinus Torvalds typedef struct _RAID_PHYS_DISK0_STATUS
20951da177e4SLinus Torvalds {
20961da177e4SLinus Torvalds     U8                              Flags;              /* 00h */
20971da177e4SLinus Torvalds     U8                              State;              /* 01h */
20981da177e4SLinus Torvalds     U16                             Reserved;           /* 02h */
20991da177e4SLinus Torvalds } RAID_PHYS_DISK0_STATUS, MPI_POINTER PTR_RAID_PHYS_DISK0_STATUS,
21001da177e4SLinus Torvalds   RaidPhysDiskStatus_t, MPI_POINTER pRaidPhysDiskStatus_t;
21011da177e4SLinus Torvalds 
21021da177e4SLinus Torvalds /* RAID Volume 2 IM Physical Disk DiskStatus flags */
21031da177e4SLinus Torvalds 
21041da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC           (0x01)
21051da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED              (0x02)
2106*c1a71d1cSMoore, Eric Dean  #define MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME       (0x04)
21071da177e4SLinus Torvalds 
21081da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_ONLINE                     (0x00)
21091da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_MISSING                    (0x01)
21101da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE             (0x02)
21111da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_FAILED                     (0x03)
21121da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_INITIALIZING               (0x04)
21131da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED          (0x05)
21141da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_FAILED_REQUESTED           (0x06)
21151da177e4SLinus Torvalds #define MPI_PHYSDISK0_STATUS_OTHER_OFFLINE              (0xFF)
21161da177e4SLinus Torvalds 
21171da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_0
21181da177e4SLinus Torvalds {
2119*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER              Header;             /* 00h */
21201da177e4SLinus Torvalds     U8                              PhysDiskID;         /* 04h */
21211da177e4SLinus Torvalds     U8                              PhysDiskBus;        /* 05h */
21221da177e4SLinus Torvalds     U8                              PhysDiskIOC;        /* 06h */
21231da177e4SLinus Torvalds     U8                              PhysDiskNum;        /* 07h */
21241da177e4SLinus Torvalds     RAID_PHYS_DISK0_SETTINGS        PhysDiskSettings;   /* 08h */
21251da177e4SLinus Torvalds     U32                             Reserved1;          /* 0Ch */
2126*c1a71d1cSMoore, Eric Dean      U8                              ExtDiskIdentifier[8]; /* 10h */
21271da177e4SLinus Torvalds     U8                              DiskIdentifier[16]; /* 18h */
21281da177e4SLinus Torvalds     RAID_PHYS_DISK0_INQUIRY_DATA    InquiryData;        /* 28h */
21291da177e4SLinus Torvalds     RAID_PHYS_DISK0_STATUS          PhysDiskStatus;     /* 64h */
21301da177e4SLinus Torvalds     U32                             MaxLBA;             /* 68h */
21311da177e4SLinus Torvalds     RAID_PHYS_DISK0_ERROR_DATA      ErrorData;          /* 6Ch */
2132*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_RAID_PHYS_DISK_0, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_0,
21331da177e4SLinus Torvalds   RaidPhysDiskPage0_t, MPI_POINTER pRaidPhysDiskPage0_t;
21341da177e4SLinus Torvalds 
2135*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDPHYSDISKPAGE0_PAGEVERSION           (0x01)
2136*c1a71d1cSMoore, Eric Dean  
2137*c1a71d1cSMoore, Eric Dean  
2138*c1a71d1cSMoore, Eric Dean  typedef struct _RAID_PHYS_DISK1_PATH
2139*c1a71d1cSMoore, Eric Dean  {
2140*c1a71d1cSMoore, Eric Dean      U8                              PhysDiskID;         /* 00h */
2141*c1a71d1cSMoore, Eric Dean      U8                              PhysDiskBus;        /* 01h */
2142*c1a71d1cSMoore, Eric Dean      U16                             Reserved1;          /* 02h */
2143*c1a71d1cSMoore, Eric Dean      U64                             WWID;               /* 04h */
2144*c1a71d1cSMoore, Eric Dean      U64                             OwnerWWID;          /* 0Ch */
2145*c1a71d1cSMoore, Eric Dean      U8                              OwnerIdentifier;    /* 14h */
2146*c1a71d1cSMoore, Eric Dean      U8                              Reserved2;          /* 15h */
2147*c1a71d1cSMoore, Eric Dean      U16                             Flags;              /* 16h */
2148*c1a71d1cSMoore, Eric Dean  } RAID_PHYS_DISK1_PATH, MPI_POINTER PTR_RAID_PHYS_DISK1_PATH,
2149*c1a71d1cSMoore, Eric Dean    RaidPhysDisk1Path_t, MPI_POINTER pRaidPhysDisk1Path_t;
2150*c1a71d1cSMoore, Eric Dean  
2151*c1a71d1cSMoore, Eric Dean  /* RAID Physical Disk Page 1 Flags field defines */
2152*c1a71d1cSMoore, Eric Dean  #define MPI_RAID_PHYSDISK1_FLAG_BROKEN          (0x0002)
2153*c1a71d1cSMoore, Eric Dean  #define MPI_RAID_PHYSDISK1_FLAG_INVALID         (0x0001)
2154*c1a71d1cSMoore, Eric Dean  
2155*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_1
2156*c1a71d1cSMoore, Eric Dean  {
2157*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER              Header;             /* 00h */
2158*c1a71d1cSMoore, Eric Dean      U8                              NumPhysDiskPaths;   /* 04h */
2159*c1a71d1cSMoore, Eric Dean      U8                              PhysDiskNum;        /* 05h */
2160*c1a71d1cSMoore, Eric Dean      U16                             Reserved2;          /* 06h */
2161*c1a71d1cSMoore, Eric Dean      U32                             Reserved1;          /* 08h */
2162*c1a71d1cSMoore, Eric Dean      RAID_PHYS_DISK1_PATH            Path[1];            /* 0Ch */
2163*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_RAID_PHYS_DISK_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_1,
2164*c1a71d1cSMoore, Eric Dean    RaidPhysDiskPage1_t, MPI_POINTER pRaidPhysDiskPage1_t;
2165*c1a71d1cSMoore, Eric Dean  
2166*c1a71d1cSMoore, Eric Dean  #define MPI_RAIDPHYSDISKPAGE1_PAGEVERSION       (0x00)
21671da177e4SLinus Torvalds 
21681da177e4SLinus Torvalds 
21691da177e4SLinus Torvalds /****************************************************************************
21701da177e4SLinus Torvalds *   LAN Config Pages
21711da177e4SLinus Torvalds ****************************************************************************/
21721da177e4SLinus Torvalds 
21731da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_LAN_0
21741da177e4SLinus Torvalds {
21751da177e4SLinus Torvalds     ConfigPageHeader_t      Header;                     /* 00h */
21761da177e4SLinus Torvalds     U16                     TxRxModes;                  /* 04h */
21771da177e4SLinus Torvalds     U16                     Reserved;                   /* 06h */
21781da177e4SLinus Torvalds     U32                     PacketPrePad;               /* 08h */
2179*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_LAN_0, MPI_POINTER PTR_CONFIG_PAGE_LAN_0,
21801da177e4SLinus Torvalds   LANPage0_t, MPI_POINTER pLANPage0_t;
21811da177e4SLinus Torvalds 
21821da177e4SLinus Torvalds #define MPI_LAN_PAGE0_PAGEVERSION                       (0x01)
21831da177e4SLinus Torvalds 
21841da177e4SLinus Torvalds #define MPI_LAN_PAGE0_RETURN_LOOPBACK                   (0x0000)
21851da177e4SLinus Torvalds #define MPI_LAN_PAGE0_SUPPRESS_LOOPBACK                 (0x0001)
21861da177e4SLinus Torvalds #define MPI_LAN_PAGE0_LOOPBACK_MASK                     (0x0001)
21871da177e4SLinus Torvalds 
21881da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_LAN_1
21891da177e4SLinus Torvalds {
21901da177e4SLinus Torvalds     ConfigPageHeader_t      Header;                     /* 00h */
21911da177e4SLinus Torvalds     U16                     Reserved;                   /* 04h */
21921da177e4SLinus Torvalds     U8                      CurrentDeviceState;         /* 06h */
21931da177e4SLinus Torvalds     U8                      Reserved1;                  /* 07h */
21941da177e4SLinus Torvalds     U32                     MinPacketSize;              /* 08h */
21951da177e4SLinus Torvalds     U32                     MaxPacketSize;              /* 0Ch */
21961da177e4SLinus Torvalds     U32                     HardwareAddressLow;         /* 10h */
21971da177e4SLinus Torvalds     U32                     HardwareAddressHigh;        /* 14h */
21981da177e4SLinus Torvalds     U32                     MaxWireSpeedLow;            /* 18h */
21991da177e4SLinus Torvalds     U32                     MaxWireSpeedHigh;           /* 1Ch */
22001da177e4SLinus Torvalds     U32                     BucketsRemaining;           /* 20h */
22011da177e4SLinus Torvalds     U32                     MaxReplySize;               /* 24h */
22021da177e4SLinus Torvalds     U32                     NegWireSpeedLow;            /* 28h */
22031da177e4SLinus Torvalds     U32                     NegWireSpeedHigh;           /* 2Ch */
2204*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_LAN_1, MPI_POINTER PTR_CONFIG_PAGE_LAN_1,
22051da177e4SLinus Torvalds   LANPage1_t, MPI_POINTER pLANPage1_t;
22061da177e4SLinus Torvalds 
22071da177e4SLinus Torvalds #define MPI_LAN_PAGE1_PAGEVERSION                       (0x03)
22081da177e4SLinus Torvalds 
22091da177e4SLinus Torvalds #define MPI_LAN_PAGE1_DEV_STATE_RESET                   (0x00)
22101da177e4SLinus Torvalds #define MPI_LAN_PAGE1_DEV_STATE_OPERATIONAL             (0x01)
22111da177e4SLinus Torvalds 
22121da177e4SLinus Torvalds 
22131da177e4SLinus Torvalds /****************************************************************************
22141da177e4SLinus Torvalds *   Inband Config Pages
22151da177e4SLinus Torvalds ****************************************************************************/
22161da177e4SLinus Torvalds 
22171da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_INBAND_0
22181da177e4SLinus Torvalds {
2219*c1a71d1cSMoore, Eric Dean      CONFIG_PAGE_HEADER      Header;                     /* 00h */
22201da177e4SLinus Torvalds     MPI_VERSION_FORMAT      InbandVersion;              /* 04h */
22211da177e4SLinus Torvalds     U16                     MaximumBuffers;             /* 08h */
22221da177e4SLinus Torvalds     U16                     Reserved1;                  /* 0Ah */
2223*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_INBAND_0, MPI_POINTER PTR_CONFIG_PAGE_INBAND_0,
22241da177e4SLinus Torvalds   InbandPage0_t, MPI_POINTER pInbandPage0_t;
22251da177e4SLinus Torvalds 
22261da177e4SLinus Torvalds #define MPI_INBAND_PAGEVERSION          (0x00)
22271da177e4SLinus Torvalds 
22281da177e4SLinus Torvalds 
22291da177e4SLinus Torvalds 
22301da177e4SLinus Torvalds /****************************************************************************
22311da177e4SLinus Torvalds *   SAS IO Unit Config Pages
22321da177e4SLinus Torvalds ****************************************************************************/
22331da177e4SLinus Torvalds 
22341da177e4SLinus Torvalds typedef struct _MPI_SAS_IO_UNIT0_PHY_DATA
22351da177e4SLinus Torvalds {
22361da177e4SLinus Torvalds     U8          Port;                   /* 00h */
22371da177e4SLinus Torvalds     U8          PortFlags;              /* 01h */
22381da177e4SLinus Torvalds     U8          PhyFlags;               /* 02h */
22391da177e4SLinus Torvalds     U8          NegotiatedLinkRate;     /* 03h */
22401da177e4SLinus Torvalds     U32         ControllerPhyDeviceInfo;/* 04h */
22411da177e4SLinus Torvalds     U16         AttachedDeviceHandle;   /* 08h */
22421da177e4SLinus Torvalds     U16         ControllerDevHandle;    /* 0Ah */
2243*c1a71d1cSMoore, Eric Dean      U32         DiscoveryStatus;        /* 0Ch */
22441da177e4SLinus Torvalds } MPI_SAS_IO_UNIT0_PHY_DATA, MPI_POINTER PTR_MPI_SAS_IO_UNIT0_PHY_DATA,
22451da177e4SLinus Torvalds   SasIOUnit0PhyData, MPI_POINTER pSasIOUnit0PhyData;
22461da177e4SLinus Torvalds 
22471da177e4SLinus Torvalds /*
22481da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
22491da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
22501da177e4SLinus Torvalds  */
22511da177e4SLinus Torvalds #ifndef MPI_SAS_IOUNIT0_PHY_MAX
22521da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PHY_MAX         (1)
22531da177e4SLinus Torvalds #endif
22541da177e4SLinus Torvalds 
22551da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0
22561da177e4SLinus Torvalds {
2257*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER     Header;                             /* 00h */
22581da177e4SLinus Torvalds     U32                             Reserved1;                          /* 08h */
22591da177e4SLinus Torvalds     U8                              NumPhys;                            /* 0Ch */
22601da177e4SLinus Torvalds     U8                              Reserved2;                          /* 0Dh */
22611da177e4SLinus Torvalds     U16                             Reserved3;                          /* 0Eh */
22621da177e4SLinus Torvalds     MPI_SAS_IO_UNIT0_PHY_DATA       PhyData[MPI_SAS_IOUNIT0_PHY_MAX];   /* 10h */
2263*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_0,
22641da177e4SLinus Torvalds   SasIOUnitPage0_t, MPI_POINTER pSasIOUnitPage0_t;
22651da177e4SLinus Torvalds 
2266*c1a71d1cSMoore, Eric Dean  #define MPI_SASIOUNITPAGE0_PAGEVERSION      (0x02)
22671da177e4SLinus Torvalds 
22681da177e4SLinus Torvalds /* values for SAS IO Unit Page 0 PortFlags */
22691da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS    (0x08)
22701da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PORT_FLAGS_0_TARGET_IOC_NUM         (0x00)
22711da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PORT_FLAGS_1_TARGET_IOC_NUM         (0x04)
22721da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PORT_FLAGS_AUTO_PORT_CONFIG         (0x01)
22731da177e4SLinus Torvalds 
22741da177e4SLinus Torvalds /* values for SAS IO Unit Page 0 PhyFlags */
22751da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PHY_FLAGS_PHY_DISABLED              (0x04)
22761da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PHY_FLAGS_TX_INVERT                 (0x02)
22771da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_PHY_FLAGS_RX_INVERT                 (0x01)
22781da177e4SLinus Torvalds 
22791da177e4SLinus Torvalds /* values for SAS IO Unit Page 0 NegotiatedLinkRate */
22801da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_UNKNOWN                        (0x00)
22811da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_PHY_DISABLED                   (0x01)
22821da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION       (0x02)
22831da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE              (0x03)
22841da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_1_5                            (0x08)
22851da177e4SLinus Torvalds #define MPI_SAS_IOUNIT0_RATE_3_0                            (0x09)
22861da177e4SLinus Torvalds 
22871da177e4SLinus Torvalds /* see mpi_sas.h for values for SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
22881da177e4SLinus Torvalds 
2289*c1a71d1cSMoore, Eric Dean  /* values for SAS IO Unit Page 0 DiscoveryStatus */
2290*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_LOOP_DETECTED                    (0x00000001)
2291*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_UNADDRESSABLE_DEVICE             (0x00000002)
2292*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_MULTIPLE_PORTS                   (0x00000004)
2293*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_EXPANDER_ERR                     (0x00000008)
2294*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_SMP_TIMEOUT                      (0x00000010)
2295*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_OUT_ROUTE_ENTRIES                (0x00000020)
2296*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_INDEX_NOT_EXIST                  (0x00000040)
2297*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_SMP_FUNCTION_FAILED              (0x00000080)
2298*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_SMP_CRC_ERROR                    (0x00000100)
2299*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_SUBTRACTIVE_LINK                 (0x00000200)
2300*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_TABLE_LINK                       (0x00000400)
2301*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT0_DS_UNSUPPORTED_DEVICE               (0x00000800)
2302*c1a71d1cSMoore, Eric Dean  
23031da177e4SLinus Torvalds 
23041da177e4SLinus Torvalds typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA
23051da177e4SLinus Torvalds {
23061da177e4SLinus Torvalds     U8          Port;                   /* 00h */
23071da177e4SLinus Torvalds     U8          PortFlags;              /* 01h */
23081da177e4SLinus Torvalds     U8          PhyFlags;               /* 02h */
23091da177e4SLinus Torvalds     U8          MaxMinLinkRate;         /* 03h */
23101da177e4SLinus Torvalds     U32         ControllerPhyDeviceInfo;/* 04h */
23111da177e4SLinus Torvalds     U32         Reserved1;              /* 08h */
23121da177e4SLinus Torvalds } MPI_SAS_IO_UNIT1_PHY_DATA, MPI_POINTER PTR_MPI_SAS_IO_UNIT1_PHY_DATA,
23131da177e4SLinus Torvalds   SasIOUnit1PhyData, MPI_POINTER pSasIOUnit1PhyData;
23141da177e4SLinus Torvalds 
23151da177e4SLinus Torvalds /*
23161da177e4SLinus Torvalds  * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
23171da177e4SLinus Torvalds  * one and check Header.PageLength at runtime.
23181da177e4SLinus Torvalds  */
23191da177e4SLinus Torvalds #ifndef MPI_SAS_IOUNIT1_PHY_MAX
23201da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PHY_MAX         (1)
23211da177e4SLinus Torvalds #endif
23221da177e4SLinus Torvalds 
23231da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1
23241da177e4SLinus Torvalds {
2325*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER Header;                             /* 00h */
2326*c1a71d1cSMoore, Eric Dean      U16                         ControlFlags;                       /* 08h */
2327*c1a71d1cSMoore, Eric Dean      U16                         MaxNumSATATargets;                  /* 0Ah */
2328*c1a71d1cSMoore, Eric Dean      U32                         Reserved1;                          /* 0Ch */
2329*c1a71d1cSMoore, Eric Dean      U8                          NumPhys;                            /* 10h */
2330*c1a71d1cSMoore, Eric Dean      U8                          SATAMaxQDepth;                      /* 11h */
2331*c1a71d1cSMoore, Eric Dean      U16                         Reserved2;                          /* 12h */
2332*c1a71d1cSMoore, Eric Dean      MPI_SAS_IO_UNIT1_PHY_DATA   PhyData[MPI_SAS_IOUNIT1_PHY_MAX];   /* 14h */
2333*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_1,
23341da177e4SLinus Torvalds   SasIOUnitPage1_t, MPI_POINTER pSasIOUnitPage1_t;
23351da177e4SLinus Torvalds 
2336*c1a71d1cSMoore, Eric Dean  #define MPI_SASIOUNITPAGE1_PAGEVERSION      (0x04)
23371da177e4SLinus Torvalds 
2338*c1a71d1cSMoore, Eric Dean  /* values for SAS IO Unit Page 1 ControlFlags */
2339*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_3_0_MAX            (0x4000)
2340*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_1_5_MAX            (0x2000)
2341*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_SW_PRESERVE        (0x1000)
2342*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_DISABLE_SAS_HASH        (0x0800)
2343*c1a71d1cSMoore, Eric Dean  
2344*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_MASK_DEV_SUPPORT        (0x0600)
2345*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SHIFT_DEV_SUPPORT       (9)
2346*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_DEV_SUPPORT_BOTH        (0x00)
2347*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_DEV_SAS_SUPPORT         (0x01)
2348*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_DEV_SATA_SUPPORT        (0x10)
2349*c1a71d1cSMoore, Eric Dean  
2350*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_AUTO_PORT_SAME_SAS_ADDR (0x0100)
2351*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED (0x0080)
2352*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_SMART_REQUIRED     (0x0040)
2353*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_NCQ_REQUIRED       (0x0020)
2354*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SATA_FUA_REQUIRED       (0x0010)
2355*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_PHY_ENABLE_ORDER_HIGH   (0x0008)
2356*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL     (0x0004)
2357*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY     (0x0002)
2358*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION       (0x0001)
2359*c1a71d1cSMoore, Eric Dean  
2360*c1a71d1cSMoore, Eric Dean  /* values for SAS IO Unit Page 1 PortFlags */
23611da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PORT_FLAGS_0_TARGET_IOC_NUM     (0x00)
23621da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PORT_FLAGS_1_TARGET_IOC_NUM     (0x04)
23631da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG     (0x01)
23641da177e4SLinus Torvalds 
23651da177e4SLinus Torvalds /* values for SAS IO Unit Page 0 PhyFlags */
23661da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE           (0x04)
23671da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PHY_FLAGS_TX_INVERT             (0x02)
23681da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_PHY_FLAGS_RX_INVERT             (0x01)
23691da177e4SLinus Torvalds 
23701da177e4SLinus Torvalds /* values for SAS IO Unit Page 0 MaxMinLinkRate */
23711da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MAX_RATE_MASK                   (0xF0)
23721da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MAX_RATE_1_5                    (0x80)
23731da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MAX_RATE_3_0                    (0x90)
23741da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MIN_RATE_MASK                   (0x0F)
23751da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MIN_RATE_1_5                    (0x08)
23761da177e4SLinus Torvalds #define MPI_SAS_IOUNIT1_MIN_RATE_3_0                    (0x09)
23771da177e4SLinus Torvalds 
23781da177e4SLinus Torvalds /* see mpi_sas.h for values for SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
23791da177e4SLinus Torvalds 
23801da177e4SLinus Torvalds 
23811da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_IO_UNIT_2
23821da177e4SLinus Torvalds {
2383*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
23841da177e4SLinus Torvalds     U32                                 Reserved1;              /* 08h */
23851da177e4SLinus Torvalds     U16                                 MaxPersistentIDs;       /* 0Ch */
23861da177e4SLinus Torvalds     U16                                 NumPersistentIDsUsed;   /* 0Eh */
23871da177e4SLinus Torvalds     U8                                  Status;                 /* 10h */
23881da177e4SLinus Torvalds     U8                                  Flags;                  /* 11h */
2389*c1a71d1cSMoore, Eric Dean      U16                                 MaxNumPhysicalMappedIDs;/* 12h */              /* 12h */
2390*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_2,
23911da177e4SLinus Torvalds   SasIOUnitPage2_t, MPI_POINTER pSasIOUnitPage2_t;
23921da177e4SLinus Torvalds 
2393*c1a71d1cSMoore, Eric Dean  #define MPI_SASIOUNITPAGE2_PAGEVERSION      (0x03)
23941da177e4SLinus Torvalds 
23951da177e4SLinus Torvalds /* values for SAS IO Unit Page 2 Status field */
23961da177e4SLinus Torvalds #define MPI_SAS_IOUNIT2_STATUS_DISABLED_PERSISTENT_MAPPINGS (0x02)
23971da177e4SLinus Torvalds #define MPI_SAS_IOUNIT2_STATUS_FULL_PERSISTENT_MAPPINGS     (0x01)
23981da177e4SLinus Torvalds 
23991da177e4SLinus Torvalds /* values for SAS IO Unit Page 2 Flags field */
24001da177e4SLinus Torvalds #define MPI_SAS_IOUNIT2_FLAGS_DISABLE_PERSISTENT_MAPPINGS   (0x01)
2401*c1a71d1cSMoore, Eric Dean  /* Physical Mapping Modes */
2402*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_MASK_PHYS_MAP_MODE            (0x0E)
2403*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_SHIFT_PHYS_MAP_MODE           (1)
2404*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_NO_PHYS_MAP                   (0x00)
2405*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_DIRECT_ATTACH_PHYS_MAP        (0x01)
2406*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_ENCLOSURE_SLOT_PHYS_MAP       (0x02)
2407*c1a71d1cSMoore, Eric Dean  
2408*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_IOUNIT2_FLAGS_RESERVE_ID_0_FOR_BOOT         (0x10)
24091da177e4SLinus Torvalds 
24101da177e4SLinus Torvalds 
24111da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_IO_UNIT_3
24121da177e4SLinus Torvalds {
2413*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER Header;                         /* 00h */
24141da177e4SLinus Torvalds     U32                         Reserved1;                      /* 08h */
24151da177e4SLinus Torvalds     U32                         MaxInvalidDwordCount;           /* 0Ch */
24161da177e4SLinus Torvalds     U32                         InvalidDwordCountTime;          /* 10h */
24171da177e4SLinus Torvalds     U32                         MaxRunningDisparityErrorCount;  /* 14h */
24181da177e4SLinus Torvalds     U32                         RunningDisparityErrorTime;      /* 18h */
24191da177e4SLinus Torvalds     U32                         MaxLossDwordSynchCount;         /* 1Ch */
24201da177e4SLinus Torvalds     U32                         LossDwordSynchCountTime;        /* 20h */
24211da177e4SLinus Torvalds     U32                         MaxPhyResetProblemCount;        /* 24h */
24221da177e4SLinus Torvalds     U32                         PhyResetProblemTime;            /* 28h */
2423*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_IO_UNIT_3, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_3,
24241da177e4SLinus Torvalds   SasIOUnitPage3_t, MPI_POINTER pSasIOUnitPage3_t;
24251da177e4SLinus Torvalds 
24261da177e4SLinus Torvalds #define MPI_SASIOUNITPAGE3_PAGEVERSION      (0x00)
24271da177e4SLinus Torvalds 
24281da177e4SLinus Torvalds 
2429*c1a71d1cSMoore, Eric Dean  /****************************************************************************
2430*c1a71d1cSMoore, Eric Dean  *   SAS Expander Config Pages
2431*c1a71d1cSMoore, Eric Dean  ****************************************************************************/
2432*c1a71d1cSMoore, Eric Dean  
24331da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_EXPANDER_0
24341da177e4SLinus Torvalds {
2435*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
2436*c1a71d1cSMoore, Eric Dean      U8                                  PhysicalPort;           /* 08h */
2437*c1a71d1cSMoore, Eric Dean      U8                                  Reserved1;              /* 09h */
2438*c1a71d1cSMoore, Eric Dean      U16                                 Reserved2;              /* 0Ah */
24391da177e4SLinus Torvalds     U64                                 SASAddress;             /* 0Ch */
2440*c1a71d1cSMoore, Eric Dean      U32                                 DiscoveryStatus;        /* 14h */
24411da177e4SLinus Torvalds     U16                                 DevHandle;              /* 18h */
24421da177e4SLinus Torvalds     U16                                 ParentDevHandle;        /* 1Ah */
24431da177e4SLinus Torvalds     U16                                 ExpanderChangeCount;    /* 1Ch */
24441da177e4SLinus Torvalds     U16                                 ExpanderRouteIndexes;   /* 1Eh */
24451da177e4SLinus Torvalds     U8                                  NumPhys;                /* 20h */
24461da177e4SLinus Torvalds     U8                                  SASLevel;               /* 21h */
24471da177e4SLinus Torvalds     U8                                  Flags;                  /* 22h */
24481da177e4SLinus Torvalds     U8                                  Reserved3;              /* 23h */
2449*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_EXPANDER_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_EXPANDER_0,
24501da177e4SLinus Torvalds   SasExpanderPage0_t, MPI_POINTER pSasExpanderPage0_t;
24511da177e4SLinus Torvalds 
2452*c1a71d1cSMoore, Eric Dean  #define MPI_SASEXPANDER0_PAGEVERSION        (0x02)
2453*c1a71d1cSMoore, Eric Dean  
2454*c1a71d1cSMoore, Eric Dean  /* values for SAS Expander Page 0 DiscoveryStatus field */
2455*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_LOOP_DETECTED              (0x00000001)
2456*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_UNADDRESSABLE_DEVICE       (0x00000002)
2457*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_MULTIPLE_PORTS             (0x00000004)
2458*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_EXPANDER_ERR               (0x00000008)
2459*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_SMP_TIMEOUT                (0x00000010)
2460*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_OUT_ROUTE_ENTRIES          (0x00000020)
2461*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_INDEX_NOT_EXIST            (0x00000040)
2462*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_SMP_FUNCTION_FAILED        (0x00000080)
2463*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_SMP_CRC_ERROR              (0x00000100)
2464*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_SUBTRACTIVE_LINK           (0x00000200)
2465*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_TABLE_LINK                 (0x00000400)
2466*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE         (0x00000800)
24671da177e4SLinus Torvalds 
24681da177e4SLinus Torvalds /* values for SAS Expander Page 0 Flags field */
24691da177e4SLinus Torvalds #define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG      (0x02)
24701da177e4SLinus Torvalds #define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS      (0x01)
24711da177e4SLinus Torvalds 
24721da177e4SLinus Torvalds 
2473*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_SAS_EXPANDER_1
2474*c1a71d1cSMoore, Eric Dean  {
2475*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER Header;                 /* 00h */
2476*c1a71d1cSMoore, Eric Dean      U8                          PhysicalPort;           /* 08h */
2477*c1a71d1cSMoore, Eric Dean      U8                          Reserved1;              /* 09h */
2478*c1a71d1cSMoore, Eric Dean      U16                         Reserved2;              /* 0Ah */
2479*c1a71d1cSMoore, Eric Dean      U8                          NumPhys;                /* 0Ch */
2480*c1a71d1cSMoore, Eric Dean      U8                          Phy;                    /* 0Dh */
2481*c1a71d1cSMoore, Eric Dean      U16                         NumTableEntriesProgrammed; /* 0Eh */
2482*c1a71d1cSMoore, Eric Dean      U8                          ProgrammedLinkRate;     /* 10h */
2483*c1a71d1cSMoore, Eric Dean      U8                          HwLinkRate;             /* 11h */
2484*c1a71d1cSMoore, Eric Dean      U16                         AttachedDevHandle;      /* 12h */
2485*c1a71d1cSMoore, Eric Dean      U32                         PhyInfo;                /* 14h */
2486*c1a71d1cSMoore, Eric Dean      U32                         AttachedDeviceInfo;     /* 18h */
2487*c1a71d1cSMoore, Eric Dean      U16                         OwnerDevHandle;         /* 1Ch */
2488*c1a71d1cSMoore, Eric Dean      U8                          ChangeCount;            /* 1Eh */
2489*c1a71d1cSMoore, Eric Dean      U8                          NegotiatedLinkRate;     /* 1Fh */
2490*c1a71d1cSMoore, Eric Dean      U8                          PhyIdentifier;          /* 20h */
2491*c1a71d1cSMoore, Eric Dean      U8                          AttachedPhyIdentifier;  /* 21h */
2492*c1a71d1cSMoore, Eric Dean      U8                          NumTableEntriesProg;    /* 22h */
2493*c1a71d1cSMoore, Eric Dean      U8                          DiscoveryInfo;          /* 23h */
2494*c1a71d1cSMoore, Eric Dean      U32                         Reserved3;              /* 24h */
2495*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_EXPANDER_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_EXPANDER_1,
2496*c1a71d1cSMoore, Eric Dean    SasExpanderPage1_t, MPI_POINTER pSasExpanderPage1_t;
2497*c1a71d1cSMoore, Eric Dean  
2498*c1a71d1cSMoore, Eric Dean  #define MPI_SASEXPANDER1_PAGEVERSION        (0x01)
2499*c1a71d1cSMoore, Eric Dean  
2500*c1a71d1cSMoore, Eric Dean  /* use MPI_SAS_PHY0_PRATE_ defines for ProgrammedLinkRate */
2501*c1a71d1cSMoore, Eric Dean  
2502*c1a71d1cSMoore, Eric Dean  /* use MPI_SAS_PHY0_HWRATE_ defines for HwLinkRate */
2503*c1a71d1cSMoore, Eric Dean  
2504*c1a71d1cSMoore, Eric Dean  /* use MPI_SAS_PHY0_PHYINFO_ defines for PhyInfo */
2505*c1a71d1cSMoore, Eric Dean  
2506*c1a71d1cSMoore, Eric Dean  /* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */
2507*c1a71d1cSMoore, Eric Dean  
2508*c1a71d1cSMoore, Eric Dean  /* values for SAS Expander Page 1 DiscoveryInfo field */
2509*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY DISABLED     (0x04)
2510*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE   (0x02)
2511*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES   (0x01)
2512*c1a71d1cSMoore, Eric Dean  
2513*c1a71d1cSMoore, Eric Dean  /* values for SAS Expander Page 1 NegotiatedLinkRate field */
2514*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_UNKNOWN              (0x00)
2515*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_PHY_DISABLED         (0x01)
2516*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_FAILED_NEGOTIATION   (0x02)
2517*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_SATA_OOB_COMPLETE    (0x03)
2518*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_1_5                  (0x08)
2519*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_EXPANDER1_NEG_RATE_3_0                  (0x09)
2520*c1a71d1cSMoore, Eric Dean  
2521*c1a71d1cSMoore, Eric Dean  
2522*c1a71d1cSMoore, Eric Dean  /****************************************************************************
2523*c1a71d1cSMoore, Eric Dean  *   SAS Device Config Pages
2524*c1a71d1cSMoore, Eric Dean  ****************************************************************************/
2525*c1a71d1cSMoore, Eric Dean  
25261da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_DEVICE_0
25271da177e4SLinus Torvalds {
2528*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
2529*c1a71d1cSMoore, Eric Dean      U16                                 Slot;                   /* 08h */
2530*c1a71d1cSMoore, Eric Dean      U16                                 EnclosureHandle;        /* 0Ah */
25311da177e4SLinus Torvalds     U64                                 SASAddress;             /* 0Ch */
2532*c1a71d1cSMoore, Eric Dean      U16                                 ParentDevHandle;        /* 14h */
2533*c1a71d1cSMoore, Eric Dean      U8                                  PhyNum;                 /* 16h */
2534*c1a71d1cSMoore, Eric Dean      U8                                  AccessStatus;           /* 17h */
25351da177e4SLinus Torvalds     U16                                 DevHandle;              /* 18h */
25361da177e4SLinus Torvalds     U8                                  TargetID;               /* 1Ah */
25371da177e4SLinus Torvalds     U8                                  Bus;                    /* 1Bh */
25381da177e4SLinus Torvalds     U32                                 DeviceInfo;             /* 1Ch */
25391da177e4SLinus Torvalds     U16                                 Flags;                  /* 20h */
25401da177e4SLinus Torvalds     U8                                  PhysicalPort;           /* 22h */
2541*c1a71d1cSMoore, Eric Dean      U8                                  Reserved2;              /* 23h */
2542*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_0,
25431da177e4SLinus Torvalds   SasDevicePage0_t, MPI_POINTER pSasDevicePage0_t;
25441da177e4SLinus Torvalds 
2545*c1a71d1cSMoore, Eric Dean  #define MPI_SASDEVICE0_PAGEVERSION          (0x04)
2546*c1a71d1cSMoore, Eric Dean  
2547*c1a71d1cSMoore, Eric Dean  /* values for SAS Device Page 0 AccessStatus field */
2548*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_ASTATUS_NO_ERRORS               (0x00)
2549*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED        (0x01)
2550*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED  (0x02)
25511da177e4SLinus Torvalds 
25521da177e4SLinus Torvalds /* values for SAS Device Page 0 Flags field */
2553*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_SATA_SW_PRESERVE          (0x0200)
2554*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_UNSUPPORTED_DEVICE        (0x0100)
2555*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_SATA_48BIT_LBA_SUPPORTED  (0x0080)
2556*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_SATA_SMART_SUPPORTED      (0x0040)
2557*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED        (0x0020)
2558*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED        (0x0010)
2559*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH      (0x0008)
2560*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_MAPPING_PERSISTENT        (0x0004)
2561*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED             (0x0002)
2562*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT            (0x0001)
25631da177e4SLinus Torvalds 
25641da177e4SLinus Torvalds /* see mpi_sas.h for values for SAS Device Page 0 DeviceInfo values */
25651da177e4SLinus Torvalds 
25661da177e4SLinus Torvalds 
25671da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_DEVICE_1
25681da177e4SLinus Torvalds {
2569*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
25701da177e4SLinus Torvalds     U32                                 Reserved1;              /* 08h */
25711da177e4SLinus Torvalds     U64                                 SASAddress;             /* 0Ch */
25721da177e4SLinus Torvalds     U32                                 Reserved2;              /* 14h */
25731da177e4SLinus Torvalds     U16                                 DevHandle;              /* 18h */
25741da177e4SLinus Torvalds     U8                                  TargetID;               /* 1Ah */
25751da177e4SLinus Torvalds     U8                                  Bus;                    /* 1Bh */
25761da177e4SLinus Torvalds     U8                                  InitialRegDeviceFIS[20];/* 1Ch */
2577*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_DEVICE_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_1,
25781da177e4SLinus Torvalds   SasDevicePage1_t, MPI_POINTER pSasDevicePage1_t;
25791da177e4SLinus Torvalds 
25801da177e4SLinus Torvalds #define MPI_SASDEVICE1_PAGEVERSION          (0x00)
25811da177e4SLinus Torvalds 
25821da177e4SLinus Torvalds 
2583*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_SAS_DEVICE_2
2584*c1a71d1cSMoore, Eric Dean  {
2585*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
2586*c1a71d1cSMoore, Eric Dean      U64                                 PhysicalIdentifier;     /* 08h */
2587*c1a71d1cSMoore, Eric Dean      U32                                 Reserved1;              /* 10h */
2588*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_DEVICE_2, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_2,
2589*c1a71d1cSMoore, Eric Dean    SasDevicePage2_t, MPI_POINTER pSasDevicePage2_t;
2590*c1a71d1cSMoore, Eric Dean  
2591*c1a71d1cSMoore, Eric Dean  #define MPI_SASDEVICE2_PAGEVERSION          (0x00)
2592*c1a71d1cSMoore, Eric Dean  
2593*c1a71d1cSMoore, Eric Dean  
2594*c1a71d1cSMoore, Eric Dean  /****************************************************************************
2595*c1a71d1cSMoore, Eric Dean  *   SAS PHY Config Pages
2596*c1a71d1cSMoore, Eric Dean  ****************************************************************************/
2597*c1a71d1cSMoore, Eric Dean  
25981da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_PHY_0
25991da177e4SLinus Torvalds {
2600*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
26011da177e4SLinus Torvalds     U32                                 Reserved1;              /* 08h */
26021da177e4SLinus Torvalds     U64                                 SASAddress;             /* 0Ch */
26031da177e4SLinus Torvalds     U16                                 AttachedDevHandle;      /* 14h */
26041da177e4SLinus Torvalds     U8                                  AttachedPhyIdentifier;  /* 16h */
26051da177e4SLinus Torvalds     U8                                  Reserved2;              /* 17h */
26061da177e4SLinus Torvalds     U32                                 AttachedDeviceInfo;     /* 18h */
26071da177e4SLinus Torvalds     U8                                  ProgrammedLinkRate;     /* 20h */
26081da177e4SLinus Torvalds     U8                                  HwLinkRate;             /* 21h */
26091da177e4SLinus Torvalds     U8                                  ChangeCount;            /* 22h */
26101da177e4SLinus Torvalds     U8                                  Reserved3;              /* 23h */
26111da177e4SLinus Torvalds     U32                                 PhyInfo;                /* 24h */
2612*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_PHY_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_0,
26131da177e4SLinus Torvalds   SasPhyPage0_t, MPI_POINTER pSasPhyPage0_t;
26141da177e4SLinus Torvalds 
26151da177e4SLinus Torvalds #define MPI_SASPHY0_PAGEVERSION             (0x00)
26161da177e4SLinus Torvalds 
26171da177e4SLinus Torvalds /* values for SAS PHY Page 0 ProgrammedLinkRate field */
26181da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MAX_RATE_MASK                        (0xF0)
26191da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MAX_RATE_NOT_PROGRAMMABLE            (0x00)
26201da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MAX_RATE_1_5                         (0x80)
26211da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MAX_RATE_3_0                         (0x90)
26221da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MIN_RATE_MASK                        (0x0F)
26231da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MIN_RATE_NOT_PROGRAMMABLE            (0x00)
26241da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MIN_RATE_1_5                         (0x08)
26251da177e4SLinus Torvalds #define MPI_SAS_PHY0_PRATE_MIN_RATE_3_0                         (0x09)
26261da177e4SLinus Torvalds 
26271da177e4SLinus Torvalds /* values for SAS PHY Page 0 HwLinkRate field */
26281da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MAX_RATE_MASK                       (0xF0)
26291da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5                        (0x80)
26301da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MAX_RATE_3_0                        (0x90)
26311da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK                       (0x0F)
26321da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5                        (0x08)
26331da177e4SLinus Torvalds #define MPI_SAS_PHY0_HWRATE_MIN_RATE_3_0                        (0x09)
26341da177e4SLinus Torvalds 
26351da177e4SLinus Torvalds /* values for SAS PHY Page 0 PhyInfo field */
26361da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_ACTIVE                   (0x00004000)
26371da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_SELECTOR                 (0x00002000)
26381da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY                        (0x00001000)
26391da177e4SLinus Torvalds 
26401da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_MASK_PARTIAL_PATHWAY_TIME          (0x00000F00)
26411da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME         (8)
26421da177e4SLinus Torvalds 
26431da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_MASK_ROUTING_ATTRIBUTE             (0x000000F0)
26441da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_DIRECT_ROUTING                     (0x00000000)
26451da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_SUBTRACTIVE_ROUTING                (0x00000010)
26461da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_TABLE_ROUTING                      (0x00000020)
26471da177e4SLinus Torvalds 
26481da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_MASK_LINK_RATE                     (0x0000000F)
26491da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_UNKNOWN_LINK_RATE                  (0x00000000)
26501da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_PHY_DISABLED                       (0x00000001)
26511da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_NEGOTIATION_FAILED                 (0x00000002)
26521da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_SATA_OOB_COMPLETE                  (0x00000003)
26531da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_RATE_1_5                           (0x00000008)
26541da177e4SLinus Torvalds #define MPI_SAS_PHY0_PHYINFO_RATE_3_0                           (0x00000009)
26551da177e4SLinus Torvalds 
26561da177e4SLinus Torvalds 
26571da177e4SLinus Torvalds typedef struct _CONFIG_PAGE_SAS_PHY_1
26581da177e4SLinus Torvalds {
2659*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER Header;                     /* 00h */
26601da177e4SLinus Torvalds     U32                         Reserved1;                  /* 08h */
26611da177e4SLinus Torvalds     U32                         InvalidDwordCount;          /* 0Ch */
26621da177e4SLinus Torvalds     U32                         RunningDisparityErrorCount; /* 10h */
26631da177e4SLinus Torvalds     U32                         LossDwordSynchCount;        /* 14h */
26641da177e4SLinus Torvalds     U32                         PhyResetProblemCount;       /* 18h */
2665*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_PHY_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_1,
26661da177e4SLinus Torvalds   SasPhyPage1_t, MPI_POINTER pSasPhyPage1_t;
26671da177e4SLinus Torvalds 
26681da177e4SLinus Torvalds #define MPI_SASPHY1_PAGEVERSION             (0x00)
26691da177e4SLinus Torvalds 
26701da177e4SLinus Torvalds 
2671*c1a71d1cSMoore, Eric Dean  /****************************************************************************
2672*c1a71d1cSMoore, Eric Dean  *   SAS Enclosure Config Pages
2673*c1a71d1cSMoore, Eric Dean  ****************************************************************************/
2674*c1a71d1cSMoore, Eric Dean  
2675*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_SAS_ENCLOSURE_0
2676*c1a71d1cSMoore, Eric Dean  {
2677*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
2678*c1a71d1cSMoore, Eric Dean      U32                                 Reserved1;              /* 08h */
2679*c1a71d1cSMoore, Eric Dean      U64                                 EnclosureLogicalID;     /* 0Ch */
2680*c1a71d1cSMoore, Eric Dean      U16                                 Flags;                  /* 14h */
2681*c1a71d1cSMoore, Eric Dean      U16                                 EnclosureHandle;        /* 16h */
2682*c1a71d1cSMoore, Eric Dean      U16                                 NumSlots;               /* 18h */
2683*c1a71d1cSMoore, Eric Dean      U16                                 StartSlot;              /* 1Ah */
2684*c1a71d1cSMoore, Eric Dean      U8                                  StartTargetID;          /* 1Ch */
2685*c1a71d1cSMoore, Eric Dean      U8                                  StartBus;               /* 1Dh */
2686*c1a71d1cSMoore, Eric Dean      U8                                  SEPTargetID;            /* 1Eh */
2687*c1a71d1cSMoore, Eric Dean      U8                                  SEPBus;                 /* 1Fh */
2688*c1a71d1cSMoore, Eric Dean      U32                                 Reserved2;              /* 20h */
2689*c1a71d1cSMoore, Eric Dean      U32                                 Reserved3;              /* 24h */
2690*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_SAS_ENCLOSURE_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_ENCLOSURE_0,
2691*c1a71d1cSMoore, Eric Dean    SasEnclosurePage0_t, MPI_POINTER pSasEnclosurePage0_t;
2692*c1a71d1cSMoore, Eric Dean  
2693*c1a71d1cSMoore, Eric Dean  #define MPI_SASENCLOSURE0_PAGEVERSION       (0x00)
2694*c1a71d1cSMoore, Eric Dean  
2695*c1a71d1cSMoore, Eric Dean  /* values for SAS Enclosure Page 0 Flags field */
2696*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_SEP_BUS_ID_VALID       (0x0020)
2697*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_START_BUS_ID_VALID     (0x0010)
2698*c1a71d1cSMoore, Eric Dean  
2699*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_MASK               (0x000F)
2700*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_UNKNOWN            (0x0000)
2701*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_IOC_SES            (0x0001)
2702*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_IOC_SGPIO          (0x0002)
2703*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_EXP_SGPIO          (0x0003)
2704*c1a71d1cSMoore, Eric Dean  #define MPI_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE      (0x0004)
2705*c1a71d1cSMoore, Eric Dean  
2706*c1a71d1cSMoore, Eric Dean  
2707*c1a71d1cSMoore, Eric Dean  /****************************************************************************
2708*c1a71d1cSMoore, Eric Dean  *   Log Config Pages
2709*c1a71d1cSMoore, Eric Dean  ****************************************************************************/
2710*c1a71d1cSMoore, Eric Dean  /*
2711*c1a71d1cSMoore, Eric Dean   * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2712*c1a71d1cSMoore, Eric Dean   * one and check NumLogEntries at runtime.
2713*c1a71d1cSMoore, Eric Dean   */
2714*c1a71d1cSMoore, Eric Dean  #ifndef MPI_LOG_0_NUM_LOG_ENTRIES
2715*c1a71d1cSMoore, Eric Dean  #define MPI_LOG_0_NUM_LOG_ENTRIES        (1)
2716*c1a71d1cSMoore, Eric Dean  #endif
2717*c1a71d1cSMoore, Eric Dean  
2718*c1a71d1cSMoore, Eric Dean  #define MPI_LOG_0_LOG_DATA_LENGTH        (20)
2719*c1a71d1cSMoore, Eric Dean  
2720*c1a71d1cSMoore, Eric Dean  typedef struct _MPI_LOG_0_ENTRY
2721*c1a71d1cSMoore, Eric Dean  {
2722*c1a71d1cSMoore, Eric Dean      U64         WWID;                               /* 00h */
2723*c1a71d1cSMoore, Eric Dean      U32         TimeStamp;                          /* 08h */
2724*c1a71d1cSMoore, Eric Dean      U32         Reserved1;                          /* 0Ch */
2725*c1a71d1cSMoore, Eric Dean      U16         LogSequence;                        /* 10h */
2726*c1a71d1cSMoore, Eric Dean      U16         LogEntryQualifier;                  /* 12h */
2727*c1a71d1cSMoore, Eric Dean      U8          LogData[MPI_LOG_0_LOG_DATA_LENGTH]; /* 14h */
2728*c1a71d1cSMoore, Eric Dean  } MPI_LOG_0_ENTRY, MPI_POINTER PTR_MPI_LOG_0_ENTRY,
2729*c1a71d1cSMoore, Eric Dean    MpiLog0Entry_t, MPI_POINTER pMpiLog0Entry_t;
2730*c1a71d1cSMoore, Eric Dean  
2731*c1a71d1cSMoore, Eric Dean  /* values for Log Page 0 LogEntry LogEntryQualifier field */
2732*c1a71d1cSMoore, Eric Dean  #define MPI_LOG_0_ENTRY_QUAL_ENTRY_UNUSED           (0x0000)
2733*c1a71d1cSMoore, Eric Dean  #define MPI_LOG_0_ENTRY_QUAL_POWER_ON_RESET         (0x0001)
2734*c1a71d1cSMoore, Eric Dean  
2735*c1a71d1cSMoore, Eric Dean  typedef struct _CONFIG_PAGE_LOG_0
2736*c1a71d1cSMoore, Eric Dean  {
2737*c1a71d1cSMoore, Eric Dean      CONFIG_EXTENDED_PAGE_HEADER Header;                     /* 00h */
2738*c1a71d1cSMoore, Eric Dean      U32                         Reserved1;                  /* 08h */
2739*c1a71d1cSMoore, Eric Dean      U32                         Reserved2;                  /* 0Ch */
2740*c1a71d1cSMoore, Eric Dean      U16                         NumLogEntries;              /* 10h */
2741*c1a71d1cSMoore, Eric Dean      U16                         Reserved3;                  /* 12h */
2742*c1a71d1cSMoore, Eric Dean      MPI_LOG_0_ENTRY             LogEntry[MPI_LOG_0_NUM_LOG_ENTRIES]; /* 14h */
2743*c1a71d1cSMoore, Eric Dean  } CONFIG_PAGE_LOG_0, MPI_POINTER PTR_CONFIG_PAGE_LOG_0,
2744*c1a71d1cSMoore, Eric Dean    LogPage0_t, MPI_POINTER pLogPage0_t;
2745*c1a71d1cSMoore, Eric Dean  
2746*c1a71d1cSMoore, Eric Dean  #define MPI_LOG_0_PAGEVERSION               (0x00)
2747*c1a71d1cSMoore, Eric Dean  
2748*c1a71d1cSMoore, Eric Dean  
27491da177e4SLinus Torvalds #endif
27501da177e4SLinus Torvalds 
2751