Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright 2000-2020 Broadcom Inc. All rights reserved.
4 *
5 *
6 * Name: mpi2_cnfg.h
7 * Title: MPI Configuration messages and pages
8 * Creation Date: November 10, 2006
9 *
10 * mpi2_cnfg.h Version: 02.00.47
11 *
12 * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
13 * prefix are for use only on MPI v2.5 products, and must not be used
14 * with MPI v2.0 products. Unless otherwise noted, names beginning with
15 * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
16 *
17 * Version History
18 * ---------------
19 *
20 * Date Version Description
21 * -------- -------- ------------------------------------------------------
22 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
23 * 06-04-07 02.00.01 Added defines for SAS IO Unit Page 2 PhyFlags.
24 * Added Manufacturing Page 11.
25 * Added MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE
26 * define.
27 * 06-26-07 02.00.02 Adding generic structure for product-specific
28 * Manufacturing pages: MPI2_CONFIG_PAGE_MANUFACTURING_PS.
29 * Rework of BIOS Page 2 configuration page.
30 * Fixed MPI2_BIOSPAGE2_BOOT_DEVICE to be a union of the
31 * forms.
32 * Added configuration pages IOC Page 8 and Driver
33 * Persistent Mapping Page 0.
34 * 08-31-07 02.00.03 Modified configuration pages dealing with Integrated
35 * RAID (Manufacturing Page 4, RAID Volume Pages 0 and 1,
36 * RAID Physical Disk Pages 0 and 1, RAID Configuration
37 * Page 0).
38 * Added new value for AccessStatus field of SAS Device
39 * Page 0 (_SATA_NEEDS_INITIALIZATION).
40 * 10-31-07 02.00.04 Added missing SEPDevHandle field to
41 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
42 * 12-18-07 02.00.05 Modified IO Unit Page 0 to use 32-bit version fields for
43 * NVDATA.
44 * Modified IOC Page 7 to use masks and added field for
45 * SASBroadcastPrimitiveMasks.
46 * Added MPI2_CONFIG_PAGE_BIOS_4.
47 * Added MPI2_CONFIG_PAGE_LOG_0.
48 * 02-29-08 02.00.06 Modified various names to make them 32-character unique.
49 * Added SAS Device IDs.
50 * Updated Integrated RAID configuration pages including
51 * Manufacturing Page 4, IOC Page 6, and RAID Configuration
52 * Page 0.
53 * 05-21-08 02.00.07 Added define MPI2_MANPAGE4_MIX_SSD_SAS_SATA.
54 * Added define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION.
55 * Fixed define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING.
56 * Added missing MaxNumRoutedSasAddresses field to
57 * MPI2_CONFIG_PAGE_EXPANDER_0.
58 * Added SAS Port Page 0.
59 * Modified structure layout for
60 * MPI2_CONFIG_PAGE_DRIVER_MAPPING_0.
61 * 06-27-08 02.00.08 Changed MPI2_CONFIG_PAGE_RD_PDISK_1 to use
62 * MPI2_RAID_PHYS_DISK1_PATH_MAX to size the array.
63 * 10-02-08 02.00.09 Changed MPI2_RAID_PGAD_CONFIGNUM_MASK from 0x0000FFFF
64 * to 0x000000FF.
65 * Added two new values for the Physical Disk Coercion Size
66 * bits in the Flags field of Manufacturing Page 4.
67 * Added product-specific Manufacturing pages 16 to 31.
68 * Modified Flags bits for controlling write cache on SATA
69 * drives in IO Unit Page 1.
70 * Added new bit to AdditionalControlFlags of SAS IO Unit
71 * Page 1 to control Invalid Topology Correction.
72 * Added additional defines for RAID Volume Page 0
73 * VolumeStatusFlags field.
74 * Modified meaning of RAID Volume Page 0 VolumeSettings
75 * define for auto-configure of hot-swap drives.
76 * Added SupportedPhysDisks field to RAID Volume Page 1 and
77 * added related defines.
78 * Added PhysDiskAttributes field (and related defines) to
79 * RAID Physical Disk Page 0.
80 * Added MPI2_SAS_PHYINFO_PHY_VACANT define.
81 * Added three new DiscoveryStatus bits for SAS IO Unit
82 * Page 0 and SAS Expander Page 0.
83 * Removed multiplexing information from SAS IO Unit pages.
84 * Added BootDeviceWaitTime field to SAS IO Unit Page 4.
85 * Removed Zone Address Resolved bit from PhyInfo and from
86 * Expander Page 0 Flags field.
87 * Added two new AccessStatus values to SAS Device Page 0
88 * for indicating routing problems. Added 3 reserved words
89 * to this page.
90 * 01-19-09 02.00.10 Fixed defines for GPIOVal field of IO Unit Page 3.
91 * Inserted missing reserved field into structure for IOC
92 * Page 6.
93 * Added more pending task bits to RAID Volume Page 0
94 * VolumeStatusFlags defines.
95 * Added MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED define.
96 * Added a new DiscoveryStatus bit for SAS IO Unit Page 0
97 * and SAS Expander Page 0 to flag a downstream initiator
98 * when in simplified routing mode.
99 * Removed SATA Init Failure defines for DiscoveryStatus
100 * fields of SAS IO Unit Page 0 and SAS Expander Page 0.
101 * Added MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED define.
102 * Added PortGroups, DmaGroup, and ControlGroup fields to
103 * SAS Device Page 0.
104 * 05-06-09 02.00.11 Added structures and defines for IO Unit Page 5 and IO
105 * Unit Page 6.
106 * Added expander reduced functionality data to SAS
107 * Expander Page 0.
108 * Added SAS PHY Page 2 and SAS PHY Page 3.
109 * 07-30-09 02.00.12 Added IO Unit Page 7.
110 * Added new device ids.
111 * Added SAS IO Unit Page 5.
112 * Added partial and slumber power management capable flags
113 * to SAS Device Page 0 Flags field.
114 * Added PhyInfo defines for power condition.
115 * Added Ethernet configuration pages.
116 * 10-28-09 02.00.13 Added MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY.
117 * Added SAS PHY Page 4 structure and defines.
118 * 02-10-10 02.00.14 Modified the comments for the configuration page
119 * structures that contain an array of data. The host
120 * should use the "count" field in the page data (e.g. the
121 * NumPhys field) to determine the number of valid elements
122 * in the array.
123 * Added/modified some MPI2_MFGPAGE_DEVID_SAS defines.
124 * Added PowerManagementCapabilities to IO Unit Page 7.
125 * Added PortWidthModGroup field to
126 * MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS.
127 * Added MPI2_CONFIG_PAGE_SASIOUNIT_6 and related defines.
128 * Added MPI2_CONFIG_PAGE_SASIOUNIT_7 and related defines.
129 * Added MPI2_CONFIG_PAGE_SASIOUNIT_8 and related defines.
130 * 05-12-10 02.00.15 Added MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT
131 * define.
132 * Added MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE define.
133 * Added MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY define.
134 * 08-11-10 02.00.16 Removed IO Unit Page 1 device path (multi-pathing)
135 * defines.
136 * 11-10-10 02.00.17 Added ReceptacleID field (replacing Reserved1) to
137 * MPI2_MANPAGE7_CONNECTOR_INFO and reworked defines for
138 * the Pinout field.
139 * Added BoardTemperature and BoardTemperatureUnits fields
140 * to MPI2_CONFIG_PAGE_IO_UNIT_7.
141 * Added MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING define
142 * and MPI2_CONFIG_PAGE_EXT_MAN_PS structure.
143 * 02-23-11 02.00.18 Added ProxyVF_ID field to MPI2_CONFIG_REQUEST.
144 * Added IO Unit Page 8, IO Unit Page 9,
145 * and IO Unit Page 10.
146 * Added SASNotifyPrimitiveMasks field to
147 * MPI2_CONFIG_PAGE_IOC_7.
148 * 03-09-11 02.00.19 Fixed IO Unit Page 10 (to match the spec).
149 * 05-25-11 02.00.20 Cleaned up a few comments.
150 * 08-24-11 02.00.21 Marked the IO Unit Page 7 PowerManagementCapabilities
151 * for PCIe link as obsolete.
152 * Added SpinupFlags field containing a Disable Spin-up bit
153 * to the MPI2_SAS_IOUNIT4_SPINUP_GROUP fields of SAS IO
154 * Unit Page 4.
155 * 11-18-11 02.00.22 Added define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT.
156 * Added UEFIVersion field to BIOS Page 1 and defined new
157 * BiosOptions bits.
158 * Incorporating additions for MPI v2.5.
159 * 11-27-12 02.00.23 Added MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER.
160 * Added MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID.
161 * 12-20-12 02.00.24 Marked MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION as
162 * obsolete for MPI v2.5 and later.
163 * Added some defines for 12G SAS speeds.
164 * 04-09-13 02.00.25 Added MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK.
165 * Fixed MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS to
166 * match the specification.
167 * 08-19-13 02.00.26 Added reserved words to MPI2_CONFIG_PAGE_IO_UNIT_7 for
168 * future use.
169 * 12-05-13 02.00.27 Added MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL for
170 * MPI2_CONFIG_PAGE_MAN_7.
171 * Added EnclosureLevel and ConnectorName fields to
172 * MPI2_CONFIG_PAGE_SAS_DEV_0.
173 * Added MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID for
174 * MPI2_CONFIG_PAGE_SAS_DEV_0.
175 * Added EnclosureLevel field to
176 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
177 * Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
178 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
179 * 01-08-14 02.00.28 Added more defines for the BiosOptions field of
180 * MPI2_CONFIG_PAGE_BIOS_1.
181 * 06-13-14 02.00.29 Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
182 * more defines for the BiosOptions field.
183 * 11-18-14 02.00.30 Updated copyright information.
184 * Added MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG.
185 * Added AdapterOrderAux fields to BIOS Page 3.
186 * 03-16-15 02.00.31 Updated for MPI v2.6.
187 * Added Flags field to IO Unit Page 7.
188 * Added new SAS Phy Event codes
189 * 05-25-15 02.00.33 Added more defines for the BiosOptions field of
190 * MPI2_CONFIG_PAGE_BIOS_1.
191 * 08-25-15 02.00.34 Bumped Header Version.
192 * 12-18-15 02.00.35 Added SATADeviceWaitTime to SAS IO Unit Page 4.
193 * 01-21-16 02.00.36 Added/modified MPI2_MFGPAGE_DEVID_SAS defines.
194 * Added Link field to PCIe Link Pages
195 * Added EnclosureLevel and ConnectorName to PCIe
196 * Device Page 0.
197 * Added define for PCIE IoUnit page 1 max rate shift.
198 * Added comment for reserved ExtPageTypes.
199 * Added SAS 4 22.5 gbs speed support.
200 * Added PCIe 4 16.0 GT/sec speec support.
201 * Removed AHCI support.
202 * Removed SOP support.
203 * Added NegotiatedLinkRate and NegotiatedPortWidth to
204 * PCIe device page 0.
205 * 04-10-16 02.00.37 Fixed MPI2_MFGPAGE_DEVID_SAS3616/3708 defines
206 * 07-01-16 02.00.38 Added Manufacturing page 7 Connector types.
207 * Changed declaration of ConnectorName in PCIe DevicePage0
208 * to match SAS DevicePage 0.
209 * Added SATADeviceWaitTime to IO Unit Page 11.
210 * Added MPI26_MFGPAGE_DEVID_SAS4008
211 * Added x16 PCIe width to IO Unit Page 7
212 * Added LINKFLAGS to control SRIS in PCIe IO Unit page 1
213 * phy data.
214 * Added InitStatus to PCIe IO Unit Page 1 header.
215 * 09-01-16 02.00.39 Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related defines.
216 * Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and
217 * MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats.
218 * 02-02-17 02.00.40 Added MPI2_MANPAGE7_SLOT_UNKNOWN.
219 * Added ChassisSlot field to SAS Enclosure Page 0.
220 * Added ChassisSlot Valid bit (bit 5) to the Flags field
221 * in SAS Enclosure Page 0.
222 * 06-13-17 02.00.41 Added MPI26_MFGPAGE_DEVID_SAS3816 and
223 * MPI26_MFGPAGE_DEVID_SAS3916 defines.
224 * Removed MPI26_MFGPAGE_DEVID_SAS4008 define.
225 * Added MPI26_PCIEIOUNIT1_LINKFLAGS_SRNS_EN define.
226 * Renamed PI26_PCIEIOUNIT1_LINKFLAGS_EN_SRIS to
227 * PI26_PCIEIOUNIT1_LINKFLAGS_SRIS_EN.
228 * Renamed MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SRIS to
229 * MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SEPARATE_REFCLK.
230 * 09-29-17 02.00.42 Added ControllerResetTO field to PCIe Device Page 2.
231 * Added NOIOB field to PCIe Device Page 2.
232 * Added MPI26_PCIEDEV2_CAP_DATA_BLK_ALIGN_AND_GRAN to
233 * the Capabilities field of PCIe Device Page 2.
234 * 07-22-18 02.00.43 Added defines for SAS3916 and SAS3816.
235 * Added WRiteCache defines to IO Unit Page 1.
236 * Added MaxEnclosureLevel to BIOS Page 1.
237 * Added OEMRD to SAS Enclosure Page 1.
238 * Added DMDReportPCIe to PCIe IO Unit Page 1.
239 * Added Flags field and flags for Retimers to
240 * PCIe Switch Page 1.
241 * 08-02-18 02.00.44 Added Slotx2, Slotx4 to ManPage 7.
242 * 08-15-18 02.00.45 Added ProductSpecific field at end of IOC Page 1
243 * 08-28-18 02.00.46 Added NVMs Write Cache flag to IOUnitPage1
244 * Added DMDReport Delay Time defines to
245 * PCIeIOUnitPage1
246 * --------------------------------------------------------------------------
247 * 08-02-18 02.00.44 Added Slotx2, Slotx4 to ManPage 7.
248 * 08-15-18 02.00.45 Added ProductSpecific field at end of IOC Page 1
249 * 08-28-18 02.00.46 Added NVMs Write Cache flag to IOUnitPage1
250 * Added DMDReport Delay Time defines to PCIeIOUnitPage1
251 * 12-17-18 02.00.47 Swap locations of Slotx2 and Slotx4 in ManPage 7.
252 * 08-01-19 02.00.49 Add MPI26_MANPAGE7_FLAG_X2_X4_SLOT_INFO_VALID
253 * Add MPI26_IOUNITPAGE1_NVME_WRCACHE_SHIFT
254 */
255
256#ifndef MPI2_CNFG_H
257#define MPI2_CNFG_H
258
259/*****************************************************************************
260* Configuration Page Header and defines
261*****************************************************************************/
262
263/*Config Page Header */
264typedef struct _MPI2_CONFIG_PAGE_HEADER {
265 U8 PageVersion; /*0x00 */
266 U8 PageLength; /*0x01 */
267 U8 PageNumber; /*0x02 */
268 U8 PageType; /*0x03 */
269} MPI2_CONFIG_PAGE_HEADER, *PTR_MPI2_CONFIG_PAGE_HEADER,
270 Mpi2ConfigPageHeader_t, *pMpi2ConfigPageHeader_t;
271
272typedef union _MPI2_CONFIG_PAGE_HEADER_UNION {
273 MPI2_CONFIG_PAGE_HEADER Struct;
274 U8 Bytes[4];
275 U16 Word16[2];
276 U32 Word32;
277} MPI2_CONFIG_PAGE_HEADER_UNION, *PTR_MPI2_CONFIG_PAGE_HEADER_UNION,
278 Mpi2ConfigPageHeaderUnion, *pMpi2ConfigPageHeaderUnion;
279
280/*Extended Config Page Header */
281typedef struct _MPI2_CONFIG_EXTENDED_PAGE_HEADER {
282 U8 PageVersion; /*0x00 */
283 U8 Reserved1; /*0x01 */
284 U8 PageNumber; /*0x02 */
285 U8 PageType; /*0x03 */
286 U16 ExtPageLength; /*0x04 */
287 U8 ExtPageType; /*0x06 */
288 U8 Reserved2; /*0x07 */
289} MPI2_CONFIG_EXTENDED_PAGE_HEADER,
290 *PTR_MPI2_CONFIG_EXTENDED_PAGE_HEADER,
291 Mpi2ConfigExtendedPageHeader_t,
292 *pMpi2ConfigExtendedPageHeader_t;
293
294typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION {
295 MPI2_CONFIG_PAGE_HEADER Struct;
296 MPI2_CONFIG_EXTENDED_PAGE_HEADER Ext;
297 U8 Bytes[8];
298 U16 Word16[4];
299 U32 Word32[2];
300} MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
301 *PTR_MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
302 Mpi2ConfigPageExtendedHeaderUnion,
303 *pMpi2ConfigPageExtendedHeaderUnion;
304
305
306/*PageType field values */
307#define MPI2_CONFIG_PAGEATTR_READ_ONLY (0x00)
308#define MPI2_CONFIG_PAGEATTR_CHANGEABLE (0x10)
309#define MPI2_CONFIG_PAGEATTR_PERSISTENT (0x20)
310#define MPI2_CONFIG_PAGEATTR_MASK (0xF0)
311
312#define MPI2_CONFIG_PAGETYPE_IO_UNIT (0x00)
313#define MPI2_CONFIG_PAGETYPE_IOC (0x01)
314#define MPI2_CONFIG_PAGETYPE_BIOS (0x02)
315#define MPI2_CONFIG_PAGETYPE_RAID_VOLUME (0x08)
316#define MPI2_CONFIG_PAGETYPE_MANUFACTURING (0x09)
317#define MPI2_CONFIG_PAGETYPE_RAID_PHYSDISK (0x0A)
318#define MPI2_CONFIG_PAGETYPE_EXTENDED (0x0F)
319#define MPI2_CONFIG_PAGETYPE_MASK (0x0F)
320
321#define MPI2_CONFIG_TYPENUM_MASK (0x0FFF)
322
323
324/*ExtPageType field values */
325#define MPI2_CONFIG_EXTPAGETYPE_SAS_IO_UNIT (0x10)
326#define MPI2_CONFIG_EXTPAGETYPE_SAS_EXPANDER (0x11)
327#define MPI2_CONFIG_EXTPAGETYPE_SAS_DEVICE (0x12)
328#define MPI2_CONFIG_EXTPAGETYPE_SAS_PHY (0x13)
329#define MPI2_CONFIG_EXTPAGETYPE_LOG (0x14)
330#define MPI2_CONFIG_EXTPAGETYPE_ENCLOSURE (0x15)
331#define MPI2_CONFIG_EXTPAGETYPE_RAID_CONFIG (0x16)
332#define MPI2_CONFIG_EXTPAGETYPE_DRIVER_MAPPING (0x17)
333#define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT (0x18)
334#define MPI2_CONFIG_EXTPAGETYPE_ETHERNET (0x19)
335#define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING (0x1A)
336#define MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT (0x1B)
337#define MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH (0x1C)
338#define MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE (0x1D)
339#define MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK (0x1E)
340
341
342/*****************************************************************************
343* PageAddress defines
344*****************************************************************************/
345
346/*RAID Volume PageAddress format */
347#define MPI2_RAID_VOLUME_PGAD_FORM_MASK (0xF0000000)
348#define MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
349#define MPI2_RAID_VOLUME_PGAD_FORM_HANDLE (0x10000000)
350
351#define MPI2_RAID_VOLUME_PGAD_HANDLE_MASK (0x0000FFFF)
352
353
354/*RAID Physical Disk PageAddress format */
355#define MPI2_PHYSDISK_PGAD_FORM_MASK (0xF0000000)
356#define MPI2_PHYSDISK_PGAD_FORM_GET_NEXT_PHYSDISKNUM (0x00000000)
357#define MPI2_PHYSDISK_PGAD_FORM_PHYSDISKNUM (0x10000000)
358#define MPI2_PHYSDISK_PGAD_FORM_DEVHANDLE (0x20000000)
359
360#define MPI2_PHYSDISK_PGAD_PHYSDISKNUM_MASK (0x000000FF)
361#define MPI2_PHYSDISK_PGAD_DEVHANDLE_MASK (0x0000FFFF)
362
363
364/*SAS Expander PageAddress format */
365#define MPI2_SAS_EXPAND_PGAD_FORM_MASK (0xF0000000)
366#define MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL (0x00000000)
367#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL_PHY_NUM (0x10000000)
368#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL (0x20000000)
369
370#define MPI2_SAS_EXPAND_PGAD_HANDLE_MASK (0x0000FFFF)
371#define MPI2_SAS_EXPAND_PGAD_PHYNUM_MASK (0x00FF0000)
372#define MPI2_SAS_EXPAND_PGAD_PHYNUM_SHIFT (16)
373
374
375/*SAS Device PageAddress format */
376#define MPI2_SAS_DEVICE_PGAD_FORM_MASK (0xF0000000)
377#define MPI2_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
378#define MPI2_SAS_DEVICE_PGAD_FORM_HANDLE (0x20000000)
379
380#define MPI2_SAS_DEVICE_PGAD_HANDLE_MASK (0x0000FFFF)
381
382
383/*SAS PHY PageAddress format */
384#define MPI2_SAS_PHY_PGAD_FORM_MASK (0xF0000000)
385#define MPI2_SAS_PHY_PGAD_FORM_PHY_NUMBER (0x00000000)
386#define MPI2_SAS_PHY_PGAD_FORM_PHY_TBL_INDEX (0x10000000)
387
388#define MPI2_SAS_PHY_PGAD_PHY_NUMBER_MASK (0x000000FF)
389#define MPI2_SAS_PHY_PGAD_PHY_TBL_INDEX_MASK (0x0000FFFF)
390
391
392/*SAS Port PageAddress format */
393#define MPI2_SASPORT_PGAD_FORM_MASK (0xF0000000)
394#define MPI2_SASPORT_PGAD_FORM_GET_NEXT_PORT (0x00000000)
395#define MPI2_SASPORT_PGAD_FORM_PORT_NUM (0x10000000)
396
397#define MPI2_SASPORT_PGAD_PORTNUMBER_MASK (0x00000FFF)
398
399
400/*SAS Enclosure PageAddress format */
401#define MPI2_SAS_ENCLOS_PGAD_FORM_MASK (0xF0000000)
402#define MPI2_SAS_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
403#define MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE (0x10000000)
404
405#define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF)
406
407/*Enclosure PageAddress format */
408#define MPI26_ENCLOS_PGAD_FORM_MASK (0xF0000000)
409#define MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
410#define MPI26_ENCLOS_PGAD_FORM_HANDLE (0x10000000)
411
412#define MPI26_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF)
413
414/*RAID Configuration PageAddress format */
415#define MPI2_RAID_PGAD_FORM_MASK (0xF0000000)
416#define MPI2_RAID_PGAD_FORM_GET_NEXT_CONFIGNUM (0x00000000)
417#define MPI2_RAID_PGAD_FORM_CONFIGNUM (0x10000000)
418#define MPI2_RAID_PGAD_FORM_ACTIVE_CONFIG (0x20000000)
419
420#define MPI2_RAID_PGAD_CONFIGNUM_MASK (0x000000FF)
421
422
423/*Driver Persistent Mapping PageAddress format */
424#define MPI2_DPM_PGAD_FORM_MASK (0xF0000000)
425#define MPI2_DPM_PGAD_FORM_ENTRY_RANGE (0x00000000)
426
427#define MPI2_DPM_PGAD_ENTRY_COUNT_MASK (0x0FFF0000)
428#define MPI2_DPM_PGAD_ENTRY_COUNT_SHIFT (16)
429#define MPI2_DPM_PGAD_START_ENTRY_MASK (0x0000FFFF)
430
431
432/*Ethernet PageAddress format */
433#define MPI2_ETHERNET_PGAD_FORM_MASK (0xF0000000)
434#define MPI2_ETHERNET_PGAD_FORM_IF_NUM (0x00000000)
435
436#define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK (0x000000FF)
437
438
439/*PCIe Switch PageAddress format */
440#define MPI26_PCIE_SWITCH_PGAD_FORM_MASK (0xF0000000)
441#define MPI26_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HNDL (0x00000000)
442#define MPI26_PCIE_SWITCH_PGAD_FORM_HNDL_PORTNUM (0x10000000)
443#define MPI26_PCIE_SWITCH_EXPAND_PGAD_FORM_HNDL (0x20000000)
444
445#define MPI26_PCIE_SWITCH_PGAD_HANDLE_MASK (0x0000FFFF)
446#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_MASK (0x00FF0000)
447#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_SHIFT (16)
448
449
450/*PCIe Device PageAddress format */
451#define MPI26_PCIE_DEVICE_PGAD_FORM_MASK (0xF0000000)
452#define MPI26_PCIE_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
453#define MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE (0x20000000)
454
455#define MPI26_PCIE_DEVICE_PGAD_HANDLE_MASK (0x0000FFFF)
456
457/*PCIe Link PageAddress format */
458#define MPI26_PCIE_LINK_PGAD_FORM_MASK (0xF0000000)
459#define MPI26_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK (0x00000000)
460#define MPI26_PCIE_LINK_PGAD_FORM_LINK_NUM (0x10000000)
461
462#define MPI26_PCIE_DEVICE_PGAD_LINKNUM_MASK (0x000000FF)
463
464
465
466/****************************************************************************
467* Configuration messages
468****************************************************************************/
469
470/*Configuration Request Message */
471typedef struct _MPI2_CONFIG_REQUEST {
472 U8 Action; /*0x00 */
473 U8 SGLFlags; /*0x01 */
474 U8 ChainOffset; /*0x02 */
475 U8 Function; /*0x03 */
476 U16 ExtPageLength; /*0x04 */
477 U8 ExtPageType; /*0x06 */
478 U8 MsgFlags; /*0x07 */
479 U8 VP_ID; /*0x08 */
480 U8 VF_ID; /*0x09 */
481 U16 Reserved1; /*0x0A */
482 U8 Reserved2; /*0x0C */
483 U8 ProxyVF_ID; /*0x0D */
484 U16 Reserved4; /*0x0E */
485 U32 Reserved3; /*0x10 */
486 MPI2_CONFIG_PAGE_HEADER Header; /*0x14 */
487 U32 PageAddress; /*0x18 */
488 MPI2_SGE_IO_UNION PageBufferSGE; /*0x1C */
489} MPI2_CONFIG_REQUEST, *PTR_MPI2_CONFIG_REQUEST,
490 Mpi2ConfigRequest_t, *pMpi2ConfigRequest_t;
491
492/*values for the Action field */
493#define MPI2_CONFIG_ACTION_PAGE_HEADER (0x00)
494#define MPI2_CONFIG_ACTION_PAGE_READ_CURRENT (0x01)
495#define MPI2_CONFIG_ACTION_PAGE_WRITE_CURRENT (0x02)
496#define MPI2_CONFIG_ACTION_PAGE_DEFAULT (0x03)
497#define MPI2_CONFIG_ACTION_PAGE_WRITE_NVRAM (0x04)
498#define MPI2_CONFIG_ACTION_PAGE_READ_DEFAULT (0x05)
499#define MPI2_CONFIG_ACTION_PAGE_READ_NVRAM (0x06)
500#define MPI2_CONFIG_ACTION_PAGE_GET_CHANGEABLE (0x07)
501
502/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
503
504
505/*Config Reply Message */
506typedef struct _MPI2_CONFIG_REPLY {
507 U8 Action; /*0x00 */
508 U8 SGLFlags; /*0x01 */
509 U8 MsgLength; /*0x02 */
510 U8 Function; /*0x03 */
511 U16 ExtPageLength; /*0x04 */
512 U8 ExtPageType; /*0x06 */
513 U8 MsgFlags; /*0x07 */
514 U8 VP_ID; /*0x08 */
515 U8 VF_ID; /*0x09 */
516 U16 Reserved1; /*0x0A */
517 U16 Reserved2; /*0x0C */
518 U16 IOCStatus; /*0x0E */
519 U32 IOCLogInfo; /*0x10 */
520 MPI2_CONFIG_PAGE_HEADER Header; /*0x14 */
521} MPI2_CONFIG_REPLY, *PTR_MPI2_CONFIG_REPLY,
522 Mpi2ConfigReply_t, *pMpi2ConfigReply_t;
523
524
525
526/*****************************************************************************
527*
528* C o n f i g u r a t i o n P a g e s
529*
530*****************************************************************************/
531
532/****************************************************************************
533* Manufacturing Config pages
534****************************************************************************/
535
536#define MPI2_MFGPAGE_VENDORID_LSI (0x1000)
537#define MPI2_MFGPAGE_VENDORID_ATTO (0x117C)
538
539/*MPI v2.0 SAS products */
540#define MPI2_MFGPAGE_DEVID_SAS2004 (0x0070)
541#define MPI2_MFGPAGE_DEVID_SAS2008 (0x0072)
542#define MPI2_MFGPAGE_DEVID_SAS2108_1 (0x0074)
543#define MPI2_MFGPAGE_DEVID_SAS2108_2 (0x0076)
544#define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077)
545#define MPI2_MFGPAGE_DEVID_SAS2116_1 (0x0064)
546#define MPI2_MFGPAGE_DEVID_SAS2116_2 (0x0065)
547
548#define MPI2_MFGPAGE_DEVID_SSS6200 (0x007E)
549
550#define MPI2_MFGPAGE_DEVID_SAS2208_1 (0x0080)
551#define MPI2_MFGPAGE_DEVID_SAS2208_2 (0x0081)
552#define MPI2_MFGPAGE_DEVID_SAS2208_3 (0x0082)
553#define MPI2_MFGPAGE_DEVID_SAS2208_4 (0x0083)
554#define MPI2_MFGPAGE_DEVID_SAS2208_5 (0x0084)
555#define MPI2_MFGPAGE_DEVID_SAS2208_6 (0x0085)
556#define MPI2_MFGPAGE_DEVID_SAS2308_1 (0x0086)
557#define MPI2_MFGPAGE_DEVID_SAS2308_2 (0x0087)
558#define MPI2_MFGPAGE_DEVID_SAS2308_3 (0x006E)
559#define MPI2_MFGPAGE_DEVID_SWITCH_MPI_EP (0x02B0)
560#define MPI2_MFGPAGE_DEVID_SWITCH_MPI_EP_1 (0x02B1)
561
562/*MPI v2.5 SAS products */
563#define MPI25_MFGPAGE_DEVID_SAS3004 (0x0096)
564#define MPI25_MFGPAGE_DEVID_SAS3008 (0x0097)
565#define MPI25_MFGPAGE_DEVID_SAS3108_1 (0x0090)
566#define MPI25_MFGPAGE_DEVID_SAS3108_2 (0x0091)
567#define MPI25_MFGPAGE_DEVID_SAS3108_5 (0x0094)
568#define MPI25_MFGPAGE_DEVID_SAS3108_6 (0x0095)
569
570/* MPI v2.6 SAS Products */
571#define MPI26_MFGPAGE_DEVID_SAS3216 (0x00C9)
572#define MPI26_MFGPAGE_DEVID_SAS3224 (0x00C4)
573#define MPI26_MFGPAGE_DEVID_SAS3316_1 (0x00C5)
574#define MPI26_MFGPAGE_DEVID_SAS3316_2 (0x00C6)
575#define MPI26_MFGPAGE_DEVID_SAS3316_3 (0x00C7)
576#define MPI26_MFGPAGE_DEVID_SAS3316_4 (0x00C8)
577#define MPI26_MFGPAGE_DEVID_SAS3324_1 (0x00C0)
578#define MPI26_MFGPAGE_DEVID_SAS3324_2 (0x00C1)
579#define MPI26_MFGPAGE_DEVID_SAS3324_3 (0x00C2)
580#define MPI26_MFGPAGE_DEVID_SAS3324_4 (0x00C3)
581
582#define MPI26_MFGPAGE_DEVID_SAS3516 (0x00AA)
583#define MPI26_MFGPAGE_DEVID_SAS3516_1 (0x00AB)
584#define MPI26_MFGPAGE_DEVID_SAS3416 (0x00AC)
585#define MPI26_MFGPAGE_DEVID_SAS3508 (0x00AD)
586#define MPI26_MFGPAGE_DEVID_SAS3508_1 (0x00AE)
587#define MPI26_MFGPAGE_DEVID_SAS3408 (0x00AF)
588#define MPI26_MFGPAGE_DEVID_SAS3716 (0x00D0)
589#define MPI26_MFGPAGE_DEVID_SAS3616 (0x00D1)
590#define MPI26_MFGPAGE_DEVID_SAS3708 (0x00D2)
591
592#define MPI26_MFGPAGE_DEVID_SEC_MASK_3916 (0x0003)
593#define MPI26_MFGPAGE_DEVID_INVALID0_3916 (0x00E0)
594#define MPI26_MFGPAGE_DEVID_CFG_SEC_3916 (0x00E1)
595#define MPI26_MFGPAGE_DEVID_HARD_SEC_3916 (0x00E2)
596#define MPI26_MFGPAGE_DEVID_INVALID1_3916 (0x00E3)
597
598#define MPI26_MFGPAGE_DEVID_SEC_MASK_3816 (0x0003)
599#define MPI26_MFGPAGE_DEVID_INVALID0_3816 (0x00E4)
600#define MPI26_MFGPAGE_DEVID_CFG_SEC_3816 (0x00E5)
601#define MPI26_MFGPAGE_DEVID_HARD_SEC_3816 (0x00E6)
602#define MPI26_MFGPAGE_DEVID_INVALID1_3816 (0x00E7)
603
604
605/*Manufacturing Page 0 */
606
607typedef struct _MPI2_CONFIG_PAGE_MAN_0 {
608 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
609 U8 ChipName[16]; /*0x04 */
610 U8 ChipRevision[8]; /*0x14 */
611 U8 BoardName[16]; /*0x1C */
612 U8 BoardAssembly[16]; /*0x2C */
613 U8 BoardTracerNumber[16]; /*0x3C */
614} MPI2_CONFIG_PAGE_MAN_0,
615 *PTR_MPI2_CONFIG_PAGE_MAN_0,
616 Mpi2ManufacturingPage0_t,
617 *pMpi2ManufacturingPage0_t;
618
619#define MPI2_MANUFACTURING0_PAGEVERSION (0x00)
620
621
622/*Manufacturing Page 1 */
623
624typedef struct _MPI2_CONFIG_PAGE_MAN_1 {
625 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
626 U8 VPD[256]; /*0x04 */
627} MPI2_CONFIG_PAGE_MAN_1,
628 *PTR_MPI2_CONFIG_PAGE_MAN_1,
629 Mpi2ManufacturingPage1_t,
630 *pMpi2ManufacturingPage1_t;
631
632#define MPI2_MANUFACTURING1_PAGEVERSION (0x00)
633
634
635typedef struct _MPI2_CHIP_REVISION_ID {
636 U16 DeviceID; /*0x00 */
637 U8 PCIRevisionID; /*0x02 */
638 U8 Reserved; /*0x03 */
639} MPI2_CHIP_REVISION_ID, *PTR_MPI2_CHIP_REVISION_ID,
640 Mpi2ChipRevisionId_t, *pMpi2ChipRevisionId_t;
641
642
643/*Manufacturing Page 2 */
644
645/*
646 *Host code (drivers, BIOS, utilities, etc.) should check Header.PageLength at
647 *runtime before using HwSettings[].
648 */
649
650typedef struct _MPI2_CONFIG_PAGE_MAN_2 {
651 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
652 MPI2_CHIP_REVISION_ID ChipId; /*0x04 */
653 U32 HwSettings[]; /*0x08 */
654} MPI2_CONFIG_PAGE_MAN_2,
655 *PTR_MPI2_CONFIG_PAGE_MAN_2,
656 Mpi2ManufacturingPage2_t,
657 *pMpi2ManufacturingPage2_t;
658
659#define MPI2_MANUFACTURING2_PAGEVERSION (0x00)
660
661
662/*Manufacturing Page 3 */
663
664/*
665 *Host code (drivers, BIOS, utilities, etc.) should check Header.PageLength at
666 *runtime before using Info[].
667 */
668
669typedef struct _MPI2_CONFIG_PAGE_MAN_3 {
670 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
671 MPI2_CHIP_REVISION_ID ChipId; /*0x04 */
672 U32 Info[]; /*0x08 */
673} MPI2_CONFIG_PAGE_MAN_3,
674 *PTR_MPI2_CONFIG_PAGE_MAN_3,
675 Mpi2ManufacturingPage3_t,
676 *pMpi2ManufacturingPage3_t;
677
678#define MPI2_MANUFACTURING3_PAGEVERSION (0x00)
679
680
681/*Manufacturing Page 4 */
682
683typedef struct _MPI2_MANPAGE4_PWR_SAVE_SETTINGS {
684 U8 PowerSaveFlags; /*0x00 */
685 U8 InternalOperationsSleepTime; /*0x01 */
686 U8 InternalOperationsRunTime; /*0x02 */
687 U8 HostIdleTime; /*0x03 */
688} MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
689 *PTR_MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
690 Mpi2ManPage4PwrSaveSettings_t,
691 *pMpi2ManPage4PwrSaveSettings_t;
692
693/*defines for the PowerSaveFlags field */
694#define MPI2_MANPAGE4_MASK_POWERSAVE_MODE (0x03)
695#define MPI2_MANPAGE4_POWERSAVE_MODE_DISABLED (0x00)
696#define MPI2_MANPAGE4_CUSTOM_POWERSAVE_MODE (0x01)
697#define MPI2_MANPAGE4_FULL_POWERSAVE_MODE (0x02)
698
699typedef struct _MPI2_CONFIG_PAGE_MAN_4 {
700 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
701 U32 Reserved1; /*0x04 */
702 U32 Flags; /*0x08 */
703 U8 InquirySize; /*0x0C */
704 U8 Reserved2; /*0x0D */
705 U16 Reserved3; /*0x0E */
706 U8 InquiryData[56]; /*0x10 */
707 U32 RAID0VolumeSettings; /*0x48 */
708 U32 RAID1EVolumeSettings; /*0x4C */
709 U32 RAID1VolumeSettings; /*0x50 */
710 U32 RAID10VolumeSettings; /*0x54 */
711 U32 Reserved4; /*0x58 */
712 U32 Reserved5; /*0x5C */
713 MPI2_MANPAGE4_PWR_SAVE_SETTINGS PowerSaveSettings; /*0x60 */
714 U8 MaxOCEDisks; /*0x64 */
715 U8 ResyncRate; /*0x65 */
716 U16 DataScrubDuration; /*0x66 */
717 U8 MaxHotSpares; /*0x68 */
718 U8 MaxPhysDisksPerVol; /*0x69 */
719 U8 MaxPhysDisks; /*0x6A */
720 U8 MaxVolumes; /*0x6B */
721} MPI2_CONFIG_PAGE_MAN_4,
722 *PTR_MPI2_CONFIG_PAGE_MAN_4,
723 Mpi2ManufacturingPage4_t,
724 *pMpi2ManufacturingPage4_t;
725
726#define MPI2_MANUFACTURING4_PAGEVERSION (0x0A)
727
728/*Manufacturing Page 4 Flags field */
729#define MPI2_MANPAGE4_METADATA_SIZE_MASK (0x00030000)
730#define MPI2_MANPAGE4_METADATA_512MB (0x00000000)
731
732#define MPI2_MANPAGE4_MIX_SSD_SAS_SATA (0x00008000)
733#define MPI2_MANPAGE4_MIX_SSD_AND_NON_SSD (0x00004000)
734#define MPI2_MANPAGE4_HIDE_PHYSDISK_NON_IR (0x00002000)
735
736#define MPI2_MANPAGE4_MASK_PHYSDISK_COERCION (0x00001C00)
737#define MPI2_MANPAGE4_PHYSDISK_COERCION_1GB (0x00000000)
738#define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION (0x00000400)
739#define MPI2_MANPAGE4_PHYSDISK_ADAPTIVE_COERCION (0x00000800)
740#define MPI2_MANPAGE4_PHYSDISK_ZERO_COERCION (0x00000C00)
741
742#define MPI2_MANPAGE4_MASK_BAD_BLOCK_MARKING (0x00000300)
743#define MPI2_MANPAGE4_DEFAULT_BAD_BLOCK_MARKING (0x00000000)
744#define MPI2_MANPAGE4_TABLE_BAD_BLOCK_MARKING (0x00000100)
745#define MPI2_MANPAGE4_WRITE_LONG_BAD_BLOCK_MARKING (0x00000200)
746
747#define MPI2_MANPAGE4_FORCE_OFFLINE_FAILOVER (0x00000080)
748#define MPI2_MANPAGE4_RAID10_DISABLE (0x00000040)
749#define MPI2_MANPAGE4_RAID1E_DISABLE (0x00000020)
750#define MPI2_MANPAGE4_RAID1_DISABLE (0x00000010)
751#define MPI2_MANPAGE4_RAID0_DISABLE (0x00000008)
752#define MPI2_MANPAGE4_IR_MODEPAGE8_DISABLE (0x00000004)
753#define MPI2_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x00000002)
754#define MPI2_MANPAGE4_IR_NO_MIX_SAS_SATA (0x00000001)
755
756
757/*Manufacturing Page 5 */
758
759/*
760 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
761 *for NumPhys at runtime before using Phy[].
762 */
763
764typedef struct _MPI2_MANUFACTURING5_ENTRY {
765 U64 WWID; /*0x00 */
766 U64 DeviceName; /*0x08 */
767} MPI2_MANUFACTURING5_ENTRY,
768 *PTR_MPI2_MANUFACTURING5_ENTRY,
769 Mpi2Manufacturing5Entry_t,
770 *pMpi2Manufacturing5Entry_t;
771
772typedef struct _MPI2_CONFIG_PAGE_MAN_5 {
773 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
774 U8 NumPhys; /*0x04 */
775 U8 Reserved1; /*0x05 */
776 U16 Reserved2; /*0x06 */
777 U32 Reserved3; /*0x08 */
778 U32 Reserved4; /*0x0C */
779 MPI2_MANUFACTURING5_ENTRY Phy[]; /*0x10 */
780} MPI2_CONFIG_PAGE_MAN_5,
781 *PTR_MPI2_CONFIG_PAGE_MAN_5,
782 Mpi2ManufacturingPage5_t,
783 *pMpi2ManufacturingPage5_t;
784
785#define MPI2_MANUFACTURING5_PAGEVERSION (0x03)
786
787
788/*Manufacturing Page 6 */
789
790typedef struct _MPI2_CONFIG_PAGE_MAN_6 {
791 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
792 U32 ProductSpecificInfo;/*0x04 */
793} MPI2_CONFIG_PAGE_MAN_6,
794 *PTR_MPI2_CONFIG_PAGE_MAN_6,
795 Mpi2ManufacturingPage6_t,
796 *pMpi2ManufacturingPage6_t;
797
798#define MPI2_MANUFACTURING6_PAGEVERSION (0x00)
799
800
801/*Manufacturing Page 7 */
802
803typedef struct _MPI2_MANPAGE7_CONNECTOR_INFO {
804 U32 Pinout; /*0x00 */
805 U8 Connector[16]; /*0x04 */
806 U8 Location; /*0x14 */
807 U8 ReceptacleID; /*0x15 */
808 U16 Slot; /*0x16 */
809 U16 Slotx2; /*0x18 */
810 U16 Slotx4; /*0x1A */
811} MPI2_MANPAGE7_CONNECTOR_INFO,
812 *PTR_MPI2_MANPAGE7_CONNECTOR_INFO,
813 Mpi2ManPage7ConnectorInfo_t,
814 *pMpi2ManPage7ConnectorInfo_t;
815
816/*defines for the Pinout field */
817#define MPI2_MANPAGE7_PINOUT_LANE_MASK (0x0000FF00)
818#define MPI2_MANPAGE7_PINOUT_LANE_SHIFT (8)
819
820#define MPI2_MANPAGE7_PINOUT_TYPE_MASK (0x000000FF)
821#define MPI2_MANPAGE7_PINOUT_TYPE_UNKNOWN (0x00)
822#define MPI2_MANPAGE7_PINOUT_SATA_SINGLE (0x01)
823#define MPI2_MANPAGE7_PINOUT_SFF_8482 (0x02)
824#define MPI2_MANPAGE7_PINOUT_SFF_8486 (0x03)
825#define MPI2_MANPAGE7_PINOUT_SFF_8484 (0x04)
826#define MPI2_MANPAGE7_PINOUT_SFF_8087 (0x05)
827#define MPI2_MANPAGE7_PINOUT_SFF_8643_4I (0x06)
828#define MPI2_MANPAGE7_PINOUT_SFF_8643_8I (0x07)
829#define MPI2_MANPAGE7_PINOUT_SFF_8470 (0x08)
830#define MPI2_MANPAGE7_PINOUT_SFF_8088 (0x09)
831#define MPI2_MANPAGE7_PINOUT_SFF_8644_4X (0x0A)
832#define MPI2_MANPAGE7_PINOUT_SFF_8644_8X (0x0B)
833#define MPI2_MANPAGE7_PINOUT_SFF_8644_16X (0x0C)
834#define MPI2_MANPAGE7_PINOUT_SFF_8436 (0x0D)
835#define MPI2_MANPAGE7_PINOUT_SFF_8088_A (0x0E)
836#define MPI2_MANPAGE7_PINOUT_SFF_8643_16i (0x0F)
837#define MPI2_MANPAGE7_PINOUT_SFF_8654_4i (0x10)
838#define MPI2_MANPAGE7_PINOUT_SFF_8654_8i (0x11)
839#define MPI2_MANPAGE7_PINOUT_SFF_8611_4i (0x12)
840#define MPI2_MANPAGE7_PINOUT_SFF_8611_8i (0x13)
841
842/*defines for the Location field */
843#define MPI2_MANPAGE7_LOCATION_UNKNOWN (0x01)
844#define MPI2_MANPAGE7_LOCATION_INTERNAL (0x02)
845#define MPI2_MANPAGE7_LOCATION_EXTERNAL (0x04)
846#define MPI2_MANPAGE7_LOCATION_SWITCHABLE (0x08)
847#define MPI2_MANPAGE7_LOCATION_AUTO (0x10)
848#define MPI2_MANPAGE7_LOCATION_NOT_PRESENT (0x20)
849#define MPI2_MANPAGE7_LOCATION_NOT_CONNECTED (0x80)
850
851/*defines for the Slot field */
852#define MPI2_MANPAGE7_SLOT_UNKNOWN (0xFFFF)
853
854/*
855 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
856 *for NumPhys at runtime before using ConnectorInfo[].
857 */
858
859typedef struct _MPI2_CONFIG_PAGE_MAN_7 {
860 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
861 U32 Reserved1; /*0x04 */
862 U32 Reserved2; /*0x08 */
863 U32 Flags; /*0x0C */
864 U8 EnclosureName[16]; /*0x10 */
865 U8 NumPhys; /*0x20 */
866 U8 Reserved3; /*0x21 */
867 U16 Reserved4; /*0x22 */
868 MPI2_MANPAGE7_CONNECTOR_INFO ConnectorInfo[]; /*0x24 */
869} MPI2_CONFIG_PAGE_MAN_7,
870 *PTR_MPI2_CONFIG_PAGE_MAN_7,
871 Mpi2ManufacturingPage7_t,
872 *pMpi2ManufacturingPage7_t;
873
874#define MPI2_MANUFACTURING7_PAGEVERSION (0x01)
875
876/*defines for the Flags field */
877#define MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL (0x00000008)
878#define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER (0x00000002)
879#define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001)
880
881#define MPI26_MANPAGE7_FLAG_CONN_LANE_USE_PINOUT (0x00000020)
882#define MPI26_MANPAGE7_FLAG_X2_X4_SLOT_INFO_VALID (0x00000010)
883
884/*
885 *Generic structure to use for product-specific manufacturing pages
886 *(currently Manufacturing Page 8 through Manufacturing Page 31).
887 */
888
889typedef struct _MPI2_CONFIG_PAGE_MAN_PS {
890 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
891 U32 ProductSpecificInfo;/*0x04 */
892} MPI2_CONFIG_PAGE_MAN_PS,
893 *PTR_MPI2_CONFIG_PAGE_MAN_PS,
894 Mpi2ManufacturingPagePS_t,
895 *pMpi2ManufacturingPagePS_t;
896
897#define MPI2_MANUFACTURING8_PAGEVERSION (0x00)
898#define MPI2_MANUFACTURING9_PAGEVERSION (0x00)
899#define MPI2_MANUFACTURING10_PAGEVERSION (0x00)
900#define MPI2_MANUFACTURING11_PAGEVERSION (0x00)
901#define MPI2_MANUFACTURING12_PAGEVERSION (0x00)
902#define MPI2_MANUFACTURING13_PAGEVERSION (0x00)
903#define MPI2_MANUFACTURING14_PAGEVERSION (0x00)
904#define MPI2_MANUFACTURING15_PAGEVERSION (0x00)
905#define MPI2_MANUFACTURING16_PAGEVERSION (0x00)
906#define MPI2_MANUFACTURING17_PAGEVERSION (0x00)
907#define MPI2_MANUFACTURING18_PAGEVERSION (0x00)
908#define MPI2_MANUFACTURING19_PAGEVERSION (0x00)
909#define MPI2_MANUFACTURING20_PAGEVERSION (0x00)
910#define MPI2_MANUFACTURING21_PAGEVERSION (0x00)
911#define MPI2_MANUFACTURING22_PAGEVERSION (0x00)
912#define MPI2_MANUFACTURING23_PAGEVERSION (0x00)
913#define MPI2_MANUFACTURING24_PAGEVERSION (0x00)
914#define MPI2_MANUFACTURING25_PAGEVERSION (0x00)
915#define MPI2_MANUFACTURING26_PAGEVERSION (0x00)
916#define MPI2_MANUFACTURING27_PAGEVERSION (0x00)
917#define MPI2_MANUFACTURING28_PAGEVERSION (0x00)
918#define MPI2_MANUFACTURING29_PAGEVERSION (0x00)
919#define MPI2_MANUFACTURING30_PAGEVERSION (0x00)
920#define MPI2_MANUFACTURING31_PAGEVERSION (0x00)
921
922
923/****************************************************************************
924* IO Unit Config Pages
925****************************************************************************/
926
927/*IO Unit Page 0 */
928
929typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_0 {
930 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
931 U64 UniqueValue; /*0x04 */
932 MPI2_VERSION_UNION NvdataVersionDefault; /*0x08 */
933 MPI2_VERSION_UNION NvdataVersionPersistent; /*0x0A */
934} MPI2_CONFIG_PAGE_IO_UNIT_0,
935 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_0,
936 Mpi2IOUnitPage0_t, *pMpi2IOUnitPage0_t;
937
938#define MPI2_IOUNITPAGE0_PAGEVERSION (0x02)
939
940
941/*IO Unit Page 1 */
942
943typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_1 {
944 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
945 U32 Flags; /*0x04 */
946} MPI2_CONFIG_PAGE_IO_UNIT_1,
947 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_1,
948 Mpi2IOUnitPage1_t, *pMpi2IOUnitPage1_t;
949
950#define MPI2_IOUNITPAGE1_PAGEVERSION (0x04)
951
952/* IO Unit Page 1 Flags defines */
953#define MPI26_IOUNITPAGE1_NVME_WRCACHE_MASK (0x00030000)
954#define MPI26_IOUNITPAGE1_NVME_WRCACHE_SHIFT (16)
955#define MPI26_IOUNITPAGE1_NVME_WRCACHE_NO_CHANGE (0x00000000)
956#define MPI26_IOUNITPAGE1_NVME_WRCACHE_ENABLE (0x00010000)
957#define MPI26_IOUNITPAGE1_NVME_WRCACHE_DISABLE (0x00020000)
958#define MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK (0x00004000)
959#define MPI25_IOUNITPAGE1_NEW_DEVICE_FAST_PATH_DISABLE (0x00002000)
960#define MPI25_IOUNITPAGE1_DISABLE_FAST_PATH (0x00001000)
961#define MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY (0x00000800)
962#define MPI2_IOUNITPAGE1_MASK_SATA_WRITE_CACHE (0x00000600)
963#define MPI2_IOUNITPAGE1_SATA_WRITE_CACHE_SHIFT (9)
964#define MPI2_IOUNITPAGE1_ENABLE_SATA_WRITE_CACHE (0x00000000)
965#define MPI2_IOUNITPAGE1_DISABLE_SATA_WRITE_CACHE (0x00000200)
966#define MPI2_IOUNITPAGE1_UNCHANGED_SATA_WRITE_CACHE (0x00000400)
967#define MPI2_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE (0x00000100)
968#define MPI2_IOUNITPAGE1_DISABLE_IR (0x00000040)
969#define MPI2_IOUNITPAGE1_DISABLE_TASK_SET_FULL_HANDLING (0x00000020)
970#define MPI2_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID (0x00000004)
971
972
973/*IO Unit Page 3 */
974
975/*
976 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
977 *36 and check the value returned for GPIOCount at runtime.
978 */
979#ifndef MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX
980#define MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX (36)
981#endif
982
983typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_3 {
984 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
985 U8 GPIOCount; /*0x04 */
986 U8 Reserved1; /*0x05 */
987 U16 Reserved2; /*0x06 */
988 U16
989 GPIOVal[MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX];/*0x08 */
990} MPI2_CONFIG_PAGE_IO_UNIT_3,
991 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_3,
992 Mpi2IOUnitPage3_t, *pMpi2IOUnitPage3_t;
993
994#define MPI2_IOUNITPAGE3_PAGEVERSION (0x01)
995
996/*defines for IO Unit Page 3 GPIOVal field */
997#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_MASK (0xFFFC)
998#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_SHIFT (2)
999#define MPI2_IOUNITPAGE3_GPIO_SETTING_OFF (0x0000)
1000#define MPI2_IOUNITPAGE3_GPIO_SETTING_ON (0x0001)
1001
1002
1003/*IO Unit Page 5 */
1004
1005/*
1006 *Upper layer code (drivers, utilities, etc.) should check the value returned
1007 *for NumDmaEngines at runtime before using DmaEngineCapabilities[].
1008 */
1009
1010typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_5 {
1011 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1012 U64
1013 RaidAcceleratorBufferBaseAddress; /*0x04 */
1014 U64
1015 RaidAcceleratorBufferSize; /*0x0C */
1016 U64
1017 RaidAcceleratorControlBaseAddress; /*0x14 */
1018 U8 RAControlSize; /*0x1C */
1019 U8 NumDmaEngines; /*0x1D */
1020 U8 RAMinControlSize; /*0x1E */
1021 U8 RAMaxControlSize; /*0x1F */
1022 U32 Reserved1; /*0x20 */
1023 U32 Reserved2; /*0x24 */
1024 U32 Reserved3; /*0x28 */
1025 U32
1026 DmaEngineCapabilities[]; /*0x2C */
1027} MPI2_CONFIG_PAGE_IO_UNIT_5,
1028 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_5,
1029 Mpi2IOUnitPage5_t, *pMpi2IOUnitPage5_t;
1030
1031#define MPI2_IOUNITPAGE5_PAGEVERSION (0x00)
1032
1033/*defines for IO Unit Page 5 DmaEngineCapabilities field */
1034#define MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS (0xFFFF0000)
1035#define MPI2_IOUNITPAGE5_DMA_CAP_SHIFT_MAX_REQUESTS (16)
1036
1037#define MPI2_IOUNITPAGE5_DMA_CAP_EEDP (0x0008)
1038#define MPI2_IOUNITPAGE5_DMA_CAP_PARITY_GENERATION (0x0004)
1039#define MPI2_IOUNITPAGE5_DMA_CAP_HASHING (0x0002)
1040#define MPI2_IOUNITPAGE5_DMA_CAP_ENCRYPTION (0x0001)
1041
1042
1043/*IO Unit Page 6 */
1044
1045typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_6 {
1046 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1047 U16 Flags; /*0x04 */
1048 U8 RAHostControlSize; /*0x06 */
1049 U8 Reserved0; /*0x07 */
1050 U64
1051 RaidAcceleratorHostControlBaseAddress; /*0x08 */
1052 U32 Reserved1; /*0x10 */
1053 U32 Reserved2; /*0x14 */
1054 U32 Reserved3; /*0x18 */
1055} MPI2_CONFIG_PAGE_IO_UNIT_6,
1056 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_6,
1057 Mpi2IOUnitPage6_t, *pMpi2IOUnitPage6_t;
1058
1059#define MPI2_IOUNITPAGE6_PAGEVERSION (0x00)
1060
1061/*defines for IO Unit Page 6 Flags field */
1062#define MPI2_IOUNITPAGE6_FLAGS_ENABLE_RAID_ACCELERATOR (0x0001)
1063
1064
1065/*IO Unit Page 7 */
1066
1067typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 {
1068 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1069 U8 CurrentPowerMode; /*0x04 */
1070 U8 PreviousPowerMode; /*0x05 */
1071 U8 PCIeWidth; /*0x06 */
1072 U8 PCIeSpeed; /*0x07 */
1073 U32 ProcessorState; /*0x08 */
1074 U32
1075 PowerManagementCapabilities; /*0x0C */
1076 U16 IOCTemperature; /*0x10 */
1077 U8
1078 IOCTemperatureUnits; /*0x12 */
1079 U8 IOCSpeed; /*0x13 */
1080 U16 BoardTemperature; /*0x14 */
1081 U8
1082 BoardTemperatureUnits; /*0x16 */
1083 U8 Reserved3; /*0x17 */
1084 U32 BoardPowerRequirement; /*0x18 */
1085 U32 PCISlotPowerAllocation; /*0x1C */
1086/* reserved prior to MPI v2.6 */
1087 U8 Flags; /* 0x20 */
1088 U8 Reserved6; /* 0x21 */
1089 U16 Reserved7; /* 0x22 */
1090 U32 Reserved8; /* 0x24 */
1091} MPI2_CONFIG_PAGE_IO_UNIT_7,
1092 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_7,
1093 Mpi2IOUnitPage7_t, *pMpi2IOUnitPage7_t;
1094
1095#define MPI2_IOUNITPAGE7_PAGEVERSION (0x05)
1096
1097/*defines for IO Unit Page 7 CurrentPowerMode and PreviousPowerMode fields */
1098#define MPI25_IOUNITPAGE7_PM_INIT_MASK (0xC0)
1099#define MPI25_IOUNITPAGE7_PM_INIT_UNAVAILABLE (0x00)
1100#define MPI25_IOUNITPAGE7_PM_INIT_HOST (0x40)
1101#define MPI25_IOUNITPAGE7_PM_INIT_IO_UNIT (0x80)
1102#define MPI25_IOUNITPAGE7_PM_INIT_PCIE_DPA (0xC0)
1103
1104#define MPI25_IOUNITPAGE7_PM_MODE_MASK (0x07)
1105#define MPI25_IOUNITPAGE7_PM_MODE_UNAVAILABLE (0x00)
1106#define MPI25_IOUNITPAGE7_PM_MODE_UNKNOWN (0x01)
1107#define MPI25_IOUNITPAGE7_PM_MODE_FULL_POWER (0x04)
1108#define MPI25_IOUNITPAGE7_PM_MODE_REDUCED_POWER (0x05)
1109#define MPI25_IOUNITPAGE7_PM_MODE_STANDBY (0x06)
1110
1111
1112/*defines for IO Unit Page 7 PCIeWidth field */
1113#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X1 (0x01)
1114#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2 (0x02)
1115#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4 (0x04)
1116#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8 (0x08)
1117#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X16 (0x10)
1118
1119/*defines for IO Unit Page 7 PCIeSpeed field */
1120#define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS (0x00)
1121#define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS (0x01)
1122#define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS (0x02)
1123#define MPI2_IOUNITPAGE7_PCIE_SPEED_16_0_GBPS (0x03)
1124
1125/*defines for IO Unit Page 7 ProcessorState field */
1126#define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND (0x0000000F)
1127#define MPI2_IOUNITPAGE7_PSTATE_SHIFT_SECOND (0)
1128
1129#define MPI2_IOUNITPAGE7_PSTATE_NOT_PRESENT (0x00)
1130#define MPI2_IOUNITPAGE7_PSTATE_DISABLED (0x01)
1131#define MPI2_IOUNITPAGE7_PSTATE_ENABLED (0x02)
1132
1133/*defines for IO Unit Page 7 PowerManagementCapabilities field */
1134#define MPI25_IOUNITPAGE7_PMCAP_DPA_FULL_PWR_MODE (0x00400000)
1135#define MPI25_IOUNITPAGE7_PMCAP_DPA_REDUCED_PWR_MODE (0x00200000)
1136#define MPI25_IOUNITPAGE7_PMCAP_DPA_STANDBY_MODE (0x00100000)
1137#define MPI25_IOUNITPAGE7_PMCAP_HOST_FULL_PWR_MODE (0x00040000)
1138#define MPI25_IOUNITPAGE7_PMCAP_HOST_REDUCED_PWR_MODE (0x00020000)
1139#define MPI25_IOUNITPAGE7_PMCAP_HOST_STANDBY_MODE (0x00010000)
1140#define MPI25_IOUNITPAGE7_PMCAP_IO_FULL_PWR_MODE (0x00004000)
1141#define MPI25_IOUNITPAGE7_PMCAP_IO_REDUCED_PWR_MODE (0x00002000)
1142#define MPI25_IOUNITPAGE7_PMCAP_IO_STANDBY_MODE (0x00001000)
1143#define MPI2_IOUNITPAGE7_PMCAP_HOST_12_5_PCT_IOCSPEED (0x00000400)
1144#define MPI2_IOUNITPAGE7_PMCAP_HOST_25_0_PCT_IOCSPEED (0x00000200)
1145#define MPI2_IOUNITPAGE7_PMCAP_HOST_50_0_PCT_IOCSPEED (0x00000100)
1146#define MPI25_IOUNITPAGE7_PMCAP_IO_12_5_PCT_IOCSPEED (0x00000040)
1147#define MPI25_IOUNITPAGE7_PMCAP_IO_25_0_PCT_IOCSPEED (0x00000020)
1148#define MPI25_IOUNITPAGE7_PMCAP_IO_50_0_PCT_IOCSPEED (0x00000010)
1149#define MPI2_IOUNITPAGE7_PMCAP_HOST_WIDTH_CHANGE_PCIE (0x00000008)
1150#define MPI2_IOUNITPAGE7_PMCAP_HOST_SPEED_CHANGE_PCIE (0x00000004)
1151#define MPI25_IOUNITPAGE7_PMCAP_IO_WIDTH_CHANGE_PCIE (0x00000002)
1152#define MPI25_IOUNITPAGE7_PMCAP_IO_SPEED_CHANGE_PCIE (0x00000001)
1153
1154/*obsolete names for the PowerManagementCapabilities bits (above) */
1155#define MPI2_IOUNITPAGE7_PMCAP_12_5_PCT_IOCSPEED (0x00000400)
1156#define MPI2_IOUNITPAGE7_PMCAP_25_0_PCT_IOCSPEED (0x00000200)
1157#define MPI2_IOUNITPAGE7_PMCAP_50_0_PCT_IOCSPEED (0x00000100)
1158#define MPI2_IOUNITPAGE7_PMCAP_PCIE_WIDTH_CHANGE (0x00000008) /*obsolete */
1159#define MPI2_IOUNITPAGE7_PMCAP_PCIE_SPEED_CHANGE (0x00000004) /*obsolete */
1160
1161
1162/*defines for IO Unit Page 7 IOCTemperatureUnits field */
1163#define MPI2_IOUNITPAGE7_IOC_TEMP_NOT_PRESENT (0x00)
1164#define MPI2_IOUNITPAGE7_IOC_TEMP_FAHRENHEIT (0x01)
1165#define MPI2_IOUNITPAGE7_IOC_TEMP_CELSIUS (0x02)
1166
1167/*defines for IO Unit Page 7 IOCSpeed field */
1168#define MPI2_IOUNITPAGE7_IOC_SPEED_FULL (0x01)
1169#define MPI2_IOUNITPAGE7_IOC_SPEED_HALF (0x02)
1170#define MPI2_IOUNITPAGE7_IOC_SPEED_QUARTER (0x04)
1171#define MPI2_IOUNITPAGE7_IOC_SPEED_EIGHTH (0x08)
1172
1173/*defines for IO Unit Page 7 BoardTemperatureUnits field */
1174#define MPI2_IOUNITPAGE7_BOARD_TEMP_NOT_PRESENT (0x00)
1175#define MPI2_IOUNITPAGE7_BOARD_TEMP_FAHRENHEIT (0x01)
1176#define MPI2_IOUNITPAGE7_BOARD_TEMP_CELSIUS (0x02)
1177
1178/* defines for IO Unit Page 7 Flags field */
1179#define MPI2_IOUNITPAGE7_FLAG_CABLE_POWER_EXC (0x01)
1180
1181/*IO Unit Page 8 */
1182
1183#define MPI2_IOUNIT8_NUM_THRESHOLDS (4)
1184
1185typedef struct _MPI2_IOUNIT8_SENSOR {
1186 U16 Flags; /*0x00 */
1187 U16 Reserved1; /*0x02 */
1188 U16
1189 Threshold[MPI2_IOUNIT8_NUM_THRESHOLDS]; /*0x04 */
1190 U32 Reserved2; /*0x0C */
1191 U32 Reserved3; /*0x10 */
1192 U32 Reserved4; /*0x14 */
1193} MPI2_IOUNIT8_SENSOR, *PTR_MPI2_IOUNIT8_SENSOR,
1194 Mpi2IOUnit8Sensor_t, *pMpi2IOUnit8Sensor_t;
1195
1196/*defines for IO Unit Page 8 Sensor Flags field */
1197#define MPI2_IOUNIT8_SENSOR_FLAGS_T3_ENABLE (0x0008)
1198#define MPI2_IOUNIT8_SENSOR_FLAGS_T2_ENABLE (0x0004)
1199#define MPI2_IOUNIT8_SENSOR_FLAGS_T1_ENABLE (0x0002)
1200#define MPI2_IOUNIT8_SENSOR_FLAGS_T0_ENABLE (0x0001)
1201
1202/*
1203 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
1204 *for NumSensors at runtime before using Sensor[].
1205 */
1206
1207typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_8 {
1208 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1209 U32 Reserved1; /*0x04 */
1210 U32 Reserved2; /*0x08 */
1211 U8 NumSensors; /*0x0C */
1212 U8 PollingInterval; /*0x0D */
1213 U16 Reserved3; /*0x0E */
1214 MPI2_IOUNIT8_SENSOR Sensor[]; /*0x10 */
1215} MPI2_CONFIG_PAGE_IO_UNIT_8,
1216 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_8,
1217 Mpi2IOUnitPage8_t, *pMpi2IOUnitPage8_t;
1218
1219#define MPI2_IOUNITPAGE8_PAGEVERSION (0x00)
1220
1221
1222/*IO Unit Page 9 */
1223
1224typedef struct _MPI2_IOUNIT9_SENSOR {
1225 U16 CurrentTemperature; /*0x00 */
1226 U16 Reserved1; /*0x02 */
1227 U8 Flags; /*0x04 */
1228 U8 Reserved2; /*0x05 */
1229 U16 Reserved3; /*0x06 */
1230 U32 Reserved4; /*0x08 */
1231 U32 Reserved5; /*0x0C */
1232} MPI2_IOUNIT9_SENSOR, *PTR_MPI2_IOUNIT9_SENSOR,
1233 Mpi2IOUnit9Sensor_t, *pMpi2IOUnit9Sensor_t;
1234
1235/*defines for IO Unit Page 9 Sensor Flags field */
1236#define MPI2_IOUNIT9_SENSOR_FLAGS_TEMP_VALID (0x01)
1237
1238/*
1239 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
1240 *for NumSensors at runtime before using Sensor[].
1241 */
1242
1243typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_9 {
1244 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1245 U32 Reserved1; /*0x04 */
1246 U32 Reserved2; /*0x08 */
1247 U8 NumSensors; /*0x0C */
1248 U8 Reserved4; /*0x0D */
1249 U16 Reserved3; /*0x0E */
1250 MPI2_IOUNIT9_SENSOR Sensor[]; /*0x10 */
1251} MPI2_CONFIG_PAGE_IO_UNIT_9,
1252 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_9,
1253 Mpi2IOUnitPage9_t, *pMpi2IOUnitPage9_t;
1254
1255#define MPI2_IOUNITPAGE9_PAGEVERSION (0x00)
1256
1257
1258/*IO Unit Page 10 */
1259
1260typedef struct _MPI2_IOUNIT10_FUNCTION {
1261 U8 CreditPercent; /*0x00 */
1262 U8 Reserved1; /*0x01 */
1263 U16 Reserved2; /*0x02 */
1264} MPI2_IOUNIT10_FUNCTION,
1265 *PTR_MPI2_IOUNIT10_FUNCTION,
1266 Mpi2IOUnit10Function_t,
1267 *pMpi2IOUnit10Function_t;
1268
1269/*
1270 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
1271 *for NumFunctions at runtime before using Function[].
1272 */
1273
1274typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_10 {
1275 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1276 U8 NumFunctions; /*0x04 */
1277 U8 Reserved1; /*0x05 */
1278 U16 Reserved2; /*0x06 */
1279 U32 Reserved3; /*0x08 */
1280 U32 Reserved4; /*0x0C */
1281 MPI2_IOUNIT10_FUNCTION Function[]; /*0x10 */
1282} MPI2_CONFIG_PAGE_IO_UNIT_10,
1283 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_10,
1284 Mpi2IOUnitPage10_t, *pMpi2IOUnitPage10_t;
1285
1286#define MPI2_IOUNITPAGE10_PAGEVERSION (0x01)
1287
1288
1289/* IO Unit Page 11 (for MPI v2.6 and later) */
1290
1291typedef struct _MPI26_IOUNIT11_SPINUP_GROUP {
1292 U8 MaxTargetSpinup; /* 0x00 */
1293 U8 SpinupDelay; /* 0x01 */
1294 U8 SpinupFlags; /* 0x02 */
1295 U8 Reserved1; /* 0x03 */
1296} MPI26_IOUNIT11_SPINUP_GROUP,
1297 *PTR_MPI26_IOUNIT11_SPINUP_GROUP,
1298 Mpi26IOUnit11SpinupGroup_t,
1299 *pMpi26IOUnit11SpinupGroup_t;
1300
1301/* defines for IO Unit Page 11 SpinupFlags */
1302#define MPI26_IOUNITPAGE11_SPINUP_DISABLE_FLAG (0x01)
1303
1304
1305/*
1306 * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1307 * four and check the value returned for NumPhys at runtime.
1308 */
1309#ifndef MPI26_IOUNITPAGE11_PHY_MAX
1310#define MPI26_IOUNITPAGE11_PHY_MAX (4)
1311#endif
1312
1313typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 {
1314 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1315 U32 Reserved1; /*0x04 */
1316 MPI26_IOUNIT11_SPINUP_GROUP SpinupGroupParameters[4]; /*0x08 */
1317 U32 Reserved2; /*0x18 */
1318 U32 Reserved3; /*0x1C */
1319 U32 Reserved4; /*0x20 */
1320 U8 BootDeviceWaitTime; /*0x24 */
1321 U8 Reserved5; /*0x25 */
1322 U16 Reserved6; /*0x26 */
1323 U8 NumPhys; /*0x28 */
1324 U8 PEInitialSpinupDelay; /*0x29 */
1325 U8 PEReplyDelay; /*0x2A */
1326 U8 Flags; /*0x2B */
1327 U8 PHY[MPI26_IOUNITPAGE11_PHY_MAX];/*0x2C */
1328} MPI26_CONFIG_PAGE_IO_UNIT_11,
1329 *PTR_MPI26_CONFIG_PAGE_IO_UNIT_11,
1330 Mpi26IOUnitPage11_t,
1331 *pMpi26IOUnitPage11_t;
1332
1333#define MPI26_IOUNITPAGE11_PAGEVERSION (0x00)
1334
1335/* defines for Flags field */
1336#define MPI26_IOUNITPAGE11_FLAGS_AUTO_PORTENABLE (0x01)
1337
1338/* defines for PHY field */
1339#define MPI26_IOUNITPAGE11_PHY_SPINUP_GROUP_MASK (0x03)
1340
1341
1342
1343
1344
1345
1346/****************************************************************************
1347* IOC Config Pages
1348****************************************************************************/
1349
1350/*IOC Page 0 */
1351
1352typedef struct _MPI2_CONFIG_PAGE_IOC_0 {
1353 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1354 U32 Reserved1; /*0x04 */
1355 U32 Reserved2; /*0x08 */
1356 U16 VendorID; /*0x0C */
1357 U16 DeviceID; /*0x0E */
1358 U8 RevisionID; /*0x10 */
1359 U8 Reserved3; /*0x11 */
1360 U16 Reserved4; /*0x12 */
1361 U32 ClassCode; /*0x14 */
1362 U16 SubsystemVendorID; /*0x18 */
1363 U16 SubsystemID; /*0x1A */
1364} MPI2_CONFIG_PAGE_IOC_0,
1365 *PTR_MPI2_CONFIG_PAGE_IOC_0,
1366 Mpi2IOCPage0_t, *pMpi2IOCPage0_t;
1367
1368#define MPI2_IOCPAGE0_PAGEVERSION (0x02)
1369
1370
1371/*IOC Page 1 */
1372
1373typedef struct _MPI2_CONFIG_PAGE_IOC_1 {
1374 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1375 U32 Flags; /*0x04 */
1376 U32 CoalescingTimeout; /*0x08 */
1377 U8 CoalescingDepth; /*0x0C */
1378 U8 PCISlotNum; /*0x0D */
1379 U8 PCIBusNum; /*0x0E */
1380 U8 PCIDomainSegment; /*0x0F */
1381 U32 Reserved1; /*0x10 */
1382 U32 ProductSpecific; /* 0x14 */
1383} MPI2_CONFIG_PAGE_IOC_1,
1384 *PTR_MPI2_CONFIG_PAGE_IOC_1,
1385 Mpi2IOCPage1_t, *pMpi2IOCPage1_t;
1386
1387#define MPI2_IOCPAGE1_PAGEVERSION (0x05)
1388
1389/*defines for IOC Page 1 Flags field */
1390#define MPI2_IOCPAGE1_REPLY_COALESCING (0x00000001)
1391
1392#define MPI2_IOCPAGE1_PCISLOTNUM_UNKNOWN (0xFF)
1393#define MPI2_IOCPAGE1_PCIBUSNUM_UNKNOWN (0xFF)
1394#define MPI2_IOCPAGE1_PCIDOMAIN_UNKNOWN (0xFF)
1395
1396/*IOC Page 6 */
1397
1398typedef struct _MPI2_CONFIG_PAGE_IOC_6 {
1399 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1400 U32
1401 CapabilitiesFlags; /*0x04 */
1402 U8 MaxDrivesRAID0; /*0x08 */
1403 U8 MaxDrivesRAID1; /*0x09 */
1404 U8
1405 MaxDrivesRAID1E; /*0x0A */
1406 U8
1407 MaxDrivesRAID10; /*0x0B */
1408 U8 MinDrivesRAID0; /*0x0C */
1409 U8 MinDrivesRAID1; /*0x0D */
1410 U8
1411 MinDrivesRAID1E; /*0x0E */
1412 U8
1413 MinDrivesRAID10; /*0x0F */
1414 U32 Reserved1; /*0x10 */
1415 U8
1416 MaxGlobalHotSpares; /*0x14 */
1417 U8 MaxPhysDisks; /*0x15 */
1418 U8 MaxVolumes; /*0x16 */
1419 U8 MaxConfigs; /*0x17 */
1420 U8 MaxOCEDisks; /*0x18 */
1421 U8 Reserved2; /*0x19 */
1422 U16 Reserved3; /*0x1A */
1423 U32
1424 SupportedStripeSizeMapRAID0; /*0x1C */
1425 U32
1426 SupportedStripeSizeMapRAID1E; /*0x20 */
1427 U32
1428 SupportedStripeSizeMapRAID10; /*0x24 */
1429 U32 Reserved4; /*0x28 */
1430 U32 Reserved5; /*0x2C */
1431 U16
1432 DefaultMetadataSize; /*0x30 */
1433 U16 Reserved6; /*0x32 */
1434 U16
1435 MaxBadBlockTableEntries; /*0x34 */
1436 U16 Reserved7; /*0x36 */
1437 U32
1438 IRNvsramVersion; /*0x38 */
1439} MPI2_CONFIG_PAGE_IOC_6,
1440 *PTR_MPI2_CONFIG_PAGE_IOC_6,
1441 Mpi2IOCPage6_t, *pMpi2IOCPage6_t;
1442
1443#define MPI2_IOCPAGE6_PAGEVERSION (0x05)
1444
1445/*defines for IOC Page 6 CapabilitiesFlags */
1446#define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT (0x00000020)
1447#define MPI2_IOCPAGE6_CAP_FLAGS_RAID10_SUPPORT (0x00000010)
1448#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1_SUPPORT (0x00000008)
1449#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1E_SUPPORT (0x00000004)
1450#define MPI2_IOCPAGE6_CAP_FLAGS_RAID0_SUPPORT (0x00000002)
1451#define MPI2_IOCPAGE6_CAP_FLAGS_GLOBAL_HOT_SPARE (0x00000001)
1452
1453
1454/*IOC Page 7 */
1455
1456#define MPI2_IOCPAGE7_EVENTMASK_WORDS (4)
1457
1458typedef struct _MPI2_CONFIG_PAGE_IOC_7 {
1459 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1460 U32 Reserved1; /*0x04 */
1461 U32
1462 EventMasks[MPI2_IOCPAGE7_EVENTMASK_WORDS];/*0x08 */
1463 U16 SASBroadcastPrimitiveMasks; /*0x18 */
1464 U16 SASNotifyPrimitiveMasks; /*0x1A */
1465 U32 Reserved3; /*0x1C */
1466} MPI2_CONFIG_PAGE_IOC_7,
1467 *PTR_MPI2_CONFIG_PAGE_IOC_7,
1468 Mpi2IOCPage7_t, *pMpi2IOCPage7_t;
1469
1470#define MPI2_IOCPAGE7_PAGEVERSION (0x02)
1471
1472
1473/*IOC Page 8 */
1474
1475typedef struct _MPI2_CONFIG_PAGE_IOC_8 {
1476 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1477 U8 NumDevsPerEnclosure; /*0x04 */
1478 U8 Reserved1; /*0x05 */
1479 U16 Reserved2; /*0x06 */
1480 U16 MaxPersistentEntries; /*0x08 */
1481 U16 MaxNumPhysicalMappedIDs; /*0x0A */
1482 U16 Flags; /*0x0C */
1483 U16 Reserved3; /*0x0E */
1484 U16 IRVolumeMappingFlags; /*0x10 */
1485 U16 Reserved4; /*0x12 */
1486 U32 Reserved5; /*0x14 */
1487} MPI2_CONFIG_PAGE_IOC_8,
1488 *PTR_MPI2_CONFIG_PAGE_IOC_8,
1489 Mpi2IOCPage8_t, *pMpi2IOCPage8_t;
1490
1491#define MPI2_IOCPAGE8_PAGEVERSION (0x00)
1492
1493/*defines for IOC Page 8 Flags field */
1494#define MPI2_IOCPAGE8_FLAGS_DA_START_SLOT_1 (0x00000020)
1495#define MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0 (0x00000010)
1496
1497#define MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE (0x0000000E)
1498#define MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING (0x00000000)
1499#define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING (0x00000002)
1500
1501#define MPI2_IOCPAGE8_FLAGS_DISABLE_PERSISTENT_MAPPING (0x00000001)
1502#define MPI2_IOCPAGE8_FLAGS_ENABLE_PERSISTENT_MAPPING (0x00000000)
1503
1504/*defines for IOC Page 8 IRVolumeMappingFlags */
1505#define MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE (0x00000003)
1506#define MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING (0x00000000)
1507#define MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING (0x00000001)
1508
1509
1510/****************************************************************************
1511* BIOS Config Pages
1512****************************************************************************/
1513
1514/*BIOS Page 1 */
1515
1516typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
1517 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1518 U32 BiosOptions; /*0x04 */
1519 U32 IOCSettings; /*0x08 */
1520 U8 SSUTimeout; /*0x0C */
1521 U8 MaxEnclosureLevel; /*0x0D */
1522 U16 Reserved2; /*0x0E */
1523 U32 DeviceSettings; /*0x10 */
1524 U16 NumberOfDevices; /*0x14 */
1525 U16 UEFIVersion; /*0x16 */
1526 U16 IOTimeoutBlockDevicesNonRM; /*0x18 */
1527 U16 IOTimeoutSequential; /*0x1A */
1528 U16 IOTimeoutOther; /*0x1C */
1529 U16 IOTimeoutBlockDevicesRM; /*0x1E */
1530} MPI2_CONFIG_PAGE_BIOS_1,
1531 *PTR_MPI2_CONFIG_PAGE_BIOS_1,
1532 Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
1533
1534#define MPI2_BIOSPAGE1_PAGEVERSION (0x07)
1535
1536/*values for BIOS Page 1 BiosOptions field */
1537#define MPI2_BIOSPAGE1_OPTIONS_BOOT_LIST_ADD_ALT_BOOT_DEVICE (0x00008000)
1538#define MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG (0x00004000)
1539
1540#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK (0x00003800)
1541#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL (0x00000000)
1542#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE (0x00000800)
1543#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID (0x00001000)
1544#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS (0x00001800)
1545#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY (0x00002000)
1546
1547#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS (0x00000400)
1548
1549#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD (0x00000300)
1550#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD (0x00000000)
1551#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD (0x00000100)
1552#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD (0x00000200)
1553#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD (0x00000300)
1554
1555#define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID (0x000000F0)
1556#define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID (0x00000000)
1557
1558#define MPI2_BIOSPAGE1_OPTIONS_MASK_UEFI_HII_REGISTRATION (0x00000006)
1559#define MPI2_BIOSPAGE1_OPTIONS_ENABLE_UEFI_HII (0x00000000)
1560#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_UEFI_HII (0x00000002)
1561#define MPI2_BIOSPAGE1_OPTIONS_VERSION_CHECK_UEFI_HII (0x00000004)
1562
1563#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_BIOS (0x00000001)
1564
1565/*values for BIOS Page 1 IOCSettings field */
1566#define MPI2_BIOSPAGE1_IOCSET_MASK_BOOT_PREFERENCE (0x00030000)
1567#define MPI2_BIOSPAGE1_IOCSET_ENCLOSURE_SLOT_BOOT (0x00000000)
1568#define MPI2_BIOSPAGE1_IOCSET_SAS_ADDRESS_BOOT (0x00010000)
1569
1570#define MPI2_BIOSPAGE1_IOCSET_MASK_RM_SETTING (0x000000C0)
1571#define MPI2_BIOSPAGE1_IOCSET_NONE_RM_SETTING (0x00000000)
1572#define MPI2_BIOSPAGE1_IOCSET_BOOT_RM_SETTING (0x00000040)
1573#define MPI2_BIOSPAGE1_IOCSET_MEDIA_RM_SETTING (0x00000080)
1574
1575#define MPI2_BIOSPAGE1_IOCSET_MASK_ADAPTER_SUPPORT (0x00000030)
1576#define MPI2_BIOSPAGE1_IOCSET_NO_SUPPORT (0x00000000)
1577#define MPI2_BIOSPAGE1_IOCSET_BIOS_SUPPORT (0x00000010)
1578#define MPI2_BIOSPAGE1_IOCSET_OS_SUPPORT (0x00000020)
1579#define MPI2_BIOSPAGE1_IOCSET_ALL_SUPPORT (0x00000030)
1580
1581#define MPI2_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008)
1582
1583/*values for BIOS Page 1 DeviceSettings field */
1584#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING (0x00000010)
1585#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008)
1586#define MPI2_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004)
1587#define MPI2_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002)
1588#define MPI2_BIOSPAGE1_DEVSET_DISABLE_OTHER_LUN (0x00000001)
1589
1590/*defines for BIOS Page 1 UEFIVersion field */
1591#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_MASK (0xFF00)
1592#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_SHIFT (8)
1593#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_MASK (0x00FF)
1594#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_SHIFT (0)
1595
1596
1597
1598/*BIOS Page 2 */
1599
1600typedef struct _MPI2_BOOT_DEVICE_ADAPTER_ORDER {
1601 U32 Reserved1; /*0x00 */
1602 U32 Reserved2; /*0x04 */
1603 U32 Reserved3; /*0x08 */
1604 U32 Reserved4; /*0x0C */
1605 U32 Reserved5; /*0x10 */
1606 U32 Reserved6; /*0x14 */
1607} MPI2_BOOT_DEVICE_ADAPTER_ORDER,
1608 *PTR_MPI2_BOOT_DEVICE_ADAPTER_ORDER,
1609 Mpi2BootDeviceAdapterOrder_t,
1610 *pMpi2BootDeviceAdapterOrder_t;
1611
1612typedef struct _MPI2_BOOT_DEVICE_SAS_WWID {
1613 U64 SASAddress; /*0x00 */
1614 U8 LUN[8]; /*0x08 */
1615 U32 Reserved1; /*0x10 */
1616 U32 Reserved2; /*0x14 */
1617} MPI2_BOOT_DEVICE_SAS_WWID,
1618 *PTR_MPI2_BOOT_DEVICE_SAS_WWID,
1619 Mpi2BootDeviceSasWwid_t,
1620 *pMpi2BootDeviceSasWwid_t;
1621
1622typedef struct _MPI2_BOOT_DEVICE_ENCLOSURE_SLOT {
1623 U64 EnclosureLogicalID; /*0x00 */
1624 U32 Reserved1; /*0x08 */
1625 U32 Reserved2; /*0x0C */
1626 U16 SlotNumber; /*0x10 */
1627 U16 Reserved3; /*0x12 */
1628 U32 Reserved4; /*0x14 */
1629} MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
1630 *PTR_MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
1631 Mpi2BootDeviceEnclosureSlot_t,
1632 *pMpi2BootDeviceEnclosureSlot_t;
1633
1634typedef struct _MPI2_BOOT_DEVICE_DEVICE_NAME {
1635 U64 DeviceName; /*0x00 */
1636 U8 LUN[8]; /*0x08 */
1637 U32 Reserved1; /*0x10 */
1638 U32 Reserved2; /*0x14 */
1639} MPI2_BOOT_DEVICE_DEVICE_NAME,
1640 *PTR_MPI2_BOOT_DEVICE_DEVICE_NAME,
1641 Mpi2BootDeviceDeviceName_t,
1642 *pMpi2BootDeviceDeviceName_t;
1643
1644typedef union _MPI2_MPI2_BIOSPAGE2_BOOT_DEVICE {
1645 MPI2_BOOT_DEVICE_ADAPTER_ORDER AdapterOrder;
1646 MPI2_BOOT_DEVICE_SAS_WWID SasWwid;
1647 MPI2_BOOT_DEVICE_ENCLOSURE_SLOT EnclosureSlot;
1648 MPI2_BOOT_DEVICE_DEVICE_NAME DeviceName;
1649} MPI2_BIOSPAGE2_BOOT_DEVICE,
1650 *PTR_MPI2_BIOSPAGE2_BOOT_DEVICE,
1651 Mpi2BiosPage2BootDevice_t,
1652 *pMpi2BiosPage2BootDevice_t;
1653
1654typedef struct _MPI2_CONFIG_PAGE_BIOS_2 {
1655 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1656 U32 Reserved1; /*0x04 */
1657 U32 Reserved2; /*0x08 */
1658 U32 Reserved3; /*0x0C */
1659 U32 Reserved4; /*0x10 */
1660 U32 Reserved5; /*0x14 */
1661 U32 Reserved6; /*0x18 */
1662 U8 ReqBootDeviceForm; /*0x1C */
1663 U8 Reserved7; /*0x1D */
1664 U16 Reserved8; /*0x1E */
1665 MPI2_BIOSPAGE2_BOOT_DEVICE RequestedBootDevice; /*0x20 */
1666 U8 ReqAltBootDeviceForm; /*0x38 */
1667 U8 Reserved9; /*0x39 */
1668 U16 Reserved10; /*0x3A */
1669 MPI2_BIOSPAGE2_BOOT_DEVICE RequestedAltBootDevice; /*0x3C */
1670 U8 CurrentBootDeviceForm; /*0x58 */
1671 U8 Reserved11; /*0x59 */
1672 U16 Reserved12; /*0x5A */
1673 MPI2_BIOSPAGE2_BOOT_DEVICE CurrentBootDevice; /*0x58 */
1674} MPI2_CONFIG_PAGE_BIOS_2, *PTR_MPI2_CONFIG_PAGE_BIOS_2,
1675 Mpi2BiosPage2_t, *pMpi2BiosPage2_t;
1676
1677#define MPI2_BIOSPAGE2_PAGEVERSION (0x04)
1678
1679/*values for BIOS Page 2 BootDeviceForm fields */
1680#define MPI2_BIOSPAGE2_FORM_MASK (0x0F)
1681#define MPI2_BIOSPAGE2_FORM_NO_DEVICE_SPECIFIED (0x00)
1682#define MPI2_BIOSPAGE2_FORM_SAS_WWID (0x05)
1683#define MPI2_BIOSPAGE2_FORM_ENCLOSURE_SLOT (0x06)
1684#define MPI2_BIOSPAGE2_FORM_DEVICE_NAME (0x07)
1685
1686
1687/*BIOS Page 3 */
1688
1689#define MPI2_BIOSPAGE3_NUM_ADAPTER (4)
1690
1691typedef struct _MPI2_ADAPTER_INFO {
1692 U8 PciBusNumber; /*0x00 */
1693 U8 PciDeviceAndFunctionNumber; /*0x01 */
1694 U16 AdapterFlags; /*0x02 */
1695} MPI2_ADAPTER_INFO, *PTR_MPI2_ADAPTER_INFO,
1696 Mpi2AdapterInfo_t, *pMpi2AdapterInfo_t;
1697
1698#define MPI2_ADAPTER_INFO_FLAGS_EMBEDDED (0x0001)
1699#define MPI2_ADAPTER_INFO_FLAGS_INIT_STATUS (0x0002)
1700
1701typedef struct _MPI2_ADAPTER_ORDER_AUX {
1702 U64 WWID; /* 0x00 */
1703 U32 Reserved1; /* 0x08 */
1704 U32 Reserved2; /* 0x0C */
1705} MPI2_ADAPTER_ORDER_AUX, *PTR_MPI2_ADAPTER_ORDER_AUX,
1706 Mpi2AdapterOrderAux_t, *pMpi2AdapterOrderAux_t;
1707
1708
1709typedef struct _MPI2_CONFIG_PAGE_BIOS_3 {
1710 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1711 U32 GlobalFlags; /*0x04 */
1712 U32 BiosVersion; /*0x08 */
1713 MPI2_ADAPTER_INFO AdapterOrder[MPI2_BIOSPAGE3_NUM_ADAPTER];
1714 U32 Reserved1; /*0x1C */
1715 MPI2_ADAPTER_ORDER_AUX AdapterOrderAux[MPI2_BIOSPAGE3_NUM_ADAPTER];
1716} MPI2_CONFIG_PAGE_BIOS_3,
1717 *PTR_MPI2_CONFIG_PAGE_BIOS_3,
1718 Mpi2BiosPage3_t, *pMpi2BiosPage3_t;
1719
1720#define MPI2_BIOSPAGE3_PAGEVERSION (0x01)
1721
1722/*values for BIOS Page 3 GlobalFlags */
1723#define MPI2_BIOSPAGE3_FLAGS_PAUSE_ON_ERROR (0x00000002)
1724#define MPI2_BIOSPAGE3_FLAGS_VERBOSE_ENABLE (0x00000004)
1725#define MPI2_BIOSPAGE3_FLAGS_HOOK_INT_40_DISABLE (0x00000010)
1726
1727#define MPI2_BIOSPAGE3_FLAGS_DEV_LIST_DISPLAY_MASK (0x000000E0)
1728#define MPI2_BIOSPAGE3_FLAGS_INSTALLED_DEV_DISPLAY (0x00000000)
1729#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DISPLAY (0x00000020)
1730#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DEV_DISPLAY (0x00000040)
1731
1732
1733/*BIOS Page 4 */
1734
1735/*
1736 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
1737 *for NumPhys at runtime before using Phy[].
1738 */
1739
1740typedef struct _MPI2_BIOS4_ENTRY {
1741 U64 ReassignmentWWID; /*0x00 */
1742 U64 ReassignmentDeviceName; /*0x08 */
1743} MPI2_BIOS4_ENTRY, *PTR_MPI2_BIOS4_ENTRY,
1744 Mpi2MBios4Entry_t, *pMpi2Bios4Entry_t;
1745
1746typedef struct _MPI2_CONFIG_PAGE_BIOS_4 {
1747 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1748 U8 NumPhys; /*0x04 */
1749 U8 Reserved1; /*0x05 */
1750 U16 Reserved2; /*0x06 */
1751 MPI2_BIOS4_ENTRY Phy[]; /*0x08 */
1752} MPI2_CONFIG_PAGE_BIOS_4, *PTR_MPI2_CONFIG_PAGE_BIOS_4,
1753 Mpi2BiosPage4_t, *pMpi2BiosPage4_t;
1754
1755#define MPI2_BIOSPAGE4_PAGEVERSION (0x01)
1756
1757
1758/****************************************************************************
1759* RAID Volume Config Pages
1760****************************************************************************/
1761
1762/*RAID Volume Page 0 */
1763
1764typedef struct _MPI2_RAIDVOL0_PHYS_DISK {
1765 U8 RAIDSetNum; /*0x00 */
1766 U8 PhysDiskMap; /*0x01 */
1767 U8 PhysDiskNum; /*0x02 */
1768 U8 Reserved; /*0x03 */
1769} MPI2_RAIDVOL0_PHYS_DISK, *PTR_MPI2_RAIDVOL0_PHYS_DISK,
1770 Mpi2RaidVol0PhysDisk_t, *pMpi2RaidVol0PhysDisk_t;
1771
1772/*defines for the PhysDiskMap field */
1773#define MPI2_RAIDVOL0_PHYSDISK_PRIMARY (0x01)
1774#define MPI2_RAIDVOL0_PHYSDISK_SECONDARY (0x02)
1775
1776typedef struct _MPI2_RAIDVOL0_SETTINGS {
1777 U16 Settings; /*0x00 */
1778 U8 HotSparePool; /*0x01 */
1779 U8 Reserved; /*0x02 */
1780} MPI2_RAIDVOL0_SETTINGS, *PTR_MPI2_RAIDVOL0_SETTINGS,
1781 Mpi2RaidVol0Settings_t,
1782 *pMpi2RaidVol0Settings_t;
1783
1784/*RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk */
1785#define MPI2_RAID_HOT_SPARE_POOL_0 (0x01)
1786#define MPI2_RAID_HOT_SPARE_POOL_1 (0x02)
1787#define MPI2_RAID_HOT_SPARE_POOL_2 (0x04)
1788#define MPI2_RAID_HOT_SPARE_POOL_3 (0x08)
1789#define MPI2_RAID_HOT_SPARE_POOL_4 (0x10)
1790#define MPI2_RAID_HOT_SPARE_POOL_5 (0x20)
1791#define MPI2_RAID_HOT_SPARE_POOL_6 (0x40)
1792#define MPI2_RAID_HOT_SPARE_POOL_7 (0x80)
1793
1794/*RAID Volume Page 0 VolumeSettings defines */
1795#define MPI2_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX (0x0008)
1796#define MPI2_RAIDVOL0_SETTING_AUTO_CONFIG_HSWAP_DISABLE (0x0004)
1797
1798#define MPI2_RAIDVOL0_SETTING_MASK_WRITE_CACHING (0x0003)
1799#define MPI2_RAIDVOL0_SETTING_UNCHANGED (0x0000)
1800#define MPI2_RAIDVOL0_SETTING_DISABLE_WRITE_CACHING (0x0001)
1801#define MPI2_RAIDVOL0_SETTING_ENABLE_WRITE_CACHING (0x0002)
1802
1803/*
1804 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
1805 *for NumPhysDisks at runtime before using PhysDisk[].
1806 */
1807
1808typedef struct _MPI2_CONFIG_PAGE_RAID_VOL_0 {
1809 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1810 U16 DevHandle; /*0x04 */
1811 U8 VolumeState; /*0x06 */
1812 U8 VolumeType; /*0x07 */
1813 U32 VolumeStatusFlags; /*0x08 */
1814 MPI2_RAIDVOL0_SETTINGS VolumeSettings; /*0x0C */
1815 U64 MaxLBA; /*0x10 */
1816 U32 StripeSize; /*0x18 */
1817 U16 BlockSize; /*0x1C */
1818 U16 Reserved1; /*0x1E */
1819 U8 SupportedPhysDisks;/*0x20 */
1820 U8 ResyncRate; /*0x21 */
1821 U16 DataScrubDuration; /*0x22 */
1822 U8 NumPhysDisks; /*0x24 */
1823 U8 Reserved2; /*0x25 */
1824 U8 Reserved3; /*0x26 */
1825 U8 InactiveStatus; /*0x27 */
1826 MPI2_RAIDVOL0_PHYS_DISK PhysDisk[]; /*0x28 */
1827} MPI2_CONFIG_PAGE_RAID_VOL_0,
1828 *PTR_MPI2_CONFIG_PAGE_RAID_VOL_0,
1829 Mpi2RaidVolPage0_t, *pMpi2RaidVolPage0_t;
1830
1831#define MPI2_RAIDVOLPAGE0_PAGEVERSION (0x0A)
1832
1833/*values for RAID VolumeState */
1834#define MPI2_RAID_VOL_STATE_MISSING (0x00)
1835#define MPI2_RAID_VOL_STATE_FAILED (0x01)
1836#define MPI2_RAID_VOL_STATE_INITIALIZING (0x02)
1837#define MPI2_RAID_VOL_STATE_ONLINE (0x03)
1838#define MPI2_RAID_VOL_STATE_DEGRADED (0x04)
1839#define MPI2_RAID_VOL_STATE_OPTIMAL (0x05)
1840
1841/*values for RAID VolumeType */
1842#define MPI2_RAID_VOL_TYPE_RAID0 (0x00)
1843#define MPI2_RAID_VOL_TYPE_RAID1E (0x01)
1844#define MPI2_RAID_VOL_TYPE_RAID1 (0x02)
1845#define MPI2_RAID_VOL_TYPE_RAID10 (0x05)
1846#define MPI2_RAID_VOL_TYPE_UNKNOWN (0xFF)
1847
1848/*values for RAID Volume Page 0 VolumeStatusFlags field */
1849#define MPI2_RAIDVOL0_STATUS_FLAG_PENDING_RESYNC (0x02000000)
1850#define MPI2_RAIDVOL0_STATUS_FLAG_BACKG_INIT_PENDING (0x01000000)
1851#define MPI2_RAIDVOL0_STATUS_FLAG_MDC_PENDING (0x00800000)
1852#define MPI2_RAIDVOL0_STATUS_FLAG_USER_CONSIST_PENDING (0x00400000)
1853#define MPI2_RAIDVOL0_STATUS_FLAG_MAKE_DATA_CONSISTENT (0x00200000)
1854#define MPI2_RAIDVOL0_STATUS_FLAG_DATA_SCRUB (0x00100000)
1855#define MPI2_RAIDVOL0_STATUS_FLAG_CONSISTENCY_CHECK (0x00080000)
1856#define MPI2_RAIDVOL0_STATUS_FLAG_CAPACITY_EXPANSION (0x00040000)
1857#define MPI2_RAIDVOL0_STATUS_FLAG_BACKGROUND_INIT (0x00020000)
1858#define MPI2_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS (0x00010000)
1859#define MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT (0x00000080)
1860#define MPI2_RAIDVOL0_STATUS_FLAG_OCE_ALLOWED (0x00000040)
1861#define MPI2_RAIDVOL0_STATUS_FLAG_BGI_COMPLETE (0x00000020)
1862#define MPI2_RAIDVOL0_STATUS_FLAG_1E_OFFSET_MIRROR (0x00000000)
1863#define MPI2_RAIDVOL0_STATUS_FLAG_1E_ADJACENT_MIRROR (0x00000010)
1864#define MPI2_RAIDVOL0_STATUS_FLAG_BAD_BLOCK_TABLE_FULL (0x00000008)
1865#define MPI2_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE (0x00000004)
1866#define MPI2_RAIDVOL0_STATUS_FLAG_QUIESCED (0x00000002)
1867#define MPI2_RAIDVOL0_STATUS_FLAG_ENABLED (0x00000001)
1868
1869/*values for RAID Volume Page 0 SupportedPhysDisks field */
1870#define MPI2_RAIDVOL0_SUPPORT_SOLID_STATE_DISKS (0x08)
1871#define MPI2_RAIDVOL0_SUPPORT_HARD_DISKS (0x04)
1872#define MPI2_RAIDVOL0_SUPPORT_SAS_PROTOCOL (0x02)
1873#define MPI2_RAIDVOL0_SUPPORT_SATA_PROTOCOL (0x01)
1874
1875/*values for RAID Volume Page 0 InactiveStatus field */
1876#define MPI2_RAIDVOLPAGE0_UNKNOWN_INACTIVE (0x00)
1877#define MPI2_RAIDVOLPAGE0_STALE_METADATA_INACTIVE (0x01)
1878#define MPI2_RAIDVOLPAGE0_FOREIGN_VOLUME_INACTIVE (0x02)
1879#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_RESOURCE_INACTIVE (0x03)
1880#define MPI2_RAIDVOLPAGE0_CLONE_VOLUME_INACTIVE (0x04)
1881#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_METADATA_INACTIVE (0x05)
1882#define MPI2_RAIDVOLPAGE0_PREVIOUSLY_DELETED (0x06)
1883
1884
1885/*RAID Volume Page 1 */
1886
1887typedef struct _MPI2_CONFIG_PAGE_RAID_VOL_1 {
1888 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1889 U16 DevHandle; /*0x04 */
1890 U16 Reserved0; /*0x06 */
1891 U8 GUID[24]; /*0x08 */
1892 U8 Name[16]; /*0x20 */
1893 U64 WWID; /*0x30 */
1894 U32 Reserved1; /*0x38 */
1895 U32 Reserved2; /*0x3C */
1896} MPI2_CONFIG_PAGE_RAID_VOL_1,
1897 *PTR_MPI2_CONFIG_PAGE_RAID_VOL_1,
1898 Mpi2RaidVolPage1_t, *pMpi2RaidVolPage1_t;
1899
1900#define MPI2_RAIDVOLPAGE1_PAGEVERSION (0x03)
1901
1902
1903/****************************************************************************
1904* RAID Physical Disk Config Pages
1905****************************************************************************/
1906
1907/*RAID Physical Disk Page 0 */
1908
1909typedef struct _MPI2_RAIDPHYSDISK0_SETTINGS {
1910 U16 Reserved1; /*0x00 */
1911 U8 HotSparePool; /*0x02 */
1912 U8 Reserved2; /*0x03 */
1913} MPI2_RAIDPHYSDISK0_SETTINGS,
1914 *PTR_MPI2_RAIDPHYSDISK0_SETTINGS,
1915 Mpi2RaidPhysDisk0Settings_t,
1916 *pMpi2RaidPhysDisk0Settings_t;
1917
1918/*use MPI2_RAID_HOT_SPARE_POOL_ defines for the HotSparePool field */
1919
1920typedef struct _MPI2_RAIDPHYSDISK0_INQUIRY_DATA {
1921 U8 VendorID[8]; /*0x00 */
1922 U8 ProductID[16]; /*0x08 */
1923 U8 ProductRevLevel[4]; /*0x18 */
1924 U8 SerialNum[32]; /*0x1C */
1925} MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
1926 *PTR_MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
1927 Mpi2RaidPhysDisk0InquiryData_t,
1928 *pMpi2RaidPhysDisk0InquiryData_t;
1929
1930typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_0 {
1931 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1932 U16 DevHandle; /*0x04 */
1933 U8 Reserved1; /*0x06 */
1934 U8 PhysDiskNum; /*0x07 */
1935 MPI2_RAIDPHYSDISK0_SETTINGS PhysDiskSettings; /*0x08 */
1936 U32 Reserved2; /*0x0C */
1937 MPI2_RAIDPHYSDISK0_INQUIRY_DATA InquiryData; /*0x10 */
1938 U32 Reserved3; /*0x4C */
1939 U8 PhysDiskState; /*0x50 */
1940 U8 OfflineReason; /*0x51 */
1941 U8 IncompatibleReason; /*0x52 */
1942 U8 PhysDiskAttributes; /*0x53 */
1943 U32 PhysDiskStatusFlags;/*0x54 */
1944 U64 DeviceMaxLBA; /*0x58 */
1945 U64 HostMaxLBA; /*0x60 */
1946 U64 CoercedMaxLBA; /*0x68 */
1947 U16 BlockSize; /*0x70 */
1948 U16 Reserved5; /*0x72 */
1949 U32 Reserved6; /*0x74 */
1950} MPI2_CONFIG_PAGE_RD_PDISK_0,
1951 *PTR_MPI2_CONFIG_PAGE_RD_PDISK_0,
1952 Mpi2RaidPhysDiskPage0_t,
1953 *pMpi2RaidPhysDiskPage0_t;
1954
1955#define MPI2_RAIDPHYSDISKPAGE0_PAGEVERSION (0x05)
1956
1957/*PhysDiskState defines */
1958#define MPI2_RAID_PD_STATE_NOT_CONFIGURED (0x00)
1959#define MPI2_RAID_PD_STATE_NOT_COMPATIBLE (0x01)
1960#define MPI2_RAID_PD_STATE_OFFLINE (0x02)
1961#define MPI2_RAID_PD_STATE_ONLINE (0x03)
1962#define MPI2_RAID_PD_STATE_HOT_SPARE (0x04)
1963#define MPI2_RAID_PD_STATE_DEGRADED (0x05)
1964#define MPI2_RAID_PD_STATE_REBUILDING (0x06)
1965#define MPI2_RAID_PD_STATE_OPTIMAL (0x07)
1966
1967/*OfflineReason defines */
1968#define MPI2_PHYSDISK0_ONLINE (0x00)
1969#define MPI2_PHYSDISK0_OFFLINE_MISSING (0x01)
1970#define MPI2_PHYSDISK0_OFFLINE_FAILED (0x03)
1971#define MPI2_PHYSDISK0_OFFLINE_INITIALIZING (0x04)
1972#define MPI2_PHYSDISK0_OFFLINE_REQUESTED (0x05)
1973#define MPI2_PHYSDISK0_OFFLINE_FAILED_REQUESTED (0x06)
1974#define MPI2_PHYSDISK0_OFFLINE_OTHER (0xFF)
1975
1976/*IncompatibleReason defines */
1977#define MPI2_PHYSDISK0_COMPATIBLE (0x00)
1978#define MPI2_PHYSDISK0_INCOMPATIBLE_PROTOCOL (0x01)
1979#define MPI2_PHYSDISK0_INCOMPATIBLE_BLOCKSIZE (0x02)
1980#define MPI2_PHYSDISK0_INCOMPATIBLE_MAX_LBA (0x03)
1981#define MPI2_PHYSDISK0_INCOMPATIBLE_SATA_EXTENDED_CMD (0x04)
1982#define MPI2_PHYSDISK0_INCOMPATIBLE_REMOVEABLE_MEDIA (0x05)
1983#define MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE (0x06)
1984#define MPI2_PHYSDISK0_INCOMPATIBLE_UNKNOWN (0xFF)
1985
1986/*PhysDiskAttributes defines */
1987#define MPI2_PHYSDISK0_ATTRIB_MEDIA_MASK (0x0C)
1988#define MPI2_PHYSDISK0_ATTRIB_SOLID_STATE_DRIVE (0x08)
1989#define MPI2_PHYSDISK0_ATTRIB_HARD_DISK_DRIVE (0x04)
1990
1991#define MPI2_PHYSDISK0_ATTRIB_PROTOCOL_MASK (0x03)
1992#define MPI2_PHYSDISK0_ATTRIB_SAS_PROTOCOL (0x02)
1993#define MPI2_PHYSDISK0_ATTRIB_SATA_PROTOCOL (0x01)
1994
1995/*PhysDiskStatusFlags defines */
1996#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED (0x00000040)
1997#define MPI2_PHYSDISK0_STATUS_FLAG_OCE_TARGET (0x00000020)
1998#define MPI2_PHYSDISK0_STATUS_FLAG_WRITE_CACHE_ENABLED (0x00000010)
1999#define MPI2_PHYSDISK0_STATUS_FLAG_OPTIMAL_PREVIOUS (0x00000000)
2000#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_OPTIMAL_PREVIOUS (0x00000008)
2001#define MPI2_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME (0x00000004)
2002#define MPI2_PHYSDISK0_STATUS_FLAG_QUIESCED (0x00000002)
2003#define MPI2_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x00000001)
2004
2005
2006/*RAID Physical Disk Page 1 */
2007
2008/*
2009 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2010 *for NumPhysDiskPaths at runtime before using PhysicalDiskPath[].
2011 */
2012
2013typedef struct _MPI2_RAIDPHYSDISK1_PATH {
2014 U16 DevHandle; /*0x00 */
2015 U16 Reserved1; /*0x02 */
2016 U64 WWID; /*0x04 */
2017 U64 OwnerWWID; /*0x0C */
2018 U8 OwnerIdentifier; /*0x14 */
2019 U8 Reserved2; /*0x15 */
2020 U16 Flags; /*0x16 */
2021} MPI2_RAIDPHYSDISK1_PATH, *PTR_MPI2_RAIDPHYSDISK1_PATH,
2022 Mpi2RaidPhysDisk1Path_t,
2023 *pMpi2RaidPhysDisk1Path_t;
2024
2025/*RAID Physical Disk Page 1 Physical Disk Path Flags field defines */
2026#define MPI2_RAID_PHYSDISK1_FLAG_PRIMARY (0x0004)
2027#define MPI2_RAID_PHYSDISK1_FLAG_BROKEN (0x0002)
2028#define MPI2_RAID_PHYSDISK1_FLAG_INVALID (0x0001)
2029
2030typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 {
2031 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
2032 U8 NumPhysDiskPaths; /*0x04 */
2033 U8 PhysDiskNum; /*0x05 */
2034 U16 Reserved1; /*0x06 */
2035 U32 Reserved2; /*0x08 */
2036 MPI2_RAIDPHYSDISK1_PATH PhysicalDiskPath[]; /*0x0C */
2037} MPI2_CONFIG_PAGE_RD_PDISK_1,
2038 *PTR_MPI2_CONFIG_PAGE_RD_PDISK_1,
2039 Mpi2RaidPhysDiskPage1_t,
2040 *pMpi2RaidPhysDiskPage1_t;
2041
2042#define MPI2_RAIDPHYSDISKPAGE1_PAGEVERSION (0x02)
2043
2044
2045/****************************************************************************
2046* values for fields used by several types of SAS Config Pages
2047****************************************************************************/
2048
2049/*values for NegotiatedLinkRates fields */
2050#define MPI2_SAS_NEG_LINK_RATE_MASK_LOGICAL (0xF0)
2051#define MPI2_SAS_NEG_LINK_RATE_SHIFT_LOGICAL (4)
2052#define MPI2_SAS_NEG_LINK_RATE_MASK_PHYSICAL (0x0F)
2053/*link rates used for Negotiated Physical and Logical Link Rate */
2054#define MPI2_SAS_NEG_LINK_RATE_UNKNOWN_LINK_RATE (0x00)
2055#define MPI2_SAS_NEG_LINK_RATE_PHY_DISABLED (0x01)
2056#define MPI2_SAS_NEG_LINK_RATE_NEGOTIATION_FAILED (0x02)
2057#define MPI2_SAS_NEG_LINK_RATE_SATA_OOB_COMPLETE (0x03)
2058#define MPI2_SAS_NEG_LINK_RATE_PORT_SELECTOR (0x04)
2059#define MPI2_SAS_NEG_LINK_RATE_SMP_RESET_IN_PROGRESS (0x05)
2060#define MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY (0x06)
2061#define MPI2_SAS_NEG_LINK_RATE_1_5 (0x08)
2062#define MPI2_SAS_NEG_LINK_RATE_3_0 (0x09)
2063#define MPI2_SAS_NEG_LINK_RATE_6_0 (0x0A)
2064#define MPI25_SAS_NEG_LINK_RATE_12_0 (0x0B)
2065#define MPI26_SAS_NEG_LINK_RATE_22_5 (0x0C)
2066
2067
2068/*values for AttachedPhyInfo fields */
2069#define MPI2_SAS_APHYINFO_INSIDE_ZPSDS_PERSISTENT (0x00000040)
2070#define MPI2_SAS_APHYINFO_REQUESTED_INSIDE_ZPSDS (0x00000020)
2071#define MPI2_SAS_APHYINFO_BREAK_REPLY_CAPABLE (0x00000010)
2072
2073#define MPI2_SAS_APHYINFO_REASON_MASK (0x0000000F)
2074#define MPI2_SAS_APHYINFO_REASON_UNKNOWN (0x00000000)
2075#define MPI2_SAS_APHYINFO_REASON_POWER_ON (0x00000001)
2076#define MPI2_SAS_APHYINFO_REASON_HARD_RESET (0x00000002)
2077#define MPI2_SAS_APHYINFO_REASON_SMP_PHY_CONTROL (0x00000003)
2078#define MPI2_SAS_APHYINFO_REASON_LOSS_OF_SYNC (0x00000004)
2079#define MPI2_SAS_APHYINFO_REASON_MULTIPLEXING_SEQ (0x00000005)
2080#define MPI2_SAS_APHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00000006)
2081#define MPI2_SAS_APHYINFO_REASON_BREAK_TIMEOUT (0x00000007)
2082#define MPI2_SAS_APHYINFO_REASON_PHY_TEST_STOPPED (0x00000008)
2083
2084
2085/*values for PhyInfo fields */
2086#define MPI2_SAS_PHYINFO_PHY_VACANT (0x80000000)
2087
2088#define MPI2_SAS_PHYINFO_PHY_POWER_CONDITION_MASK (0x18000000)
2089#define MPI2_SAS_PHYINFO_SHIFT_PHY_POWER_CONDITION (27)
2090#define MPI2_SAS_PHYINFO_PHY_POWER_ACTIVE (0x00000000)
2091#define MPI2_SAS_PHYINFO_PHY_POWER_PARTIAL (0x08000000)
2092#define MPI2_SAS_PHYINFO_PHY_POWER_SLUMBER (0x10000000)
2093
2094#define MPI2_SAS_PHYINFO_CHANGED_REQ_INSIDE_ZPSDS (0x04000000)
2095#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS_PERSISTENT (0x02000000)
2096#define MPI2_SAS_PHYINFO_REQ_INSIDE_ZPSDS (0x01000000)
2097#define MPI2_SAS_PHYINFO_ZONE_GROUP_PERSISTENT (0x00400000)
2098#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS (0x00200000)
2099#define MPI2_SAS_PHYINFO_ZONING_ENABLED (0x00100000)
2100
2101#define MPI2_SAS_PHYINFO_REASON_MASK (0x000F0000)
2102#define MPI2_SAS_PHYINFO_REASON_UNKNOWN (0x00000000)
2103#define MPI2_SAS_PHYINFO_REASON_POWER_ON (0x00010000)
2104#define MPI2_SAS_PHYINFO_REASON_HARD_RESET (0x00020000)
2105#define MPI2_SAS_PHYINFO_REASON_SMP_PHY_CONTROL (0x00030000)
2106#define MPI2_SAS_PHYINFO_REASON_LOSS_OF_SYNC (0x00040000)
2107#define MPI2_SAS_PHYINFO_REASON_MULTIPLEXING_SEQ (0x00050000)
2108#define MPI2_SAS_PHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00060000)
2109#define MPI2_SAS_PHYINFO_REASON_BREAK_TIMEOUT (0x00070000)
2110#define MPI2_SAS_PHYINFO_REASON_PHY_TEST_STOPPED (0x00080000)
2111
2112#define MPI2_SAS_PHYINFO_MULTIPLEXING_SUPPORTED (0x00008000)
2113#define MPI2_SAS_PHYINFO_SATA_PORT_ACTIVE (0x00004000)
2114#define MPI2_SAS_PHYINFO_SATA_PORT_SELECTOR_PRESENT (0x00002000)
2115#define MPI2_SAS_PHYINFO_VIRTUAL_PHY (0x00001000)
2116
2117#define MPI2_SAS_PHYINFO_MASK_PARTIAL_PATHWAY_TIME (0x00000F00)
2118#define MPI2_SAS_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME (8)
2119
2120#define MPI2_SAS_PHYINFO_MASK_ROUTING_ATTRIBUTE (0x000000F0)
2121#define MPI2_SAS_PHYINFO_DIRECT_ROUTING (0x00000000)
2122#define MPI2_SAS_PHYINFO_SUBTRACTIVE_ROUTING (0x00000010)
2123#define MPI2_SAS_PHYINFO_TABLE_ROUTING (0x00000020)
2124
2125
2126/*values for SAS ProgrammedLinkRate fields */
2127#define MPI2_SAS_PRATE_MAX_RATE_MASK (0xF0)
2128#define MPI2_SAS_PRATE_MAX_RATE_NOT_PROGRAMMABLE (0x00)
2129#define MPI2_SAS_PRATE_MAX_RATE_1_5 (0x80)
2130#define MPI2_SAS_PRATE_MAX_RATE_3_0 (0x90)
2131#define MPI2_SAS_PRATE_MAX_RATE_6_0 (0xA0)
2132#define MPI25_SAS_PRATE_MAX_RATE_12_0 (0xB0)
2133#define MPI26_SAS_PRATE_MAX_RATE_22_5 (0xC0)
2134#define MPI2_SAS_PRATE_MIN_RATE_MASK (0x0F)
2135#define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00)
2136#define MPI2_SAS_PRATE_MIN_RATE_1_5 (0x08)
2137#define MPI2_SAS_PRATE_MIN_RATE_3_0 (0x09)
2138#define MPI2_SAS_PRATE_MIN_RATE_6_0 (0x0A)
2139#define MPI25_SAS_PRATE_MIN_RATE_12_0 (0x0B)
2140#define MPI26_SAS_PRATE_MIN_RATE_22_5 (0x0C)
2141
2142
2143/*values for SAS HwLinkRate fields */
2144#define MPI2_SAS_HWRATE_MAX_RATE_MASK (0xF0)
2145#define MPI2_SAS_HWRATE_MAX_RATE_1_5 (0x80)
2146#define MPI2_SAS_HWRATE_MAX_RATE_3_0 (0x90)
2147#define MPI2_SAS_HWRATE_MAX_RATE_6_0 (0xA0)
2148#define MPI25_SAS_HWRATE_MAX_RATE_12_0 (0xB0)
2149#define MPI26_SAS_HWRATE_MAX_RATE_22_5 (0xC0)
2150#define MPI2_SAS_HWRATE_MIN_RATE_MASK (0x0F)
2151#define MPI2_SAS_HWRATE_MIN_RATE_1_5 (0x08)
2152#define MPI2_SAS_HWRATE_MIN_RATE_3_0 (0x09)
2153#define MPI2_SAS_HWRATE_MIN_RATE_6_0 (0x0A)
2154#define MPI25_SAS_HWRATE_MIN_RATE_12_0 (0x0B)
2155#define MPI26_SAS_HWRATE_MIN_RATE_22_5 (0x0C)
2156
2157
2158
2159/****************************************************************************
2160* SAS IO Unit Config Pages
2161****************************************************************************/
2162
2163/*SAS IO Unit Page 0 */
2164
2165typedef struct _MPI2_SAS_IO_UNIT0_PHY_DATA {
2166 U8 Port; /*0x00 */
2167 U8 PortFlags; /*0x01 */
2168 U8 PhyFlags; /*0x02 */
2169 U8 NegotiatedLinkRate; /*0x03 */
2170 U32 ControllerPhyDeviceInfo;/*0x04 */
2171 U16 AttachedDevHandle; /*0x08 */
2172 U16 ControllerDevHandle; /*0x0A */
2173 U32 DiscoveryStatus; /*0x0C */
2174 U32 Reserved; /*0x10 */
2175} MPI2_SAS_IO_UNIT0_PHY_DATA,
2176 *PTR_MPI2_SAS_IO_UNIT0_PHY_DATA,
2177 Mpi2SasIOUnit0PhyData_t,
2178 *pMpi2SasIOUnit0PhyData_t;
2179
2180/*
2181 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2182 *for NumPhys at runtime before using PhyData[].
2183 */
2184
2185typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_0 {
2186 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2187 U32 Reserved1;/*0x08 */
2188 U8 NumPhys; /*0x0C */
2189 U8 Reserved2;/*0x0D */
2190 U16 Reserved3;/*0x0E */
2191 MPI2_SAS_IO_UNIT0_PHY_DATA PhyData[];/*0x10 */
2192} MPI2_CONFIG_PAGE_SASIOUNIT_0,
2193 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_0,
2194 Mpi2SasIOUnitPage0_t, *pMpi2SasIOUnitPage0_t;
2195
2196#define MPI2_SASIOUNITPAGE0_PAGEVERSION (0x05)
2197
2198/*values for SAS IO Unit Page 0 PortFlags */
2199#define MPI2_SASIOUNIT0_PORTFLAGS_DISCOVERY_IN_PROGRESS (0x08)
2200#define MPI2_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG (0x01)
2201
2202/*values for SAS IO Unit Page 0 PhyFlags */
2203#define MPI2_SASIOUNIT0_PHYFLAGS_INIT_PERSIST_CONNECT (0x40)
2204#define MPI2_SASIOUNIT0_PHYFLAGS_TARG_PERSIST_CONNECT (0x20)
2205#define MPI2_SASIOUNIT0_PHYFLAGS_ZONING_ENABLED (0x10)
2206#define MPI2_SASIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08)
2207
2208/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2209
2210/*see mpi2_sas.h for values for
2211 *SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
2212
2213/*values for SAS IO Unit Page 0 DiscoveryStatus */
2214#define MPI2_SASIOUNIT0_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
2215#define MPI2_SASIOUNIT0_DS_MAX_EXPANDERS_EXCEED (0x40000000)
2216#define MPI2_SASIOUNIT0_DS_MAX_DEVICES_EXCEED (0x20000000)
2217#define MPI2_SASIOUNIT0_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
2218#define MPI2_SASIOUNIT0_DS_DOWNSTREAM_INITIATOR (0x08000000)
2219#define MPI2_SASIOUNIT0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
2220#define MPI2_SASIOUNIT0_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
2221#define MPI2_SASIOUNIT0_DS_MULTI_PORT_DOMAIN (0x00002000)
2222#define MPI2_SASIOUNIT0_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
2223#define MPI2_SASIOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800)
2224#define MPI2_SASIOUNIT0_DS_TABLE_LINK (0x00000400)
2225#define MPI2_SASIOUNIT0_DS_SUBTRACTIVE_LINK (0x00000200)
2226#define MPI2_SASIOUNIT0_DS_SMP_CRC_ERROR (0x00000100)
2227#define MPI2_SASIOUNIT0_DS_SMP_FUNCTION_FAILED (0x00000080)
2228#define MPI2_SASIOUNIT0_DS_INDEX_NOT_EXIST (0x00000040)
2229#define MPI2_SASIOUNIT0_DS_OUT_ROUTE_ENTRIES (0x00000020)
2230#define MPI2_SASIOUNIT0_DS_SMP_TIMEOUT (0x00000010)
2231#define MPI2_SASIOUNIT0_DS_MULTIPLE_PORTS (0x00000004)
2232#define MPI2_SASIOUNIT0_DS_UNADDRESSABLE_DEVICE (0x00000002)
2233#define MPI2_SASIOUNIT0_DS_LOOP_DETECTED (0x00000001)
2234
2235
2236/*SAS IO Unit Page 1 */
2237
2238typedef struct _MPI2_SAS_IO_UNIT1_PHY_DATA {
2239 U8 Port; /*0x00 */
2240 U8 PortFlags; /*0x01 */
2241 U8 PhyFlags; /*0x02 */
2242 U8 MaxMinLinkRate; /*0x03 */
2243 U32 ControllerPhyDeviceInfo; /*0x04 */
2244 U16 MaxTargetPortConnectTime; /*0x08 */
2245 U16 Reserved1; /*0x0A */
2246} MPI2_SAS_IO_UNIT1_PHY_DATA,
2247 *PTR_MPI2_SAS_IO_UNIT1_PHY_DATA,
2248 Mpi2SasIOUnit1PhyData_t,
2249 *pMpi2SasIOUnit1PhyData_t;
2250
2251/*
2252 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2253 *for NumPhys at runtime before using PhyData[].
2254 */
2255
2256typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_1 {
2257 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2258 U16
2259 ControlFlags; /*0x08 */
2260 U16
2261 SASNarrowMaxQueueDepth; /*0x0A */
2262 U16
2263 AdditionalControlFlags; /*0x0C */
2264 U16
2265 SASWideMaxQueueDepth; /*0x0E */
2266 U8
2267 NumPhys; /*0x10 */
2268 U8
2269 SATAMaxQDepth; /*0x11 */
2270 U8
2271 ReportDeviceMissingDelay; /*0x12 */
2272 U8
2273 IODeviceMissingDelay; /*0x13 */
2274 MPI2_SAS_IO_UNIT1_PHY_DATA
2275 PhyData[]; /*0x14 */
2276} MPI2_CONFIG_PAGE_SASIOUNIT_1,
2277 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_1,
2278 Mpi2SasIOUnitPage1_t, *pMpi2SasIOUnitPage1_t;
2279
2280#define MPI2_SASIOUNITPAGE1_PAGEVERSION (0x09)
2281
2282/*values for SAS IO Unit Page 1 ControlFlags */
2283#define MPI2_SASIOUNIT1_CONTROL_DEVICE_SELF_TEST (0x8000)
2284#define MPI2_SASIOUNIT1_CONTROL_SATA_3_0_MAX (0x4000)
2285#define MPI2_SASIOUNIT1_CONTROL_SATA_1_5_MAX (0x2000)
2286#define MPI2_SASIOUNIT1_CONTROL_SATA_SW_PRESERVE (0x1000)
2287
2288#define MPI2_SASIOUNIT1_CONTROL_MASK_DEV_SUPPORT (0x0600)
2289#define MPI2_SASIOUNIT1_CONTROL_SHIFT_DEV_SUPPORT (9)
2290#define MPI2_SASIOUNIT1_CONTROL_DEV_SUPPORT_BOTH (0x0)
2291#define MPI2_SASIOUNIT1_CONTROL_DEV_SAS_SUPPORT (0x1)
2292#define MPI2_SASIOUNIT1_CONTROL_DEV_SATA_SUPPORT (0x2)
2293
2294#define MPI2_SASIOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED (0x0080)
2295#define MPI2_SASIOUNIT1_CONTROL_SATA_SMART_REQUIRED (0x0040)
2296#define MPI2_SASIOUNIT1_CONTROL_SATA_NCQ_REQUIRED (0x0020)
2297#define MPI2_SASIOUNIT1_CONTROL_SATA_FUA_REQUIRED (0x0010)
2298#define MPI2_SASIOUNIT1_CONTROL_TABLE_SUBTRACTIVE_ILLEGAL (0x0008)
2299#define MPI2_SASIOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL (0x0004)
2300#define MPI2_SASIOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY (0x0002)
2301#define MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001)
2302
2303/*values for SAS IO Unit Page 1 AdditionalControlFlags */
2304#define MPI2_SASIOUNIT1_ACONTROL_DA_PERSIST_CONNECT (0x0100)
2305#define MPI2_SASIOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080)
2306#define MPI2_SASIOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040)
2307#define MPI2_SASIOUNIT1_ACONTROL_INVALID_TOPOLOGY_CORRECTION (0x0020)
2308#define MPI2_SASIOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010)
2309#define MPI2_SASIOUNIT1_ACONTROL_OTHER_AFFILIATION_SATA_LINK_RESET (0x0008)
2310#define MPI2_SASIOUNIT1_ACONTROL_SELF_AFFILIATION_SATA_LINK_RESET (0x0004)
2311#define MPI2_SASIOUNIT1_ACONTROL_NO_AFFILIATION_SATA_LINK_RESET (0x0002)
2312#define MPI2_SASIOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE (0x0001)
2313
2314/*defines for SAS IO Unit Page 1 ReportDeviceMissingDelay */
2315#define MPI2_SASIOUNIT1_REPORT_MISSING_TIMEOUT_MASK (0x7F)
2316#define MPI2_SASIOUNIT1_REPORT_MISSING_UNIT_16 (0x80)
2317
2318/*values for SAS IO Unit Page 1 PortFlags */
2319#define MPI2_SASIOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG (0x01)
2320
2321/*values for SAS IO Unit Page 1 PhyFlags */
2322#define MPI2_SASIOUNIT1_PHYFLAGS_INIT_PERSIST_CONNECT (0x40)
2323#define MPI2_SASIOUNIT1_PHYFLAGS_TARG_PERSIST_CONNECT (0x20)
2324#define MPI2_SASIOUNIT1_PHYFLAGS_ZONING_ENABLE (0x10)
2325#define MPI2_SASIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08)
2326
2327/*values for SAS IO Unit Page 1 MaxMinLinkRate */
2328#define MPI2_SASIOUNIT1_MAX_RATE_MASK (0xF0)
2329#define MPI2_SASIOUNIT1_MAX_RATE_1_5 (0x80)
2330#define MPI2_SASIOUNIT1_MAX_RATE_3_0 (0x90)
2331#define MPI2_SASIOUNIT1_MAX_RATE_6_0 (0xA0)
2332#define MPI25_SASIOUNIT1_MAX_RATE_12_0 (0xB0)
2333#define MPI26_SASIOUNIT1_MAX_RATE_22_5 (0xC0)
2334#define MPI2_SASIOUNIT1_MIN_RATE_MASK (0x0F)
2335#define MPI2_SASIOUNIT1_MIN_RATE_1_5 (0x08)
2336#define MPI2_SASIOUNIT1_MIN_RATE_3_0 (0x09)
2337#define MPI2_SASIOUNIT1_MIN_RATE_6_0 (0x0A)
2338#define MPI25_SASIOUNIT1_MIN_RATE_12_0 (0x0B)
2339#define MPI26_SASIOUNIT1_MIN_RATE_22_5 (0x0C)
2340
2341/*see mpi2_sas.h for values for
2342 *SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
2343
2344
2345/*SAS IO Unit Page 4 (for MPI v2.5 and earlier) */
2346
2347typedef struct _MPI2_SAS_IOUNIT4_SPINUP_GROUP {
2348 U8 MaxTargetSpinup; /*0x00 */
2349 U8 SpinupDelay; /*0x01 */
2350 U8 SpinupFlags; /*0x02 */
2351 U8 Reserved1; /*0x03 */
2352} MPI2_SAS_IOUNIT4_SPINUP_GROUP,
2353 *PTR_MPI2_SAS_IOUNIT4_SPINUP_GROUP,
2354 Mpi2SasIOUnit4SpinupGroup_t,
2355 *pMpi2SasIOUnit4SpinupGroup_t;
2356/*defines for SAS IO Unit Page 4 SpinupFlags */
2357#define MPI2_SASIOUNIT4_SPINUP_DISABLE_FLAG (0x01)
2358
2359
2360/*
2361 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2362 *one and check the value returned for NumPhys at runtime.
2363 */
2364#ifndef MPI2_SAS_IOUNIT4_PHY_MAX
2365#define MPI2_SAS_IOUNIT4_PHY_MAX (4)
2366#endif
2367
2368typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_4 {
2369 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header;/*0x00 */
2370 MPI2_SAS_IOUNIT4_SPINUP_GROUP
2371 SpinupGroupParameters[4]; /*0x08 */
2372 U32
2373 Reserved1; /*0x18 */
2374 U32
2375 Reserved2; /*0x1C */
2376 U32
2377 Reserved3; /*0x20 */
2378 U8
2379 BootDeviceWaitTime; /*0x24 */
2380 U8
2381 SATADeviceWaitTime; /*0x25 */
2382 U16
2383 Reserved5; /*0x26 */
2384 U8
2385 NumPhys; /*0x28 */
2386 U8
2387 PEInitialSpinupDelay; /*0x29 */
2388 U8
2389 PEReplyDelay; /*0x2A */
2390 U8
2391 Flags; /*0x2B */
2392 U8
2393 PHY[MPI2_SAS_IOUNIT4_PHY_MAX]; /*0x2C */
2394} MPI2_CONFIG_PAGE_SASIOUNIT_4,
2395 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_4,
2396 Mpi2SasIOUnitPage4_t, *pMpi2SasIOUnitPage4_t;
2397
2398#define MPI2_SASIOUNITPAGE4_PAGEVERSION (0x02)
2399
2400/*defines for Flags field */
2401#define MPI2_SASIOUNIT4_FLAGS_AUTO_PORTENABLE (0x01)
2402
2403/*defines for PHY field */
2404#define MPI2_SASIOUNIT4_PHY_SPINUP_GROUP_MASK (0x03)
2405
2406
2407/*SAS IO Unit Page 5 */
2408
2409typedef struct _MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS {
2410 U8 ControlFlags; /*0x00 */
2411 U8 PortWidthModGroup; /*0x01 */
2412 U16 InactivityTimerExponent; /*0x02 */
2413 U8 SATAPartialTimeout; /*0x04 */
2414 U8 Reserved2; /*0x05 */
2415 U8 SATASlumberTimeout; /*0x06 */
2416 U8 Reserved3; /*0x07 */
2417 U8 SASPartialTimeout; /*0x08 */
2418 U8 Reserved4; /*0x09 */
2419 U8 SASSlumberTimeout; /*0x0A */
2420 U8 Reserved5; /*0x0B */
2421} MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
2422 *PTR_MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
2423 Mpi2SasIOUnit5PhyPmSettings_t,
2424 *pMpi2SasIOUnit5PhyPmSettings_t;
2425
2426/*defines for ControlFlags field */
2427#define MPI2_SASIOUNIT5_CONTROL_SAS_SLUMBER_ENABLE (0x08)
2428#define MPI2_SASIOUNIT5_CONTROL_SAS_PARTIAL_ENABLE (0x04)
2429#define MPI2_SASIOUNIT5_CONTROL_SATA_SLUMBER_ENABLE (0x02)
2430#define MPI2_SASIOUNIT5_CONTROL_SATA_PARTIAL_ENABLE (0x01)
2431
2432/*defines for PortWidthModeGroup field */
2433#define MPI2_SASIOUNIT5_PWMG_DISABLE (0xFF)
2434
2435/*defines for InactivityTimerExponent field */
2436#define MPI2_SASIOUNIT5_ITE_MASK_SAS_SLUMBER (0x7000)
2437#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_SLUMBER (12)
2438#define MPI2_SASIOUNIT5_ITE_MASK_SAS_PARTIAL (0x0700)
2439#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_PARTIAL (8)
2440#define MPI2_SASIOUNIT5_ITE_MASK_SATA_SLUMBER (0x0070)
2441#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_SLUMBER (4)
2442#define MPI2_SASIOUNIT5_ITE_MASK_SATA_PARTIAL (0x0007)
2443#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_PARTIAL (0)
2444
2445#define MPI2_SASIOUNIT5_ITE_TEN_SECONDS (7)
2446#define MPI2_SASIOUNIT5_ITE_ONE_SECOND (6)
2447#define MPI2_SASIOUNIT5_ITE_HUNDRED_MILLISECONDS (5)
2448#define MPI2_SASIOUNIT5_ITE_TEN_MILLISECONDS (4)
2449#define MPI2_SASIOUNIT5_ITE_ONE_MILLISECOND (3)
2450#define MPI2_SASIOUNIT5_ITE_HUNDRED_MICROSECONDS (2)
2451#define MPI2_SASIOUNIT5_ITE_TEN_MICROSECONDS (1)
2452#define MPI2_SASIOUNIT5_ITE_ONE_MICROSECOND (0)
2453
2454/*
2455 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2456 *for NumPhys at runtime before using SASPhyPowerManagementSettings[].
2457 */
2458
2459typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_5 {
2460 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2461 U8 NumPhys; /*0x08 */
2462 U8 Reserved1;/*0x09 */
2463 U16 Reserved2;/*0x0A */
2464 U32 Reserved3;/*0x0C */
2465 MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS
2466 SASPhyPowerManagementSettings[]; /*0x10 */
2467} MPI2_CONFIG_PAGE_SASIOUNIT_5,
2468 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_5,
2469 Mpi2SasIOUnitPage5_t, *pMpi2SasIOUnitPage5_t;
2470
2471#define MPI2_SASIOUNITPAGE5_PAGEVERSION (0x01)
2472
2473
2474/*SAS IO Unit Page 6 */
2475
2476typedef struct _MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS {
2477 U8 CurrentStatus; /*0x00 */
2478 U8 CurrentModulation; /*0x01 */
2479 U8 CurrentUtilization; /*0x02 */
2480 U8 Reserved1; /*0x03 */
2481 U32 Reserved2; /*0x04 */
2482} MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
2483 *PTR_MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
2484 Mpi2SasIOUnit6PortWidthModGroupStatus_t,
2485 *pMpi2SasIOUnit6PortWidthModGroupStatus_t;
2486
2487/*defines for CurrentStatus field */
2488#define MPI2_SASIOUNIT6_STATUS_UNAVAILABLE (0x00)
2489#define MPI2_SASIOUNIT6_STATUS_UNCONFIGURED (0x01)
2490#define MPI2_SASIOUNIT6_STATUS_INVALID_CONFIG (0x02)
2491#define MPI2_SASIOUNIT6_STATUS_LINK_DOWN (0x03)
2492#define MPI2_SASIOUNIT6_STATUS_OBSERVATION_ONLY (0x04)
2493#define MPI2_SASIOUNIT6_STATUS_INACTIVE (0x05)
2494#define MPI2_SASIOUNIT6_STATUS_ACTIVE_IOUNIT (0x06)
2495#define MPI2_SASIOUNIT6_STATUS_ACTIVE_HOST (0x07)
2496
2497/*defines for CurrentModulation field */
2498#define MPI2_SASIOUNIT6_MODULATION_25_PERCENT (0x00)
2499#define MPI2_SASIOUNIT6_MODULATION_50_PERCENT (0x01)
2500#define MPI2_SASIOUNIT6_MODULATION_75_PERCENT (0x02)
2501#define MPI2_SASIOUNIT6_MODULATION_100_PERCENT (0x03)
2502
2503/*
2504 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2505 *for NumGroups at runtime before using PortWidthModulationGroupStatus[].
2506 */
2507
2508typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_6 {
2509 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2510 U32 Reserved1; /*0x08 */
2511 U32 Reserved2; /*0x0C */
2512 U8 NumGroups; /*0x10 */
2513 U8 Reserved3; /*0x11 */
2514 U16 Reserved4; /*0x12 */
2515 MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS
2516 PortWidthModulationGroupStatus[]; /*0x14 */
2517} MPI2_CONFIG_PAGE_SASIOUNIT_6,
2518 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_6,
2519 Mpi2SasIOUnitPage6_t, *pMpi2SasIOUnitPage6_t;
2520
2521#define MPI2_SASIOUNITPAGE6_PAGEVERSION (0x00)
2522
2523
2524/*SAS IO Unit Page 7 */
2525
2526typedef struct _MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS {
2527 U8 Flags; /*0x00 */
2528 U8 Reserved1; /*0x01 */
2529 U16 Reserved2; /*0x02 */
2530 U8 Threshold75Pct; /*0x04 */
2531 U8 Threshold50Pct; /*0x05 */
2532 U8 Threshold25Pct; /*0x06 */
2533 U8 Reserved3; /*0x07 */
2534} MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
2535 *PTR_MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
2536 Mpi2SasIOUnit7PortWidthModGroupSettings_t,
2537 *pMpi2SasIOUnit7PortWidthModGroupSettings_t;
2538
2539/*defines for Flags field */
2540#define MPI2_SASIOUNIT7_FLAGS_ENABLE_PORT_WIDTH_MODULATION (0x01)
2541
2542
2543/*
2544 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
2545 *for NumGroups at runtime before using PortWidthModulationGroupSettings[].
2546 */
2547
2548typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_7 {
2549 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2550 U8 SamplingInterval; /*0x08 */
2551 U8 WindowLength; /*0x09 */
2552 U16 Reserved1; /*0x0A */
2553 U32 Reserved2; /*0x0C */
2554 U32 Reserved3; /*0x10 */
2555 U8 NumGroups; /*0x14 */
2556 U8 Reserved4; /*0x15 */
2557 U16 Reserved5; /*0x16 */
2558 MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS
2559 PortWidthModulationGroupSettings[]; /*0x18 */
2560} MPI2_CONFIG_PAGE_SASIOUNIT_7,
2561 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_7,
2562 Mpi2SasIOUnitPage7_t, *pMpi2SasIOUnitPage7_t;
2563
2564#define MPI2_SASIOUNITPAGE7_PAGEVERSION (0x00)
2565
2566
2567/*SAS IO Unit Page 8 */
2568
2569typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_8 {
2570 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2571 Header; /*0x00 */
2572 U32
2573 Reserved1; /*0x08 */
2574 U32
2575 PowerManagementCapabilities; /*0x0C */
2576 U8
2577 TxRxSleepStatus; /*0x10 */
2578 U8
2579 Reserved2; /*0x11 */
2580 U16
2581 Reserved3; /*0x12 */
2582} MPI2_CONFIG_PAGE_SASIOUNIT_8,
2583 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_8,
2584 Mpi2SasIOUnitPage8_t, *pMpi2SasIOUnitPage8_t;
2585
2586#define MPI2_SASIOUNITPAGE8_PAGEVERSION (0x00)
2587
2588/*defines for PowerManagementCapabilities field */
2589#define MPI2_SASIOUNIT8_PM_HOST_PORT_WIDTH_MOD (0x00001000)
2590#define MPI2_SASIOUNIT8_PM_HOST_SAS_SLUMBER_MODE (0x00000800)
2591#define MPI2_SASIOUNIT8_PM_HOST_SAS_PARTIAL_MODE (0x00000400)
2592#define MPI2_SASIOUNIT8_PM_HOST_SATA_SLUMBER_MODE (0x00000200)
2593#define MPI2_SASIOUNIT8_PM_HOST_SATA_PARTIAL_MODE (0x00000100)
2594#define MPI2_SASIOUNIT8_PM_IOUNIT_PORT_WIDTH_MOD (0x00000010)
2595#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_SLUMBER_MODE (0x00000008)
2596#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_PARTIAL_MODE (0x00000004)
2597#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_SLUMBER_MODE (0x00000002)
2598#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_PARTIAL_MODE (0x00000001)
2599
2600/*defines for TxRxSleepStatus field */
2601#define MPI25_SASIOUNIT8_TXRXSLEEP_UNSUPPORTED (0x00)
2602#define MPI25_SASIOUNIT8_TXRXSLEEP_DISENGAGED (0x01)
2603#define MPI25_SASIOUNIT8_TXRXSLEEP_ACTIVE (0x02)
2604#define MPI25_SASIOUNIT8_TXRXSLEEP_SHUTDOWN (0x03)
2605
2606
2607
2608/*SAS IO Unit Page 16 */
2609
2610typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT16 {
2611 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2612 Header; /*0x00 */
2613 U64
2614 TimeStamp; /*0x08 */
2615 U32
2616 Reserved1; /*0x10 */
2617 U32
2618 Reserved2; /*0x14 */
2619 U32
2620 FastPathPendedRequests; /*0x18 */
2621 U32
2622 FastPathUnPendedRequests; /*0x1C */
2623 U32
2624 FastPathHostRequestStarts; /*0x20 */
2625 U32
2626 FastPathFirmwareRequestStarts; /*0x24 */
2627 U32
2628 FastPathHostCompletions; /*0x28 */
2629 U32
2630 FastPathFirmwareCompletions; /*0x2C */
2631 U32
2632 NonFastPathRequestStarts; /*0x30 */
2633 U32
2634 NonFastPathHostCompletions; /*0x30 */
2635} MPI2_CONFIG_PAGE_SASIOUNIT16,
2636 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT16,
2637 Mpi2SasIOUnitPage16_t, *pMpi2SasIOUnitPage16_t;
2638
2639#define MPI2_SASIOUNITPAGE16_PAGEVERSION (0x00)
2640
2641
2642/****************************************************************************
2643* SAS Expander Config Pages
2644****************************************************************************/
2645
2646/*SAS Expander Page 0 */
2647
2648typedef struct _MPI2_CONFIG_PAGE_EXPANDER_0 {
2649 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2650 Header; /*0x00 */
2651 U8
2652 PhysicalPort; /*0x08 */
2653 U8
2654 ReportGenLength; /*0x09 */
2655 U16
2656 EnclosureHandle; /*0x0A */
2657 U64
2658 SASAddress; /*0x0C */
2659 U32
2660 DiscoveryStatus; /*0x14 */
2661 U16
2662 DevHandle; /*0x18 */
2663 U16
2664 ParentDevHandle; /*0x1A */
2665 U16
2666 ExpanderChangeCount; /*0x1C */
2667 U16
2668 ExpanderRouteIndexes; /*0x1E */
2669 U8
2670 NumPhys; /*0x20 */
2671 U8
2672 SASLevel; /*0x21 */
2673 U16
2674 Flags; /*0x22 */
2675 U16
2676 STPBusInactivityTimeLimit; /*0x24 */
2677 U16
2678 STPMaxConnectTimeLimit; /*0x26 */
2679 U16
2680 STP_SMP_NexusLossTime; /*0x28 */
2681 U16
2682 MaxNumRoutedSasAddresses; /*0x2A */
2683 U64
2684 ActiveZoneManagerSASAddress;/*0x2C */
2685 U16
2686 ZoneLockInactivityLimit; /*0x34 */
2687 U16
2688 Reserved1; /*0x36 */
2689 U8
2690 TimeToReducedFunc; /*0x38 */
2691 U8
2692 InitialTimeToReducedFunc; /*0x39 */
2693 U8
2694 MaxReducedFuncTime; /*0x3A */
2695 U8
2696 Reserved2; /*0x3B */
2697} MPI2_CONFIG_PAGE_EXPANDER_0,
2698 *PTR_MPI2_CONFIG_PAGE_EXPANDER_0,
2699 Mpi2ExpanderPage0_t, *pMpi2ExpanderPage0_t;
2700
2701#define MPI2_SASEXPANDER0_PAGEVERSION (0x06)
2702
2703/*values for SAS Expander Page 0 DiscoveryStatus field */
2704#define MPI2_SAS_EXPANDER0_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
2705#define MPI2_SAS_EXPANDER0_DS_MAX_EXPANDERS_EXCEED (0x40000000)
2706#define MPI2_SAS_EXPANDER0_DS_MAX_DEVICES_EXCEED (0x20000000)
2707#define MPI2_SAS_EXPANDER0_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
2708#define MPI2_SAS_EXPANDER0_DS_DOWNSTREAM_INITIATOR (0x08000000)
2709#define MPI2_SAS_EXPANDER0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
2710#define MPI2_SAS_EXPANDER0_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
2711#define MPI2_SAS_EXPANDER0_DS_MULTI_PORT_DOMAIN (0x00002000)
2712#define MPI2_SAS_EXPANDER0_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
2713#define MPI2_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800)
2714#define MPI2_SAS_EXPANDER0_DS_TABLE_LINK (0x00000400)
2715#define MPI2_SAS_EXPANDER0_DS_SUBTRACTIVE_LINK (0x00000200)
2716#define MPI2_SAS_EXPANDER0_DS_SMP_CRC_ERROR (0x00000100)
2717#define MPI2_SAS_EXPANDER0_DS_SMP_FUNCTION_FAILED (0x00000080)
2718#define MPI2_SAS_EXPANDER0_DS_INDEX_NOT_EXIST (0x00000040)
2719#define MPI2_SAS_EXPANDER0_DS_OUT_ROUTE_ENTRIES (0x00000020)
2720#define MPI2_SAS_EXPANDER0_DS_SMP_TIMEOUT (0x00000010)
2721#define MPI2_SAS_EXPANDER0_DS_MULTIPLE_PORTS (0x00000004)
2722#define MPI2_SAS_EXPANDER0_DS_UNADDRESSABLE_DEVICE (0x00000002)
2723#define MPI2_SAS_EXPANDER0_DS_LOOP_DETECTED (0x00000001)
2724
2725/*values for SAS Expander Page 0 Flags field */
2726#define MPI2_SAS_EXPANDER0_FLAGS_REDUCED_FUNCTIONALITY (0x2000)
2727#define MPI2_SAS_EXPANDER0_FLAGS_ZONE_LOCKED (0x1000)
2728#define MPI2_SAS_EXPANDER0_FLAGS_SUPPORTED_PHYSICAL_PRES (0x0800)
2729#define MPI2_SAS_EXPANDER0_FLAGS_ASSERTED_PHYSICAL_PRES (0x0400)
2730#define MPI2_SAS_EXPANDER0_FLAGS_ZONING_SUPPORT (0x0200)
2731#define MPI2_SAS_EXPANDER0_FLAGS_ENABLED_ZONING (0x0100)
2732#define MPI2_SAS_EXPANDER0_FLAGS_TABLE_TO_TABLE_SUPPORT (0x0080)
2733#define MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x0010)
2734#define MPI2_SAS_EXPANDER0_FLAGS_OTHERS_CONFIG (0x0004)
2735#define MPI2_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x0002)
2736#define MPI2_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x0001)
2737
2738
2739/*SAS Expander Page 1 */
2740
2741typedef struct _MPI2_CONFIG_PAGE_EXPANDER_1 {
2742 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2743 Header; /*0x00 */
2744 U8
2745 PhysicalPort; /*0x08 */
2746 U8
2747 Reserved1; /*0x09 */
2748 U16
2749 Reserved2; /*0x0A */
2750 U8
2751 NumPhys; /*0x0C */
2752 U8
2753 Phy; /*0x0D */
2754 U16
2755 NumTableEntriesProgrammed; /*0x0E */
2756 U8
2757 ProgrammedLinkRate; /*0x10 */
2758 U8
2759 HwLinkRate; /*0x11 */
2760 U16
2761 AttachedDevHandle; /*0x12 */
2762 U32
2763 PhyInfo; /*0x14 */
2764 U32
2765 AttachedDeviceInfo; /*0x18 */
2766 U16
2767 ExpanderDevHandle; /*0x1C */
2768 U8
2769 ChangeCount; /*0x1E */
2770 U8
2771 NegotiatedLinkRate; /*0x1F */
2772 U8
2773 PhyIdentifier; /*0x20 */
2774 U8
2775 AttachedPhyIdentifier; /*0x21 */
2776 U8
2777 Reserved3; /*0x22 */
2778 U8
2779 DiscoveryInfo; /*0x23 */
2780 U32
2781 AttachedPhyInfo; /*0x24 */
2782 U8
2783 ZoneGroup; /*0x28 */
2784 U8
2785 SelfConfigStatus; /*0x29 */
2786 U16
2787 Reserved4; /*0x2A */
2788} MPI2_CONFIG_PAGE_EXPANDER_1,
2789 *PTR_MPI2_CONFIG_PAGE_EXPANDER_1,
2790 Mpi2ExpanderPage1_t, *pMpi2ExpanderPage1_t;
2791
2792#define MPI2_SASEXPANDER1_PAGEVERSION (0x02)
2793
2794/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
2795
2796/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
2797
2798/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
2799
2800/*see mpi2_sas.h for the MPI2_SAS_DEVICE_INFO_ defines
2801 *used for the AttachedDeviceInfo field */
2802
2803/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2804
2805/*values for SAS Expander Page 1 DiscoveryInfo field */
2806#define MPI2_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04)
2807#define MPI2_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02)
2808#define MPI2_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01)
2809
2810/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
2811
2812
2813/****************************************************************************
2814* SAS Device Config Pages
2815****************************************************************************/
2816
2817/*SAS Device Page 0 */
2818
2819typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
2820 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2821 Header; /*0x00 */
2822 U16
2823 Slot; /*0x08 */
2824 U16
2825 EnclosureHandle; /*0x0A */
2826 U64
2827 SASAddress; /*0x0C */
2828 U16
2829 ParentDevHandle; /*0x14 */
2830 U8
2831 PhyNum; /*0x16 */
2832 U8
2833 AccessStatus; /*0x17 */
2834 U16
2835 DevHandle; /*0x18 */
2836 U8
2837 AttachedPhyIdentifier; /*0x1A */
2838 U8
2839 ZoneGroup; /*0x1B */
2840 U32
2841 DeviceInfo; /*0x1C */
2842 U16
2843 Flags; /*0x20 */
2844 U8
2845 PhysicalPort; /*0x22 */
2846 U8
2847 MaxPortConnections; /*0x23 */
2848 U64
2849 DeviceName; /*0x24 */
2850 U8
2851 PortGroups; /*0x2C */
2852 U8
2853 DmaGroup; /*0x2D */
2854 U8
2855 ControlGroup; /*0x2E */
2856 U8
2857 EnclosureLevel; /*0x2F */
2858 U32
2859 ConnectorName[4]; /*0x30 */
2860 U32
2861 Reserved3; /*0x34 */
2862} MPI2_CONFIG_PAGE_SAS_DEV_0,
2863 *PTR_MPI2_CONFIG_PAGE_SAS_DEV_0,
2864 Mpi2SasDevicePage0_t,
2865 *pMpi2SasDevicePage0_t;
2866
2867#define MPI2_SASDEVICE0_PAGEVERSION (0x09)
2868
2869/*values for SAS Device Page 0 AccessStatus field */
2870#define MPI2_SAS_DEVICE0_ASTATUS_NO_ERRORS (0x00)
2871#define MPI2_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED (0x01)
2872#define MPI2_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED (0x02)
2873#define MPI2_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT (0x03)
2874#define MPI2_SAS_DEVICE0_ASTATUS_SATA_NEEDS_INITIALIZATION (0x04)
2875#define MPI2_SAS_DEVICE0_ASTATUS_ROUTE_NOT_ADDRESSABLE (0x05)
2876#define MPI2_SAS_DEVICE0_ASTATUS_SMP_ERROR_NOT_ADDRESSABLE (0x06)
2877#define MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED (0x07)
2878/*specific values for SATA Init failures */
2879#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN (0x10)
2880#define MPI2_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT (0x11)
2881#define MPI2_SAS_DEVICE0_ASTATUS_SIF_DIAG (0x12)
2882#define MPI2_SAS_DEVICE0_ASTATUS_SIF_IDENTIFICATION (0x13)
2883#define MPI2_SAS_DEVICE0_ASTATUS_SIF_CHECK_POWER (0x14)
2884#define MPI2_SAS_DEVICE0_ASTATUS_SIF_PIO_SN (0x15)
2885#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MDMA_SN (0x16)
2886#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UDMA_SN (0x17)
2887#define MPI2_SAS_DEVICE0_ASTATUS_SIF_ZONING_VIOLATION (0x18)
2888#define MPI2_SAS_DEVICE0_ASTATUS_SIF_NOT_ADDRESSABLE (0x19)
2889#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MAX (0x1F)
2890
2891/*see mpi2_sas.h for values for SAS Device Page 0 DeviceInfo values */
2892
2893/*values for SAS Device Page 0 Flags field */
2894#define MPI2_SAS_DEVICE0_FLAGS_UNAUTHORIZED_DEVICE (0x8000)
2895#define MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH (0x4000)
2896#define MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE (0x2000)
2897#define MPI2_SAS_DEVICE0_FLAGS_SLUMBER_PM_CAPABLE (0x1000)
2898#define MPI2_SAS_DEVICE0_FLAGS_PARTIAL_PM_CAPABLE (0x0800)
2899#define MPI2_SAS_DEVICE0_FLAGS_SATA_ASYNCHRONOUS_NOTIFY (0x0400)
2900#define MPI2_SAS_DEVICE0_FLAGS_SATA_SW_PRESERVE (0x0200)
2901#define MPI2_SAS_DEVICE0_FLAGS_UNSUPPORTED_DEVICE (0x0100)
2902#define MPI2_SAS_DEVICE0_FLAGS_SATA_48BIT_LBA_SUPPORTED (0x0080)
2903#define MPI2_SAS_DEVICE0_FLAGS_SATA_SMART_SUPPORTED (0x0040)
2904#define MPI2_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED (0x0020)
2905#define MPI2_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED (0x0010)
2906#define MPI2_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH (0x0008)
2907#define MPI2_SAS_DEVICE0_FLAGS_PERSIST_CAPABLE (0x0004)
2908#define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID (0x0002)
2909#define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001)
2910
2911
2912/*SAS Device Page 1 */
2913
2914typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1 {
2915 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2916 Header; /*0x00 */
2917 U32
2918 Reserved1; /*0x08 */
2919 U64
2920 SASAddress; /*0x0C */
2921 U32
2922 Reserved2; /*0x14 */
2923 U16
2924 DevHandle; /*0x18 */
2925 U16
2926 Reserved3; /*0x1A */
2927 U8
2928 InitialRegDeviceFIS[20];/*0x1C */
2929} MPI2_CONFIG_PAGE_SAS_DEV_1,
2930 *PTR_MPI2_CONFIG_PAGE_SAS_DEV_1,
2931 Mpi2SasDevicePage1_t,
2932 *pMpi2SasDevicePage1_t;
2933
2934#define MPI2_SASDEVICE1_PAGEVERSION (0x01)
2935
2936
2937/****************************************************************************
2938* SAS PHY Config Pages
2939****************************************************************************/
2940
2941/*SAS PHY Page 0 */
2942
2943typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_0 {
2944 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2945 Header; /*0x00 */
2946 U16
2947 OwnerDevHandle; /*0x08 */
2948 U16
2949 Reserved1; /*0x0A */
2950 U16
2951 AttachedDevHandle; /*0x0C */
2952 U8
2953 AttachedPhyIdentifier; /*0x0E */
2954 U8
2955 Reserved2; /*0x0F */
2956 U32
2957 AttachedPhyInfo; /*0x10 */
2958 U8
2959 ProgrammedLinkRate; /*0x14 */
2960 U8
2961 HwLinkRate; /*0x15 */
2962 U8
2963 ChangeCount; /*0x16 */
2964 U8
2965 Flags; /*0x17 */
2966 U32
2967 PhyInfo; /*0x18 */
2968 U8
2969 NegotiatedLinkRate; /*0x1C */
2970 U8
2971 Reserved3; /*0x1D */
2972 U16
2973 Reserved4; /*0x1E */
2974} MPI2_CONFIG_PAGE_SAS_PHY_0,
2975 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_0,
2976 Mpi2SasPhyPage0_t, *pMpi2SasPhyPage0_t;
2977
2978#define MPI2_SASPHY0_PAGEVERSION (0x03)
2979
2980/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
2981
2982/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
2983
2984/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
2985
2986/*values for SAS PHY Page 0 Flags field */
2987#define MPI2_SAS_PHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC (0x01)
2988
2989/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
2990
2991/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2992
2993
2994/*SAS PHY Page 1 */
2995
2996typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_1 {
2997 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2998 Header; /*0x00 */
2999 U32
3000 Reserved1; /*0x08 */
3001 U32
3002 InvalidDwordCount; /*0x0C */
3003 U32
3004 RunningDisparityErrorCount; /*0x10 */
3005 U32
3006 LossDwordSynchCount; /*0x14 */
3007 U32
3008 PhyResetProblemCount; /*0x18 */
3009} MPI2_CONFIG_PAGE_SAS_PHY_1,
3010 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_1,
3011 Mpi2SasPhyPage1_t, *pMpi2SasPhyPage1_t;
3012
3013#define MPI2_SASPHY1_PAGEVERSION (0x01)
3014
3015
3016/*SAS PHY Page 2 */
3017
3018typedef struct _MPI2_SASPHY2_PHY_EVENT {
3019 U8 PhyEventCode; /*0x00 */
3020 U8 Reserved1; /*0x01 */
3021 U16 Reserved2; /*0x02 */
3022 U32 PhyEventInfo; /*0x04 */
3023} MPI2_SASPHY2_PHY_EVENT, *PTR_MPI2_SASPHY2_PHY_EVENT,
3024 Mpi2SasPhy2PhyEvent_t, *pMpi2SasPhy2PhyEvent_t;
3025
3026/*use MPI2_SASPHY3_EVENT_CODE_ for the PhyEventCode field */
3027
3028
3029/*
3030 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3031 *for NumPhyEvents at runtime before using PhyEvent[].
3032 */
3033
3034typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_2 {
3035 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3036 Header; /*0x00 */
3037 U32
3038 Reserved1; /*0x08 */
3039 U8
3040 NumPhyEvents; /*0x0C */
3041 U8
3042 Reserved2; /*0x0D */
3043 U16
3044 Reserved3; /*0x0E */
3045 MPI2_SASPHY2_PHY_EVENT
3046 PhyEvent[]; /*0x10 */
3047} MPI2_CONFIG_PAGE_SAS_PHY_2,
3048 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_2,
3049 Mpi2SasPhyPage2_t,
3050 *pMpi2SasPhyPage2_t;
3051
3052#define MPI2_SASPHY2_PAGEVERSION (0x00)
3053
3054
3055/*SAS PHY Page 3 */
3056
3057typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG {
3058 U8 PhyEventCode; /*0x00 */
3059 U8 Reserved1; /*0x01 */
3060 U16 Reserved2; /*0x02 */
3061 U8 CounterType; /*0x04 */
3062 U8 ThresholdWindow; /*0x05 */
3063 U8 TimeUnits; /*0x06 */
3064 U8 Reserved3; /*0x07 */
3065 U32 EventThreshold; /*0x08 */
3066 U16 ThresholdFlags; /*0x0C */
3067 U16 Reserved4; /*0x0E */
3068} MPI2_SASPHY3_PHY_EVENT_CONFIG,
3069 *PTR_MPI2_SASPHY3_PHY_EVENT_CONFIG,
3070 Mpi2SasPhy3PhyEventConfig_t,
3071 *pMpi2SasPhy3PhyEventConfig_t;
3072
3073/*values for PhyEventCode field */
3074#define MPI2_SASPHY3_EVENT_CODE_NO_EVENT (0x00)
3075#define MPI2_SASPHY3_EVENT_CODE_INVALID_DWORD (0x01)
3076#define MPI2_SASPHY3_EVENT_CODE_RUNNING_DISPARITY_ERROR (0x02)
3077#define MPI2_SASPHY3_EVENT_CODE_LOSS_DWORD_SYNC (0x03)
3078#define MPI2_SASPHY3_EVENT_CODE_PHY_RESET_PROBLEM (0x04)
3079#define MPI2_SASPHY3_EVENT_CODE_ELASTICITY_BUF_OVERFLOW (0x05)
3080#define MPI2_SASPHY3_EVENT_CODE_RX_ERROR (0x06)
3081#define MPI2_SASPHY3_EVENT_CODE_RX_ADDR_FRAME_ERROR (0x20)
3082#define MPI2_SASPHY3_EVENT_CODE_TX_AC_OPEN_REJECT (0x21)
3083#define MPI2_SASPHY3_EVENT_CODE_RX_AC_OPEN_REJECT (0x22)
3084#define MPI2_SASPHY3_EVENT_CODE_TX_RC_OPEN_REJECT (0x23)
3085#define MPI2_SASPHY3_EVENT_CODE_RX_RC_OPEN_REJECT (0x24)
3086#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_PARTIAL_WAITING_ON (0x25)
3087#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_CONNECT_WAITING_ON (0x26)
3088#define MPI2_SASPHY3_EVENT_CODE_TX_BREAK (0x27)
3089#define MPI2_SASPHY3_EVENT_CODE_RX_BREAK (0x28)
3090#define MPI2_SASPHY3_EVENT_CODE_BREAK_TIMEOUT (0x29)
3091#define MPI2_SASPHY3_EVENT_CODE_CONNECTION (0x2A)
3092#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_PATHWAY_BLOCKED (0x2B)
3093#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_ARB_WAIT_TIME (0x2C)
3094#define MPI2_SASPHY3_EVENT_CODE_PEAK_ARB_WAIT_TIME (0x2D)
3095#define MPI2_SASPHY3_EVENT_CODE_PEAK_CONNECT_TIME (0x2E)
3096#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_FRAMES (0x40)
3097#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_FRAMES (0x41)
3098#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_ERROR_FRAMES (0x42)
3099#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_ERROR_FRAMES (0x43)
3100#define MPI2_SASPHY3_EVENT_CODE_TX_CREDIT_BLOCKED (0x44)
3101#define MPI2_SASPHY3_EVENT_CODE_RX_CREDIT_BLOCKED (0x45)
3102#define MPI2_SASPHY3_EVENT_CODE_TX_SATA_FRAMES (0x50)
3103#define MPI2_SASPHY3_EVENT_CODE_RX_SATA_FRAMES (0x51)
3104#define MPI2_SASPHY3_EVENT_CODE_SATA_OVERFLOW (0x52)
3105#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_FRAMES (0x60)
3106#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_FRAMES (0x61)
3107#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_ERROR_FRAMES (0x63)
3108#define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT (0xD0)
3109#define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE (0xD1)
3110#define MPI2_SASPHY3_EVENT_CODE_RX_AIP (0xD2)
3111
3112/*Following codes are product specific and in MPI v2.6 and later */
3113#define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME (0xD3)
3114#define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME (0xD4)
3115#define MPI2_SASPHY3_EVENT_CODE_LCCONN_TIME (0xD5)
3116#define MPI2_SASPHY3_EVENT_CODE_SSP_TX_START_TRANSMIT (0xD6)
3117#define MPI2_SASPHY3_EVENT_CODE_SATA_TX_START (0xD7)
3118#define MPI2_SASPHY3_EVENT_CODE_SMP_TX_START_TRANSMT (0xD8)
3119#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_BREAK_CONN (0xD9)
3120#define MPI2_SASPHY3_EVENT_CODE_SSP_RX_START_RECEIVE (0xDA)
3121#define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE (0xDB)
3122#define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE (0xDC)
3123
3124
3125/*values for the CounterType field */
3126#define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING (0x00)
3127#define MPI2_SASPHY3_COUNTER_TYPE_SATURATING (0x01)
3128#define MPI2_SASPHY3_COUNTER_TYPE_PEAK_VALUE (0x02)
3129
3130/*values for the TimeUnits field */
3131#define MPI2_SASPHY3_TIME_UNITS_10_MICROSECONDS (0x00)
3132#define MPI2_SASPHY3_TIME_UNITS_100_MICROSECONDS (0x01)
3133#define MPI2_SASPHY3_TIME_UNITS_1_MILLISECOND (0x02)
3134#define MPI2_SASPHY3_TIME_UNITS_10_MILLISECONDS (0x03)
3135
3136/*values for the ThresholdFlags field */
3137#define MPI2_SASPHY3_TFLAGS_PHY_RESET (0x0002)
3138#define MPI2_SASPHY3_TFLAGS_EVENT_NOTIFY (0x0001)
3139
3140/*
3141 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3142 *for NumPhyEvents at runtime before using PhyEventConfig[].
3143 */
3144
3145typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_3 {
3146 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3147 Header; /*0x00 */
3148 U32
3149 Reserved1; /*0x08 */
3150 U8
3151 NumPhyEvents; /*0x0C */
3152 U8
3153 Reserved2; /*0x0D */
3154 U16
3155 Reserved3; /*0x0E */
3156 MPI2_SASPHY3_PHY_EVENT_CONFIG
3157 PhyEventConfig[]; /*0x10 */
3158} MPI2_CONFIG_PAGE_SAS_PHY_3,
3159 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_3,
3160 Mpi2SasPhyPage3_t, *pMpi2SasPhyPage3_t;
3161
3162#define MPI2_SASPHY3_PAGEVERSION (0x00)
3163
3164
3165/*SAS PHY Page 4 */
3166
3167typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_4 {
3168 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3169 Header; /*0x00 */
3170 U16
3171 Reserved1; /*0x08 */
3172 U8
3173 Reserved2; /*0x0A */
3174 U8
3175 Flags; /*0x0B */
3176 U8
3177 InitialFrame[28]; /*0x0C */
3178} MPI2_CONFIG_PAGE_SAS_PHY_4,
3179 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_4,
3180 Mpi2SasPhyPage4_t, *pMpi2SasPhyPage4_t;
3181
3182#define MPI2_SASPHY4_PAGEVERSION (0x00)
3183
3184/*values for the Flags field */
3185#define MPI2_SASPHY4_FLAGS_FRAME_VALID (0x02)
3186#define MPI2_SASPHY4_FLAGS_SATA_FRAME (0x01)
3187
3188
3189
3190
3191/****************************************************************************
3192* SAS Port Config Pages
3193****************************************************************************/
3194
3195/*SAS Port Page 0 */
3196
3197typedef struct _MPI2_CONFIG_PAGE_SAS_PORT_0 {
3198 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3199 Header; /*0x00 */
3200 U8
3201 PortNumber; /*0x08 */
3202 U8
3203 PhysicalPort; /*0x09 */
3204 U8
3205 PortWidth; /*0x0A */
3206 U8
3207 PhysicalPortWidth; /*0x0B */
3208 U8
3209 ZoneGroup; /*0x0C */
3210 U8
3211 Reserved1; /*0x0D */
3212 U16
3213 Reserved2; /*0x0E */
3214 U64
3215 SASAddress; /*0x10 */
3216 U32
3217 DeviceInfo; /*0x18 */
3218 U32
3219 Reserved3; /*0x1C */
3220 U32
3221 Reserved4; /*0x20 */
3222} MPI2_CONFIG_PAGE_SAS_PORT_0,
3223 *PTR_MPI2_CONFIG_PAGE_SAS_PORT_0,
3224 Mpi2SasPortPage0_t, *pMpi2SasPortPage0_t;
3225
3226#define MPI2_SASPORT0_PAGEVERSION (0x00)
3227
3228/*see mpi2_sas.h for values for SAS Port Page 0 DeviceInfo values */
3229
3230
3231/****************************************************************************
3232* SAS Enclosure Config Pages
3233****************************************************************************/
3234
3235/*SAS Enclosure Page 0 */
3236
3237typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
3238 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3239 U32 Reserved1; /*0x08 */
3240 U64 EnclosureLogicalID; /*0x0C */
3241 U16 Flags; /*0x14 */
3242 U16 EnclosureHandle; /*0x16 */
3243 U16 NumSlots; /*0x18 */
3244 U16 StartSlot; /*0x1A */
3245 U8 ChassisSlot; /*0x1C */
3246 U8 EnclosureLevel; /*0x1D */
3247 U16 SEPDevHandle; /*0x1E */
3248 U8 OEMRD; /*0x20 */
3249 U8 Reserved1a; /*0x21 */
3250 U16 Reserved2; /*0x22 */
3251 U32 Reserved3; /*0x24 */
3252} MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
3253 *PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
3254 Mpi2SasEnclosurePage0_t, *pMpi2SasEnclosurePage0_t,
3255 MPI26_CONFIG_PAGE_ENCLOSURE_0,
3256 *PTR_MPI26_CONFIG_PAGE_ENCLOSURE_0,
3257 Mpi26EnclosurePage0_t, *pMpi26EnclosurePage0_t;
3258
3259#define MPI2_SASENCLOSURE0_PAGEVERSION (0x04)
3260
3261/*values for SAS Enclosure Page 0 Flags field */
3262#define MPI26_SAS_ENCLS0_FLAGS_OEMRD_VALID (0x0080)
3263#define MPI26_SAS_ENCLS0_FLAGS_OEMRD_COLLECTING (0x0040)
3264#define MPI2_SAS_ENCLS0_FLAGS_CHASSIS_SLOT_VALID (0x0020)
3265#define MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID (0x0010)
3266#define MPI2_SAS_ENCLS0_FLAGS_MNG_MASK (0x000F)
3267#define MPI2_SAS_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000)
3268#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SES (0x0001)
3269#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002)
3270#define MPI2_SAS_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003)
3271#define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004)
3272#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005)
3273
3274#define MPI26_ENCLOSURE0_PAGEVERSION (0x04)
3275
3276/*Values for Enclosure Page 0 Flags field */
3277#define MPI26_ENCLS0_FLAGS_OEMRD_VALID (0x0080)
3278#define MPI26_ENCLS0_FLAGS_OEMRD_COLLECTING (0x0040)
3279#define MPI26_ENCLS0_FLAGS_CHASSIS_SLOT_VALID (0x0020)
3280#define MPI26_ENCLS0_FLAGS_ENCL_LEVEL_VALID (0x0010)
3281#define MPI26_ENCLS0_FLAGS_MNG_MASK (0x000F)
3282#define MPI26_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000)
3283#define MPI26_ENCLS0_FLAGS_MNG_IOC_SES (0x0001)
3284#define MPI26_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002)
3285#define MPI26_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003)
3286#define MPI26_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004)
3287#define MPI26_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005)
3288
3289/****************************************************************************
3290* Log Config Page
3291****************************************************************************/
3292
3293/*Log Page 0 */
3294
3295/*
3296 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3297 *for NumLogEntries at runtime before using LogEntry[].
3298 */
3299
3300#define MPI2_LOG_0_LOG_DATA_LENGTH (0x1C)
3301
3302typedef struct _MPI2_LOG_0_ENTRY {
3303 U64 TimeStamp; /*0x00 */
3304 U32 Reserved1; /*0x08 */
3305 U16 LogSequence; /*0x0C */
3306 U16 LogEntryQualifier; /*0x0E */
3307 U8 VP_ID; /*0x10 */
3308 U8 VF_ID; /*0x11 */
3309 U16 Reserved2; /*0x12 */
3310 U8
3311 LogData[MPI2_LOG_0_LOG_DATA_LENGTH];/*0x14 */
3312} MPI2_LOG_0_ENTRY, *PTR_MPI2_LOG_0_ENTRY,
3313 Mpi2Log0Entry_t, *pMpi2Log0Entry_t;
3314
3315/*values for Log Page 0 LogEntry LogEntryQualifier field */
3316#define MPI2_LOG_0_ENTRY_QUAL_ENTRY_UNUSED (0x0000)
3317#define MPI2_LOG_0_ENTRY_QUAL_POWER_ON_RESET (0x0001)
3318#define MPI2_LOG_0_ENTRY_QUAL_TIMESTAMP_UPDATE (0x0002)
3319#define MPI2_LOG_0_ENTRY_QUAL_MIN_IMPLEMENT_SPEC (0x8000)
3320#define MPI2_LOG_0_ENTRY_QUAL_MAX_IMPLEMENT_SPEC (0xFFFF)
3321
3322typedef struct _MPI2_CONFIG_PAGE_LOG_0 {
3323 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3324 U32 Reserved1; /*0x08 */
3325 U32 Reserved2; /*0x0C */
3326 U16 NumLogEntries;/*0x10 */
3327 U16 Reserved3; /*0x12 */
3328 MPI2_LOG_0_ENTRY LogEntry[]; /*0x14 */
3329} MPI2_CONFIG_PAGE_LOG_0, *PTR_MPI2_CONFIG_PAGE_LOG_0,
3330 Mpi2LogPage0_t, *pMpi2LogPage0_t;
3331
3332#define MPI2_LOG_0_PAGEVERSION (0x02)
3333
3334
3335/****************************************************************************
3336* RAID Config Page
3337****************************************************************************/
3338
3339/*RAID Page 0 */
3340
3341/*
3342 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3343 *for NumElements at runtime before using ConfigElement[].
3344 */
3345
3346typedef struct _MPI2_RAIDCONFIG0_CONFIG_ELEMENT {
3347 U16 ElementFlags; /*0x00 */
3348 U16 VolDevHandle; /*0x02 */
3349 U8 HotSparePool; /*0x04 */
3350 U8 PhysDiskNum; /*0x05 */
3351 U16 PhysDiskDevHandle; /*0x06 */
3352} MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
3353 *PTR_MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
3354 Mpi2RaidConfig0ConfigElement_t,
3355 *pMpi2RaidConfig0ConfigElement_t;
3356
3357/*values for the ElementFlags field */
3358#define MPI2_RAIDCONFIG0_EFLAGS_MASK_ELEMENT_TYPE (0x000F)
3359#define MPI2_RAIDCONFIG0_EFLAGS_VOLUME_ELEMENT (0x0000)
3360#define MPI2_RAIDCONFIG0_EFLAGS_VOL_PHYS_DISK_ELEMENT (0x0001)
3361#define MPI2_RAIDCONFIG0_EFLAGS_HOT_SPARE_ELEMENT (0x0002)
3362#define MPI2_RAIDCONFIG0_EFLAGS_OCE_ELEMENT (0x0003)
3363
3364
3365typedef struct _MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0 {
3366 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3367 U8 NumHotSpares; /*0x08 */
3368 U8 NumPhysDisks; /*0x09 */
3369 U8 NumVolumes; /*0x0A */
3370 U8 ConfigNum; /*0x0B */
3371 U32 Flags; /*0x0C */
3372 U8 ConfigGUID[24]; /*0x10 */
3373 U32 Reserved1; /*0x28 */
3374 U8 NumElements; /*0x2C */
3375 U8 Reserved2; /*0x2D */
3376 U16 Reserved3; /*0x2E */
3377 MPI2_RAIDCONFIG0_CONFIG_ELEMENT ConfigElement[];/*0x30 */
3378} MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
3379 *PTR_MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
3380 Mpi2RaidConfigurationPage0_t,
3381 *pMpi2RaidConfigurationPage0_t;
3382
3383#define MPI2_RAIDCONFIG0_PAGEVERSION (0x00)
3384
3385/*values for RAID Configuration Page 0 Flags field */
3386#define MPI2_RAIDCONFIG0_FLAG_FOREIGN_CONFIG (0x00000001)
3387
3388
3389/****************************************************************************
3390* Driver Persistent Mapping Config Pages
3391****************************************************************************/
3392
3393/*Driver Persistent Mapping Page 0 */
3394
3395typedef struct _MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY {
3396 U64 PhysicalIdentifier; /*0x00 */
3397 U16 MappingInformation; /*0x08 */
3398 U16 DeviceIndex; /*0x0A */
3399 U32 PhysicalBitsMapping; /*0x0C */
3400 U32 Reserved1; /*0x10 */
3401} MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
3402 *PTR_MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
3403 Mpi2DriverMap0Entry_t, *pMpi2DriverMap0Entry_t;
3404
3405typedef struct _MPI2_CONFIG_PAGE_DRIVER_MAPPING_0 {
3406 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3407 MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY Entry; /*0x08 */
3408} MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
3409 *PTR_MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
3410 Mpi2DriverMappingPage0_t, *pMpi2DriverMappingPage0_t;
3411
3412#define MPI2_DRIVERMAPPING0_PAGEVERSION (0x00)
3413
3414/*values for Driver Persistent Mapping Page 0 MappingInformation field */
3415#define MPI2_DRVMAP0_MAPINFO_SLOT_MASK (0x07F0)
3416#define MPI2_DRVMAP0_MAPINFO_SLOT_SHIFT (4)
3417#define MPI2_DRVMAP0_MAPINFO_MISSING_MASK (0x000F)
3418
3419
3420/****************************************************************************
3421* Ethernet Config Pages
3422****************************************************************************/
3423
3424/*Ethernet Page 0 */
3425
3426/*IP address (union of IPv4 and IPv6) */
3427typedef union _MPI2_ETHERNET_IP_ADDR {
3428 U32 IPv4Addr;
3429 U32 IPv6Addr[4];
3430} MPI2_ETHERNET_IP_ADDR, *PTR_MPI2_ETHERNET_IP_ADDR,
3431 Mpi2EthernetIpAddr_t, *pMpi2EthernetIpAddr_t;
3432
3433#define MPI2_ETHERNET_HOST_NAME_LENGTH (32)
3434
3435typedef struct _MPI2_CONFIG_PAGE_ETHERNET_0 {
3436 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3437 U8 NumInterfaces; /*0x08 */
3438 U8 Reserved0; /*0x09 */
3439 U16 Reserved1; /*0x0A */
3440 U32 Status; /*0x0C */
3441 U8 MediaState; /*0x10 */
3442 U8 Reserved2; /*0x11 */
3443 U16 Reserved3; /*0x12 */
3444 U8 MacAddress[6]; /*0x14 */
3445 U8 Reserved4; /*0x1A */
3446 U8 Reserved5; /*0x1B */
3447 MPI2_ETHERNET_IP_ADDR IpAddress; /*0x1C */
3448 MPI2_ETHERNET_IP_ADDR SubnetMask; /*0x2C */
3449 MPI2_ETHERNET_IP_ADDR GatewayIpAddress;/*0x3C */
3450 MPI2_ETHERNET_IP_ADDR DNS1IpAddress; /*0x4C */
3451 MPI2_ETHERNET_IP_ADDR DNS2IpAddress; /*0x5C */
3452 MPI2_ETHERNET_IP_ADDR DhcpIpAddress; /*0x6C */
3453 U8
3454 HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
3455} MPI2_CONFIG_PAGE_ETHERNET_0,
3456 *PTR_MPI2_CONFIG_PAGE_ETHERNET_0,
3457 Mpi2EthernetPage0_t, *pMpi2EthernetPage0_t;
3458
3459#define MPI2_ETHERNETPAGE0_PAGEVERSION (0x00)
3460
3461/*values for Ethernet Page 0 Status field */
3462#define MPI2_ETHPG0_STATUS_IPV6_CAPABLE (0x80000000)
3463#define MPI2_ETHPG0_STATUS_IPV4_CAPABLE (0x40000000)
3464#define MPI2_ETHPG0_STATUS_CONSOLE_CONNECTED (0x20000000)
3465#define MPI2_ETHPG0_STATUS_DEFAULT_IF (0x00000100)
3466#define MPI2_ETHPG0_STATUS_FW_DWNLD_ENABLED (0x00000080)
3467#define MPI2_ETHPG0_STATUS_TELNET_ENABLED (0x00000040)
3468#define MPI2_ETHPG0_STATUS_SSH2_ENABLED (0x00000020)
3469#define MPI2_ETHPG0_STATUS_DHCP_CLIENT_ENABLED (0x00000010)
3470#define MPI2_ETHPG0_STATUS_IPV6_ENABLED (0x00000008)
3471#define MPI2_ETHPG0_STATUS_IPV4_ENABLED (0x00000004)
3472#define MPI2_ETHPG0_STATUS_IPV6_ADDRESSES (0x00000002)
3473#define MPI2_ETHPG0_STATUS_ETH_IF_ENABLED (0x00000001)
3474
3475/*values for Ethernet Page 0 MediaState field */
3476#define MPI2_ETHPG0_MS_DUPLEX_MASK (0x80)
3477#define MPI2_ETHPG0_MS_HALF_DUPLEX (0x00)
3478#define MPI2_ETHPG0_MS_FULL_DUPLEX (0x80)
3479
3480#define MPI2_ETHPG0_MS_CONNECT_SPEED_MASK (0x07)
3481#define MPI2_ETHPG0_MS_NOT_CONNECTED (0x00)
3482#define MPI2_ETHPG0_MS_10MBIT (0x01)
3483#define MPI2_ETHPG0_MS_100MBIT (0x02)
3484#define MPI2_ETHPG0_MS_1GBIT (0x03)
3485
3486
3487/*Ethernet Page 1 */
3488
3489typedef struct _MPI2_CONFIG_PAGE_ETHERNET_1 {
3490 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3491 Header; /*0x00 */
3492 U32
3493 Reserved0; /*0x08 */
3494 U32
3495 Flags; /*0x0C */
3496 U8
3497 MediaState; /*0x10 */
3498 U8
3499 Reserved1; /*0x11 */
3500 U16
3501 Reserved2; /*0x12 */
3502 U8
3503 MacAddress[6]; /*0x14 */
3504 U8
3505 Reserved3; /*0x1A */
3506 U8
3507 Reserved4; /*0x1B */
3508 MPI2_ETHERNET_IP_ADDR
3509 StaticIpAddress; /*0x1C */
3510 MPI2_ETHERNET_IP_ADDR
3511 StaticSubnetMask; /*0x2C */
3512 MPI2_ETHERNET_IP_ADDR
3513 StaticGatewayIpAddress; /*0x3C */
3514 MPI2_ETHERNET_IP_ADDR
3515 StaticDNS1IpAddress; /*0x4C */
3516 MPI2_ETHERNET_IP_ADDR
3517 StaticDNS2IpAddress; /*0x5C */
3518 U32
3519 Reserved5; /*0x6C */
3520 U32
3521 Reserved6; /*0x70 */
3522 U32
3523 Reserved7; /*0x74 */
3524 U32
3525 Reserved8; /*0x78 */
3526 U8
3527 HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
3528} MPI2_CONFIG_PAGE_ETHERNET_1,
3529 *PTR_MPI2_CONFIG_PAGE_ETHERNET_1,
3530 Mpi2EthernetPage1_t, *pMpi2EthernetPage1_t;
3531
3532#define MPI2_ETHERNETPAGE1_PAGEVERSION (0x00)
3533
3534/*values for Ethernet Page 1 Flags field */
3535#define MPI2_ETHPG1_FLAG_SET_DEFAULT_IF (0x00000100)
3536#define MPI2_ETHPG1_FLAG_ENABLE_FW_DOWNLOAD (0x00000080)
3537#define MPI2_ETHPG1_FLAG_ENABLE_TELNET (0x00000040)
3538#define MPI2_ETHPG1_FLAG_ENABLE_SSH2 (0x00000020)
3539#define MPI2_ETHPG1_FLAG_ENABLE_DHCP_CLIENT (0x00000010)
3540#define MPI2_ETHPG1_FLAG_ENABLE_IPV6 (0x00000008)
3541#define MPI2_ETHPG1_FLAG_ENABLE_IPV4 (0x00000004)
3542#define MPI2_ETHPG1_FLAG_USE_IPV6_ADDRESSES (0x00000002)
3543#define MPI2_ETHPG1_FLAG_ENABLE_ETH_IF (0x00000001)
3544
3545/*values for Ethernet Page 1 MediaState field */
3546#define MPI2_ETHPG1_MS_DUPLEX_MASK (0x80)
3547#define MPI2_ETHPG1_MS_HALF_DUPLEX (0x00)
3548#define MPI2_ETHPG1_MS_FULL_DUPLEX (0x80)
3549
3550#define MPI2_ETHPG1_MS_DATA_RATE_MASK (0x07)
3551#define MPI2_ETHPG1_MS_DATA_RATE_AUTO (0x00)
3552#define MPI2_ETHPG1_MS_DATA_RATE_10MBIT (0x01)
3553#define MPI2_ETHPG1_MS_DATA_RATE_100MBIT (0x02)
3554#define MPI2_ETHPG1_MS_DATA_RATE_1GBIT (0x03)
3555
3556
3557/****************************************************************************
3558* Extended Manufacturing Config Pages
3559****************************************************************************/
3560
3561/*
3562 *Generic structure to use for product-specific extended manufacturing pages
3563 *(currently Extended Manufacturing Page 40 through Extended Manufacturing
3564 *Page 60).
3565 */
3566
3567typedef struct _MPI2_CONFIG_PAGE_EXT_MAN_PS {
3568 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3569 Header; /*0x00 */
3570 U32
3571 ProductSpecificInfo; /*0x08 */
3572} MPI2_CONFIG_PAGE_EXT_MAN_PS,
3573 *PTR_MPI2_CONFIG_PAGE_EXT_MAN_PS,
3574 Mpi2ExtManufacturingPagePS_t,
3575 *pMpi2ExtManufacturingPagePS_t;
3576
3577/*PageVersion should be provided by product-specific code */
3578
3579
3580
3581/****************************************************************************
3582* values for fields used by several types of PCIe Config Pages
3583****************************************************************************/
3584
3585/*values for NegotiatedLinkRates fields */
3586#define MPI26_PCIE_NEG_LINK_RATE_MASK_PHYSICAL (0x0F)
3587/*link rates used for Negotiated Physical Link Rate */
3588#define MPI26_PCIE_NEG_LINK_RATE_UNKNOWN (0x00)
3589#define MPI26_PCIE_NEG_LINK_RATE_PHY_DISABLED (0x01)
3590#define MPI26_PCIE_NEG_LINK_RATE_2_5 (0x02)
3591#define MPI26_PCIE_NEG_LINK_RATE_5_0 (0x03)
3592#define MPI26_PCIE_NEG_LINK_RATE_8_0 (0x04)
3593#define MPI26_PCIE_NEG_LINK_RATE_16_0 (0x05)
3594
3595
3596/****************************************************************************
3597* PCIe IO Unit Config Pages (MPI v2.6 and later)
3598****************************************************************************/
3599
3600/*PCIe IO Unit Page 0 */
3601
3602typedef struct _MPI26_PCIE_IO_UNIT0_PHY_DATA {
3603 U8 Link; /*0x00 */
3604 U8 LinkFlags; /*0x01 */
3605 U8 PhyFlags; /*0x02 */
3606 U8 NegotiatedLinkRate; /*0x03 */
3607 U32 ControllerPhyDeviceInfo;/*0x04 */
3608 U16 AttachedDevHandle; /*0x08 */
3609 U16 ControllerDevHandle; /*0x0A */
3610 U32 EnumerationStatus; /*0x0C */
3611 U32 Reserved1; /*0x10 */
3612} MPI26_PCIE_IO_UNIT0_PHY_DATA,
3613 *PTR_MPI26_PCIE_IO_UNIT0_PHY_DATA,
3614 Mpi26PCIeIOUnit0PhyData_t, *pMpi26PCIeIOUnit0PhyData_t;
3615
3616/*
3617 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3618 *for NumPhys at runtime before using PhyData[].
3619 */
3620
3621typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_0 {
3622 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3623 U32 Reserved1; /*0x08 */
3624 U8 NumPhys; /*0x0C */
3625 U8 InitStatus; /*0x0D */
3626 U16 Reserved3; /*0x0E */
3627 MPI26_PCIE_IO_UNIT0_PHY_DATA
3628 PhyData[]; /*0x10 */
3629} MPI26_CONFIG_PAGE_PIOUNIT_0,
3630 *PTR_MPI26_CONFIG_PAGE_PIOUNIT_0,
3631 Mpi26PCIeIOUnitPage0_t, *pMpi26PCIeIOUnitPage0_t;
3632
3633#define MPI26_PCIEIOUNITPAGE0_PAGEVERSION (0x00)
3634
3635/*values for PCIe IO Unit Page 0 LinkFlags */
3636#define MPI26_PCIEIOUNIT0_LINKFLAGS_ENUMERATION_IN_PROGRESS (0x08)
3637
3638/*values for PCIe IO Unit Page 0 PhyFlags */
3639#define MPI26_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08)
3640
3641/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
3642
3643/*see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo
3644 *values
3645 */
3646
3647/*values for PCIe IO Unit Page 0 EnumerationStatus */
3648#define MPI26_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED (0x40000000)
3649#define MPI26_PCIEIOUNIT0_ES_MAX_DEVICES_EXCEEDED (0x20000000)
3650
3651
3652/*PCIe IO Unit Page 1 */
3653
3654typedef struct _MPI26_PCIE_IO_UNIT1_PHY_DATA {
3655 U8 Link; /*0x00 */
3656 U8 LinkFlags; /*0x01 */
3657 U8 PhyFlags; /*0x02 */
3658 U8 MaxMinLinkRate; /*0x03 */
3659 U32 ControllerPhyDeviceInfo; /*0x04 */
3660 U32 Reserved1; /*0x08 */
3661} MPI26_PCIE_IO_UNIT1_PHY_DATA,
3662 *PTR_MPI26_PCIE_IO_UNIT1_PHY_DATA,
3663 Mpi26PCIeIOUnit1PhyData_t, *pMpi26PCIeIOUnit1PhyData_t;
3664
3665/*values for LinkFlags */
3666#define MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SEPARATE_REFCLK (0x00)
3667#define MPI26_PCIEIOUNIT1_LINKFLAGS_SRIS_EN (0x01)
3668#define MPI26_PCIEIOUNIT1_LINKFLAGS_SRNS_EN (0x02)
3669
3670/*
3671 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3672 *for NumPhys at runtime before using PhyData[].
3673 */
3674
3675typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_1 {
3676 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3677 U16 ControlFlags; /*0x08 */
3678 U16 Reserved; /*0x0A */
3679 U16 AdditionalControlFlags; /*0x0C */
3680 U16 NVMeMaxQueueDepth; /*0x0E */
3681 U8 NumPhys; /*0x10 */
3682 U8 DMDReportPCIe; /*0x11 */
3683 U16 Reserved2; /*0x12 */
3684 MPI26_PCIE_IO_UNIT1_PHY_DATA
3685 PhyData[]; /*0x14 */
3686} MPI26_CONFIG_PAGE_PIOUNIT_1,
3687 *PTR_MPI26_CONFIG_PAGE_PIOUNIT_1,
3688 Mpi26PCIeIOUnitPage1_t, *pMpi26PCIeIOUnitPage1_t;
3689
3690#define MPI26_PCIEIOUNITPAGE1_PAGEVERSION (0x00)
3691
3692/*values for PCIe IO Unit Page 1 PhyFlags */
3693#define MPI26_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08)
3694#define MPI26_PCIEIOUNIT1_PHYFLAGS_ENDPOINT_ONLY (0x01)
3695
3696/*values for PCIe IO Unit Page 1 MaxMinLinkRate */
3697#define MPI26_PCIEIOUNIT1_MAX_RATE_MASK (0xF0)
3698#define MPI26_PCIEIOUNIT1_MAX_RATE_SHIFT (4)
3699#define MPI26_PCIEIOUNIT1_MAX_RATE_2_5 (0x20)
3700#define MPI26_PCIEIOUNIT1_MAX_RATE_5_0 (0x30)
3701#define MPI26_PCIEIOUNIT1_MAX_RATE_8_0 (0x40)
3702#define MPI26_PCIEIOUNIT1_MAX_RATE_16_0 (0x50)
3703
3704/*values for PCIe IO Unit Page 1 DMDReportPCIe */
3705#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_MASK (0x80)
3706#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_1_SEC (0x00)
3707#define MPI26_PCIEIOUNIT1_DMDRPT_UNIT_16_SEC (0x80)
3708#define MPI26_PCIEIOUNIT1_DMDRPT_DELAY_TIME_MASK (0x7F)
3709
3710/*see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo
3711 *values
3712 */
3713
3714
3715/****************************************************************************
3716* PCIe Switch Config Pages (MPI v2.6 and later)
3717****************************************************************************/
3718
3719/*PCIe Switch Page 0 */
3720
3721typedef struct _MPI26_CONFIG_PAGE_PSWITCH_0 {
3722 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3723 U8 PhysicalPort; /*0x08 */
3724 U8 Reserved1; /*0x09 */
3725 U16 Reserved2; /*0x0A */
3726 U16 DevHandle; /*0x0C */
3727 U16 ParentDevHandle; /*0x0E */
3728 U8 NumPorts; /*0x10 */
3729 U8 PCIeLevel; /*0x11 */
3730 U16 Reserved3; /*0x12 */
3731 U32 Reserved4; /*0x14 */
3732 U32 Reserved5; /*0x18 */
3733 U32 Reserved6; /*0x1C */
3734} MPI26_CONFIG_PAGE_PSWITCH_0, *PTR_MPI26_CONFIG_PAGE_PSWITCH_0,
3735 Mpi26PCIeSwitchPage0_t, *pMpi26PCIeSwitchPage0_t;
3736
3737#define MPI26_PCIESWITCH0_PAGEVERSION (0x00)
3738
3739
3740/*PCIe Switch Page 1 */
3741
3742typedef struct _MPI26_CONFIG_PAGE_PSWITCH_1 {
3743 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3744 U8 PhysicalPort; /*0x08 */
3745 U8 Reserved1; /*0x09 */
3746 U16 Reserved2; /*0x0A */
3747 U8 NumPorts; /*0x0C */
3748 U8 PortNum; /*0x0D */
3749 U16 AttachedDevHandle; /*0x0E */
3750 U16 SwitchDevHandle; /*0x10 */
3751 U8 NegotiatedPortWidth; /*0x12 */
3752 U8 NegotiatedLinkRate; /*0x13 */
3753 U32 Reserved4; /*0x14 */
3754 U32 Reserved5; /*0x18 */
3755} MPI26_CONFIG_PAGE_PSWITCH_1, *PTR_MPI26_CONFIG_PAGE_PSWITCH_1,
3756 Mpi26PCIeSwitchPage1_t, *pMpi26PCIeSwitchPage1_t;
3757
3758#define MPI26_PCIESWITCH1_PAGEVERSION (0x00)
3759
3760/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
3761
3762/* defines for the Flags field */
3763#define MPI26_PCIESWITCH1_2_RETIMER_PRESENCE (0x0002)
3764#define MPI26_PCIESWITCH1_RETIMER_PRESENCE (0x0001)
3765
3766/****************************************************************************
3767* PCIe Device Config Pages (MPI v2.6 and later)
3768****************************************************************************/
3769
3770/*PCIe Device Page 0 */
3771
3772typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_0 {
3773 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3774 U16 Slot; /*0x08 */
3775 U16 EnclosureHandle; /*0x0A */
3776 U64 WWID; /*0x0C */
3777 U16 ParentDevHandle; /*0x14 */
3778 U8 PortNum; /*0x16 */
3779 U8 AccessStatus; /*0x17 */
3780 U16 DevHandle; /*0x18 */
3781 U8 PhysicalPort; /*0x1A */
3782 U8 Reserved1; /*0x1B */
3783 U32 DeviceInfo; /*0x1C */
3784 U32 Flags; /*0x20 */
3785 U8 SupportedLinkRates; /*0x24 */
3786 U8 MaxPortWidth; /*0x25 */
3787 U8 NegotiatedPortWidth; /*0x26 */
3788 U8 NegotiatedLinkRate; /*0x27 */
3789 U8 EnclosureLevel; /*0x28 */
3790 U8 Reserved2; /*0x29 */
3791 U16 Reserved3; /*0x2A */
3792 U8 ConnectorName[4]; /*0x2C */
3793 U32 Reserved4; /*0x30 */
3794 U32 Reserved5; /*0x34 */
3795} MPI26_CONFIG_PAGE_PCIEDEV_0, *PTR_MPI26_CONFIG_PAGE_PCIEDEV_0,
3796 Mpi26PCIeDevicePage0_t, *pMpi26PCIeDevicePage0_t;
3797
3798#define MPI26_PCIEDEVICE0_PAGEVERSION (0x01)
3799
3800/*values for PCIe Device Page 0 AccessStatus field */
3801#define MPI26_PCIEDEV0_ASTATUS_NO_ERRORS (0x00)
3802#define MPI26_PCIEDEV0_ASTATUS_NEEDS_INITIALIZATION (0x04)
3803#define MPI26_PCIEDEV0_ASTATUS_CAPABILITY_FAILED (0x02)
3804#define MPI26_PCIEDEV0_ASTATUS_DEVICE_BLOCKED (0x07)
3805#define MPI26_PCIEDEV0_ASTATUS_MEMORY_SPACE_ACCESS_FAILED (0x08)
3806#define MPI26_PCIEDEV0_ASTATUS_UNSUPPORTED_DEVICE (0x09)
3807#define MPI26_PCIEDEV0_ASTATUS_MSIX_REQUIRED (0x0A)
3808#define MPI26_PCIEDEV0_ASTATUS_UNKNOWN (0x10)
3809
3810#define MPI26_PCIEDEV0_ASTATUS_NVME_READY_TIMEOUT (0x30)
3811#define MPI26_PCIEDEV0_ASTATUS_NVME_DEVCFG_UNSUPPORTED (0x31)
3812#define MPI26_PCIEDEV0_ASTATUS_NVME_IDENTIFY_FAILED (0x32)
3813#define MPI26_PCIEDEV0_ASTATUS_NVME_QCONFIG_FAILED (0x33)
3814#define MPI26_PCIEDEV0_ASTATUS_NVME_QCREATION_FAILED (0x34)
3815#define MPI26_PCIEDEV0_ASTATUS_NVME_EVENTCFG_FAILED (0x35)
3816#define MPI26_PCIEDEV0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x36)
3817#define MPI26_PCIEDEV0_ASTATUS_NVME_IDLE_TIMEOUT (0x37)
3818#define MPI26_PCIEDEV0_ASTATUS_NVME_FAILURE_STATUS (0x38)
3819
3820#define MPI26_PCIEDEV0_ASTATUS_INIT_FAIL_MAX (0x3F)
3821
3822/*see mpi2_pci.h for the MPI26_PCIE_DEVINFO_ defines used for the DeviceInfo
3823 *field
3824 */
3825
3826/*values for PCIe Device Page 0 Flags field*/
3827#define MPI26_PCIEDEV0_FLAGS_2_RETIMER_PRESENCE (0x00020000)
3828#define MPI26_PCIEDEV0_FLAGS_RETIMER_PRESENCE (0x00010000)
3829#define MPI26_PCIEDEV0_FLAGS_UNAUTHORIZED_DEVICE (0x00008000)
3830#define MPI26_PCIEDEV0_FLAGS_ENABLED_FAST_PATH (0x00004000)
3831#define MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE (0x00002000)
3832#define MPI26_PCIEDEV0_FLAGS_ASYNCHRONOUS_NOTIFICATION (0x00000400)
3833#define MPI26_PCIEDEV0_FLAGS_ATA_SW_PRESERVATION (0x00000200)
3834#define MPI26_PCIEDEV0_FLAGS_UNSUPPORTED_DEVICE (0x00000100)
3835#define MPI26_PCIEDEV0_FLAGS_ATA_48BIT_LBA_SUPPORTED (0x00000080)
3836#define MPI26_PCIEDEV0_FLAGS_ATA_SMART_SUPPORTED (0x00000040)
3837#define MPI26_PCIEDEV0_FLAGS_ATA_NCQ_SUPPORTED (0x00000020)
3838#define MPI26_PCIEDEV0_FLAGS_ATA_FUA_SUPPORTED (0x00000010)
3839#define MPI26_PCIEDEV0_FLAGS_ENCL_LEVEL_VALID (0x00000002)
3840#define MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT (0x00000001)
3841
3842/* values for PCIe Device Page 0 SupportedLinkRates field */
3843#define MPI26_PCIEDEV0_LINK_RATE_16_0_SUPPORTED (0x08)
3844#define MPI26_PCIEDEV0_LINK_RATE_8_0_SUPPORTED (0x04)
3845#define MPI26_PCIEDEV0_LINK_RATE_5_0_SUPPORTED (0x02)
3846#define MPI26_PCIEDEV0_LINK_RATE_2_5_SUPPORTED (0x01)
3847
3848/*use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
3849
3850
3851/*PCIe Device Page 2 */
3852
3853typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_2 {
3854 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3855 U16 DevHandle; /*0x08 */
3856 U8 ControllerResetTO; /* 0x0A */
3857 U8 Reserved1; /* 0x0B */
3858 U32 MaximumDataTransferSize; /*0x0C */
3859 U32 Capabilities; /*0x10 */
3860 U16 NOIOB; /* 0x14 */
3861 U16 ShutdownLatency; /* 0x16 */
3862 U16 VendorID; /* 0x18 */
3863 U16 DeviceID; /* 0x1A */
3864 U16 SubsystemVendorID; /* 0x1C */
3865 U16 SubsystemID; /* 0x1E */
3866 U8 RevisionID; /* 0x20 */
3867 U8 Reserved21[3]; /* 0x21 */
3868} MPI26_CONFIG_PAGE_PCIEDEV_2, *PTR_MPI26_CONFIG_PAGE_PCIEDEV_2,
3869 Mpi26PCIeDevicePage2_t, *pMpi26PCIeDevicePage2_t;
3870
3871#define MPI26_PCIEDEVICE2_PAGEVERSION (0x01)
3872
3873/*defines for PCIe Device Page 2 Capabilities field */
3874#define MPI26_PCIEDEV2_CAP_DATA_BLK_ALIGN_AND_GRAN (0x00000008)
3875#define MPI26_PCIEDEV2_CAP_SGL_FORMAT (0x00000004)
3876#define MPI26_PCIEDEV2_CAP_BIT_BUCKET_SUPPORT (0x00000002)
3877#define MPI26_PCIEDEV2_CAP_SGL_SUPPORT (0x00000001)
3878
3879/* Defines for the NOIOB field */
3880#define MPI26_PCIEDEV2_NOIOB_UNSUPPORTED (0x0000)
3881
3882/****************************************************************************
3883* PCIe Link Config Pages (MPI v2.6 and later)
3884****************************************************************************/
3885
3886/*PCIe Link Page 1 */
3887
3888typedef struct _MPI26_CONFIG_PAGE_PCIELINK_1 {
3889 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3890 U8 Link; /*0x08 */
3891 U8 Reserved1; /*0x09 */
3892 U16 Reserved2; /*0x0A */
3893 U32 CorrectableErrorCount; /*0x0C */
3894 U16 NonFatalErrorCount; /*0x10 */
3895 U16 Reserved3; /*0x12 */
3896 U16 FatalErrorCount; /*0x14 */
3897 U16 Reserved4; /*0x16 */
3898} MPI26_CONFIG_PAGE_PCIELINK_1, *PTR_MPI26_CONFIG_PAGE_PCIELINK_1,
3899 Mpi26PcieLinkPage1_t, *pMpi26PcieLinkPage1_t;
3900
3901#define MPI26_PCIELINK1_PAGEVERSION (0x00)
3902
3903/*PCIe Link Page 2 */
3904
3905typedef struct _MPI26_PCIELINK2_LINK_EVENT {
3906 U8 LinkEventCode; /*0x00 */
3907 U8 Reserved1; /*0x01 */
3908 U16 Reserved2; /*0x02 */
3909 U32 LinkEventInfo; /*0x04 */
3910} MPI26_PCIELINK2_LINK_EVENT, *PTR_MPI26_PCIELINK2_LINK_EVENT,
3911 Mpi26PcieLink2LinkEvent_t, *pMpi26PcieLink2LinkEvent_t;
3912
3913/*use MPI26_PCIELINK3_EVTCODE_ for the LinkEventCode field */
3914
3915
3916/*
3917 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3918 *for NumLinkEvents at runtime before using LinkEvent[].
3919 */
3920
3921typedef struct _MPI26_CONFIG_PAGE_PCIELINK_2 {
3922 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3923 U8 Link; /*0x08 */
3924 U8 Reserved1; /*0x09 */
3925 U16 Reserved2; /*0x0A */
3926 U8 NumLinkEvents; /*0x0C */
3927 U8 Reserved3; /*0x0D */
3928 U16 Reserved4; /*0x0E */
3929 MPI26_PCIELINK2_LINK_EVENT
3930 LinkEvent[]; /*0x10 */
3931} MPI26_CONFIG_PAGE_PCIELINK_2, *PTR_MPI26_CONFIG_PAGE_PCIELINK_2,
3932 Mpi26PcieLinkPage2_t, *pMpi26PcieLinkPage2_t;
3933
3934#define MPI26_PCIELINK2_PAGEVERSION (0x00)
3935
3936/*PCIe Link Page 3 */
3937
3938typedef struct _MPI26_PCIELINK3_LINK_EVENT_CONFIG {
3939 U8 LinkEventCode; /*0x00 */
3940 U8 Reserved1; /*0x01 */
3941 U16 Reserved2; /*0x02 */
3942 U8 CounterType; /*0x04 */
3943 U8 ThresholdWindow; /*0x05 */
3944 U8 TimeUnits; /*0x06 */
3945 U8 Reserved3; /*0x07 */
3946 U32 EventThreshold; /*0x08 */
3947 U16 ThresholdFlags; /*0x0C */
3948 U16 Reserved4; /*0x0E */
3949} MPI26_PCIELINK3_LINK_EVENT_CONFIG, *PTR_MPI26_PCIELINK3_LINK_EVENT_CONFIG,
3950 Mpi26PcieLink3LinkEventConfig_t, *pMpi26PcieLink3LinkEventConfig_t;
3951
3952/*values for LinkEventCode field */
3953#define MPI26_PCIELINK3_EVTCODE_NO_EVENT (0x00)
3954#define MPI26_PCIELINK3_EVTCODE_CORRECTABLE_ERROR_RECEIVED (0x01)
3955#define MPI26_PCIELINK3_EVTCODE_NON_FATAL_ERROR_RECEIVED (0x02)
3956#define MPI26_PCIELINK3_EVTCODE_FATAL_ERROR_RECEIVED (0x03)
3957#define MPI26_PCIELINK3_EVTCODE_DATA_LINK_ERROR_DETECTED (0x04)
3958#define MPI26_PCIELINK3_EVTCODE_TRANSACTION_LAYER_ERROR_DETECTED (0x05)
3959#define MPI26_PCIELINK3_EVTCODE_TLP_ECRC_ERROR_DETECTED (0x06)
3960#define MPI26_PCIELINK3_EVTCODE_POISONED_TLP (0x07)
3961#define MPI26_PCIELINK3_EVTCODE_RECEIVED_NAK_DLLP (0x08)
3962#define MPI26_PCIELINK3_EVTCODE_SENT_NAK_DLLP (0x09)
3963#define MPI26_PCIELINK3_EVTCODE_LTSSM_RECOVERY_STATE (0x0A)
3964#define MPI26_PCIELINK3_EVTCODE_LTSSM_RXL0S_STATE (0x0B)
3965#define MPI26_PCIELINK3_EVTCODE_LTSSM_TXL0S_STATE (0x0C)
3966#define MPI26_PCIELINK3_EVTCODE_LTSSM_L1_STATE (0x0D)
3967#define MPI26_PCIELINK3_EVTCODE_LTSSM_DISABLED_STATE (0x0E)
3968#define MPI26_PCIELINK3_EVTCODE_LTSSM_HOT_RESET_STATE (0x0F)
3969#define MPI26_PCIELINK3_EVTCODE_SYSTEM_ERROR (0x10)
3970#define MPI26_PCIELINK3_EVTCODE_DECODE_ERROR (0x11)
3971#define MPI26_PCIELINK3_EVTCODE_DISPARITY_ERROR (0x12)
3972
3973/*values for the CounterType field */
3974#define MPI26_PCIELINK3_COUNTER_TYPE_WRAPPING (0x00)
3975#define MPI26_PCIELINK3_COUNTER_TYPE_SATURATING (0x01)
3976#define MPI26_PCIELINK3_COUNTER_TYPE_PEAK_VALUE (0x02)
3977
3978/*values for the TimeUnits field */
3979#define MPI26_PCIELINK3_TM_UNITS_10_MICROSECONDS (0x00)
3980#define MPI26_PCIELINK3_TM_UNITS_100_MICROSECONDS (0x01)
3981#define MPI26_PCIELINK3_TM_UNITS_1_MILLISECOND (0x02)
3982#define MPI26_PCIELINK3_TM_UNITS_10_MILLISECONDS (0x03)
3983
3984/*values for the ThresholdFlags field */
3985#define MPI26_PCIELINK3_TFLAGS_EVENT_NOTIFY (0x0001)
3986
3987/*
3988 *Host code (drivers, BIOS, utilities, etc.) should check the value returned
3989 *for NumLinkEvents at runtime before using LinkEventConfig[].
3990 */
3991
3992typedef struct _MPI26_CONFIG_PAGE_PCIELINK_3 {
3993 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3994 U8 Link; /*0x08 */
3995 U8 Reserved1; /*0x09 */
3996 U16 Reserved2; /*0x0A */
3997 U8 NumLinkEvents; /*0x0C */
3998 U8 Reserved3; /*0x0D */
3999 U16 Reserved4; /*0x0E */
4000 MPI26_PCIELINK3_LINK_EVENT_CONFIG
4001 LinkEventConfig[]; /*0x10 */
4002} MPI26_CONFIG_PAGE_PCIELINK_3, *PTR_MPI26_CONFIG_PAGE_PCIELINK_3,
4003 Mpi26PcieLinkPage3_t, *pMpi26PcieLinkPage3_t;
4004
4005#define MPI26_PCIELINK3_PAGEVERSION (0x00)
4006
4007
4008#endif
1/*
2 * Copyright 2000-2015 Avago Technologies. All rights reserved.
3 *
4 *
5 * Name: mpi2_cnfg.h
6 * Title: MPI Configuration messages and pages
7 * Creation Date: November 10, 2006
8 *
9 * mpi2_cnfg.h Version: 02.00.33
10 *
11 * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
12 * prefix are for use only on MPI v2.5 products, and must not be used
13 * with MPI v2.0 products. Unless otherwise noted, names beginning with
14 * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
15 *
16 * Version History
17 * ---------------
18 *
19 * Date Version Description
20 * -------- -------- ------------------------------------------------------
21 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
22 * 06-04-07 02.00.01 Added defines for SAS IO Unit Page 2 PhyFlags.
23 * Added Manufacturing Page 11.
24 * Added MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE
25 * define.
26 * 06-26-07 02.00.02 Adding generic structure for product-specific
27 * Manufacturing pages: MPI2_CONFIG_PAGE_MANUFACTURING_PS.
28 * Rework of BIOS Page 2 configuration page.
29 * Fixed MPI2_BIOSPAGE2_BOOT_DEVICE to be a union of the
30 * forms.
31 * Added configuration pages IOC Page 8 and Driver
32 * Persistent Mapping Page 0.
33 * 08-31-07 02.00.03 Modified configuration pages dealing with Integrated
34 * RAID (Manufacturing Page 4, RAID Volume Pages 0 and 1,
35 * RAID Physical Disk Pages 0 and 1, RAID Configuration
36 * Page 0).
37 * Added new value for AccessStatus field of SAS Device
38 * Page 0 (_SATA_NEEDS_INITIALIZATION).
39 * 10-31-07 02.00.04 Added missing SEPDevHandle field to
40 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
41 * 12-18-07 02.00.05 Modified IO Unit Page 0 to use 32-bit version fields for
42 * NVDATA.
43 * Modified IOC Page 7 to use masks and added field for
44 * SASBroadcastPrimitiveMasks.
45 * Added MPI2_CONFIG_PAGE_BIOS_4.
46 * Added MPI2_CONFIG_PAGE_LOG_0.
47 * 02-29-08 02.00.06 Modified various names to make them 32-character unique.
48 * Added SAS Device IDs.
49 * Updated Integrated RAID configuration pages including
50 * Manufacturing Page 4, IOC Page 6, and RAID Configuration
51 * Page 0.
52 * 05-21-08 02.00.07 Added define MPI2_MANPAGE4_MIX_SSD_SAS_SATA.
53 * Added define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION.
54 * Fixed define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING.
55 * Added missing MaxNumRoutedSasAddresses field to
56 * MPI2_CONFIG_PAGE_EXPANDER_0.
57 * Added SAS Port Page 0.
58 * Modified structure layout for
59 * MPI2_CONFIG_PAGE_DRIVER_MAPPING_0.
60 * 06-27-08 02.00.08 Changed MPI2_CONFIG_PAGE_RD_PDISK_1 to use
61 * MPI2_RAID_PHYS_DISK1_PATH_MAX to size the array.
62 * 10-02-08 02.00.09 Changed MPI2_RAID_PGAD_CONFIGNUM_MASK from 0x0000FFFF
63 * to 0x000000FF.
64 * Added two new values for the Physical Disk Coercion Size
65 * bits in the Flags field of Manufacturing Page 4.
66 * Added product-specific Manufacturing pages 16 to 31.
67 * Modified Flags bits for controlling write cache on SATA
68 * drives in IO Unit Page 1.
69 * Added new bit to AdditionalControlFlags of SAS IO Unit
70 * Page 1 to control Invalid Topology Correction.
71 * Added additional defines for RAID Volume Page 0
72 * VolumeStatusFlags field.
73 * Modified meaning of RAID Volume Page 0 VolumeSettings
74 * define for auto-configure of hot-swap drives.
75 * Added SupportedPhysDisks field to RAID Volume Page 1 and
76 * added related defines.
77 * Added PhysDiskAttributes field (and related defines) to
78 * RAID Physical Disk Page 0.
79 * Added MPI2_SAS_PHYINFO_PHY_VACANT define.
80 * Added three new DiscoveryStatus bits for SAS IO Unit
81 * Page 0 and SAS Expander Page 0.
82 * Removed multiplexing information from SAS IO Unit pages.
83 * Added BootDeviceWaitTime field to SAS IO Unit Page 4.
84 * Removed Zone Address Resolved bit from PhyInfo and from
85 * Expander Page 0 Flags field.
86 * Added two new AccessStatus values to SAS Device Page 0
87 * for indicating routing problems. Added 3 reserved words
88 * to this page.
89 * 01-19-09 02.00.10 Fixed defines for GPIOVal field of IO Unit Page 3.
90 * Inserted missing reserved field into structure for IOC
91 * Page 6.
92 * Added more pending task bits to RAID Volume Page 0
93 * VolumeStatusFlags defines.
94 * Added MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED define.
95 * Added a new DiscoveryStatus bit for SAS IO Unit Page 0
96 * and SAS Expander Page 0 to flag a downstream initiator
97 * when in simplified routing mode.
98 * Removed SATA Init Failure defines for DiscoveryStatus
99 * fields of SAS IO Unit Page 0 and SAS Expander Page 0.
100 * Added MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED define.
101 * Added PortGroups, DmaGroup, and ControlGroup fields to
102 * SAS Device Page 0.
103 * 05-06-09 02.00.11 Added structures and defines for IO Unit Page 5 and IO
104 * Unit Page 6.
105 * Added expander reduced functionality data to SAS
106 * Expander Page 0.
107 * Added SAS PHY Page 2 and SAS PHY Page 3.
108 * 07-30-09 02.00.12 Added IO Unit Page 7.
109 * Added new device ids.
110 * Added SAS IO Unit Page 5.
111 * Added partial and slumber power management capable flags
112 * to SAS Device Page 0 Flags field.
113 * Added PhyInfo defines for power condition.
114 * Added Ethernet configuration pages.
115 * 10-28-09 02.00.13 Added MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY.
116 * Added SAS PHY Page 4 structure and defines.
117 * 02-10-10 02.00.14 Modified the comments for the configuration page
118 * structures that contain an array of data. The host
119 * should use the "count" field in the page data (e.g. the
120 * NumPhys field) to determine the number of valid elements
121 * in the array.
122 * Added/modified some MPI2_MFGPAGE_DEVID_SAS defines.
123 * Added PowerManagementCapabilities to IO Unit Page 7.
124 * Added PortWidthModGroup field to
125 * MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS.
126 * Added MPI2_CONFIG_PAGE_SASIOUNIT_6 and related defines.
127 * Added MPI2_CONFIG_PAGE_SASIOUNIT_7 and related defines.
128 * Added MPI2_CONFIG_PAGE_SASIOUNIT_8 and related defines.
129 * 05-12-10 02.00.15 Added MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT
130 * define.
131 * Added MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE define.
132 * Added MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY define.
133 * 08-11-10 02.00.16 Removed IO Unit Page 1 device path (multi-pathing)
134 * defines.
135 * 11-10-10 02.00.17 Added ReceptacleID field (replacing Reserved1) to
136 * MPI2_MANPAGE7_CONNECTOR_INFO and reworked defines for
137 * the Pinout field.
138 * Added BoardTemperature and BoardTemperatureUnits fields
139 * to MPI2_CONFIG_PAGE_IO_UNIT_7.
140 * Added MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING define
141 * and MPI2_CONFIG_PAGE_EXT_MAN_PS structure.
142 * 02-23-11 02.00.18 Added ProxyVF_ID field to MPI2_CONFIG_REQUEST.
143 * Added IO Unit Page 8, IO Unit Page 9,
144 * and IO Unit Page 10.
145 * Added SASNotifyPrimitiveMasks field to
146 * MPI2_CONFIG_PAGE_IOC_7.
147 * 03-09-11 02.00.19 Fixed IO Unit Page 10 (to match the spec).
148 * 05-25-11 02.00.20 Cleaned up a few comments.
149 * 08-24-11 02.00.21 Marked the IO Unit Page 7 PowerManagementCapabilities
150 * for PCIe link as obsolete.
151 * Added SpinupFlags field containing a Disable Spin-up bit
152 * to the MPI2_SAS_IOUNIT4_SPINUP_GROUP fields of SAS IO
153 * Unit Page 4.
154 * 11-18-11 02.00.22 Added define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT.
155 * Added UEFIVersion field to BIOS Page 1 and defined new
156 * BiosOptions bits.
157 * Incorporating additions for MPI v2.5.
158 * 11-27-12 02.00.23 Added MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER.
159 * Added MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID.
160 * 12-20-12 02.00.24 Marked MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION as
161 * obsolete for MPI v2.5 and later.
162 * Added some defines for 12G SAS speeds.
163 * 04-09-13 02.00.25 Added MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK.
164 * Fixed MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS to
165 * match the specification.
166 * 08-19-13 02.00.26 Added reserved words to MPI2_CONFIG_PAGE_IO_UNIT_7 for
167 * future use.
168 * 12-05-13 02.00.27 Added MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL for
169 * MPI2_CONFIG_PAGE_MAN_7.
170 * Added EnclosureLevel and ConnectorName fields to
171 * MPI2_CONFIG_PAGE_SAS_DEV_0.
172 * Added MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID for
173 * MPI2_CONFIG_PAGE_SAS_DEV_0.
174 * Added EnclosureLevel field to
175 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
176 * Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
177 * MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
178 * 01-08-14 02.00.28 Added more defines for the BiosOptions field of
179 * MPI2_CONFIG_PAGE_BIOS_1.
180 * 06-13-14 02.00.29 Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
181 * more defines for the BiosOptions field.
182 * 11-18-14 02.00.30 Updated copyright information.
183 * Added MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG.
184 * Added AdapterOrderAux fields to BIOS Page 3.
185 * 03-16-15 02.00.31 Updated for MPI v2.6.
186 * Added new SAS Phy Event codes
187 * 05-25-15 02.00.33 Added more defines for the BiosOptions field of
188 * MPI2_CONFIG_PAGE_BIOS_1.
189 * --------------------------------------------------------------------------
190 */
191
192#ifndef MPI2_CNFG_H
193#define MPI2_CNFG_H
194
195/*****************************************************************************
196* Configuration Page Header and defines
197*****************************************************************************/
198
199/*Config Page Header */
200typedef struct _MPI2_CONFIG_PAGE_HEADER {
201 U8 PageVersion; /*0x00 */
202 U8 PageLength; /*0x01 */
203 U8 PageNumber; /*0x02 */
204 U8 PageType; /*0x03 */
205} MPI2_CONFIG_PAGE_HEADER, *PTR_MPI2_CONFIG_PAGE_HEADER,
206 Mpi2ConfigPageHeader_t, *pMpi2ConfigPageHeader_t;
207
208typedef union _MPI2_CONFIG_PAGE_HEADER_UNION {
209 MPI2_CONFIG_PAGE_HEADER Struct;
210 U8 Bytes[4];
211 U16 Word16[2];
212 U32 Word32;
213} MPI2_CONFIG_PAGE_HEADER_UNION, *PTR_MPI2_CONFIG_PAGE_HEADER_UNION,
214 Mpi2ConfigPageHeaderUnion, *pMpi2ConfigPageHeaderUnion;
215
216/*Extended Config Page Header */
217typedef struct _MPI2_CONFIG_EXTENDED_PAGE_HEADER {
218 U8 PageVersion; /*0x00 */
219 U8 Reserved1; /*0x01 */
220 U8 PageNumber; /*0x02 */
221 U8 PageType; /*0x03 */
222 U16 ExtPageLength; /*0x04 */
223 U8 ExtPageType; /*0x06 */
224 U8 Reserved2; /*0x07 */
225} MPI2_CONFIG_EXTENDED_PAGE_HEADER,
226 *PTR_MPI2_CONFIG_EXTENDED_PAGE_HEADER,
227 Mpi2ConfigExtendedPageHeader_t,
228 *pMpi2ConfigExtendedPageHeader_t;
229
230typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION {
231 MPI2_CONFIG_PAGE_HEADER Struct;
232 MPI2_CONFIG_EXTENDED_PAGE_HEADER Ext;
233 U8 Bytes[8];
234 U16 Word16[4];
235 U32 Word32[2];
236} MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
237 *PTR_MPI2_CONFIG_EXT_PAGE_HEADER_UNION,
238 Mpi2ConfigPageExtendedHeaderUnion,
239 *pMpi2ConfigPageExtendedHeaderUnion;
240
241
242/*PageType field values */
243#define MPI2_CONFIG_PAGEATTR_READ_ONLY (0x00)
244#define MPI2_CONFIG_PAGEATTR_CHANGEABLE (0x10)
245#define MPI2_CONFIG_PAGEATTR_PERSISTENT (0x20)
246#define MPI2_CONFIG_PAGEATTR_MASK (0xF0)
247
248#define MPI2_CONFIG_PAGETYPE_IO_UNIT (0x00)
249#define MPI2_CONFIG_PAGETYPE_IOC (0x01)
250#define MPI2_CONFIG_PAGETYPE_BIOS (0x02)
251#define MPI2_CONFIG_PAGETYPE_RAID_VOLUME (0x08)
252#define MPI2_CONFIG_PAGETYPE_MANUFACTURING (0x09)
253#define MPI2_CONFIG_PAGETYPE_RAID_PHYSDISK (0x0A)
254#define MPI2_CONFIG_PAGETYPE_EXTENDED (0x0F)
255#define MPI2_CONFIG_PAGETYPE_MASK (0x0F)
256
257#define MPI2_CONFIG_TYPENUM_MASK (0x0FFF)
258
259
260/*ExtPageType field values */
261#define MPI2_CONFIG_EXTPAGETYPE_SAS_IO_UNIT (0x10)
262#define MPI2_CONFIG_EXTPAGETYPE_SAS_EXPANDER (0x11)
263#define MPI2_CONFIG_EXTPAGETYPE_SAS_DEVICE (0x12)
264#define MPI2_CONFIG_EXTPAGETYPE_SAS_PHY (0x13)
265#define MPI2_CONFIG_EXTPAGETYPE_LOG (0x14)
266#define MPI2_CONFIG_EXTPAGETYPE_ENCLOSURE (0x15)
267#define MPI2_CONFIG_EXTPAGETYPE_RAID_CONFIG (0x16)
268#define MPI2_CONFIG_EXTPAGETYPE_DRIVER_MAPPING (0x17)
269#define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT (0x18)
270#define MPI2_CONFIG_EXTPAGETYPE_ETHERNET (0x19)
271#define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING (0x1A)
272
273
274/*****************************************************************************
275* PageAddress defines
276*****************************************************************************/
277
278/*RAID Volume PageAddress format */
279#define MPI2_RAID_VOLUME_PGAD_FORM_MASK (0xF0000000)
280#define MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
281#define MPI2_RAID_VOLUME_PGAD_FORM_HANDLE (0x10000000)
282
283#define MPI2_RAID_VOLUME_PGAD_HANDLE_MASK (0x0000FFFF)
284
285
286/*RAID Physical Disk PageAddress format */
287#define MPI2_PHYSDISK_PGAD_FORM_MASK (0xF0000000)
288#define MPI2_PHYSDISK_PGAD_FORM_GET_NEXT_PHYSDISKNUM (0x00000000)
289#define MPI2_PHYSDISK_PGAD_FORM_PHYSDISKNUM (0x10000000)
290#define MPI2_PHYSDISK_PGAD_FORM_DEVHANDLE (0x20000000)
291
292#define MPI2_PHYSDISK_PGAD_PHYSDISKNUM_MASK (0x000000FF)
293#define MPI2_PHYSDISK_PGAD_DEVHANDLE_MASK (0x0000FFFF)
294
295
296/*SAS Expander PageAddress format */
297#define MPI2_SAS_EXPAND_PGAD_FORM_MASK (0xF0000000)
298#define MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL (0x00000000)
299#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL_PHY_NUM (0x10000000)
300#define MPI2_SAS_EXPAND_PGAD_FORM_HNDL (0x20000000)
301
302#define MPI2_SAS_EXPAND_PGAD_HANDLE_MASK (0x0000FFFF)
303#define MPI2_SAS_EXPAND_PGAD_PHYNUM_MASK (0x00FF0000)
304#define MPI2_SAS_EXPAND_PGAD_PHYNUM_SHIFT (16)
305
306
307/*SAS Device PageAddress format */
308#define MPI2_SAS_DEVICE_PGAD_FORM_MASK (0xF0000000)
309#define MPI2_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
310#define MPI2_SAS_DEVICE_PGAD_FORM_HANDLE (0x20000000)
311
312#define MPI2_SAS_DEVICE_PGAD_HANDLE_MASK (0x0000FFFF)
313
314
315/*SAS PHY PageAddress format */
316#define MPI2_SAS_PHY_PGAD_FORM_MASK (0xF0000000)
317#define MPI2_SAS_PHY_PGAD_FORM_PHY_NUMBER (0x00000000)
318#define MPI2_SAS_PHY_PGAD_FORM_PHY_TBL_INDEX (0x10000000)
319
320#define MPI2_SAS_PHY_PGAD_PHY_NUMBER_MASK (0x000000FF)
321#define MPI2_SAS_PHY_PGAD_PHY_TBL_INDEX_MASK (0x0000FFFF)
322
323
324/*SAS Port PageAddress format */
325#define MPI2_SASPORT_PGAD_FORM_MASK (0xF0000000)
326#define MPI2_SASPORT_PGAD_FORM_GET_NEXT_PORT (0x00000000)
327#define MPI2_SASPORT_PGAD_FORM_PORT_NUM (0x10000000)
328
329#define MPI2_SASPORT_PGAD_PORTNUMBER_MASK (0x00000FFF)
330
331
332/*SAS Enclosure PageAddress format */
333#define MPI2_SAS_ENCLOS_PGAD_FORM_MASK (0xF0000000)
334#define MPI2_SAS_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
335#define MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE (0x10000000)
336
337#define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF)
338
339
340/*RAID Configuration PageAddress format */
341#define MPI2_RAID_PGAD_FORM_MASK (0xF0000000)
342#define MPI2_RAID_PGAD_FORM_GET_NEXT_CONFIGNUM (0x00000000)
343#define MPI2_RAID_PGAD_FORM_CONFIGNUM (0x10000000)
344#define MPI2_RAID_PGAD_FORM_ACTIVE_CONFIG (0x20000000)
345
346#define MPI2_RAID_PGAD_CONFIGNUM_MASK (0x000000FF)
347
348
349/*Driver Persistent Mapping PageAddress format */
350#define MPI2_DPM_PGAD_FORM_MASK (0xF0000000)
351#define MPI2_DPM_PGAD_FORM_ENTRY_RANGE (0x00000000)
352
353#define MPI2_DPM_PGAD_ENTRY_COUNT_MASK (0x0FFF0000)
354#define MPI2_DPM_PGAD_ENTRY_COUNT_SHIFT (16)
355#define MPI2_DPM_PGAD_START_ENTRY_MASK (0x0000FFFF)
356
357
358/*Ethernet PageAddress format */
359#define MPI2_ETHERNET_PGAD_FORM_MASK (0xF0000000)
360#define MPI2_ETHERNET_PGAD_FORM_IF_NUM (0x00000000)
361
362#define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK (0x000000FF)
363
364
365/****************************************************************************
366* Configuration messages
367****************************************************************************/
368
369/*Configuration Request Message */
370typedef struct _MPI2_CONFIG_REQUEST {
371 U8 Action; /*0x00 */
372 U8 SGLFlags; /*0x01 */
373 U8 ChainOffset; /*0x02 */
374 U8 Function; /*0x03 */
375 U16 ExtPageLength; /*0x04 */
376 U8 ExtPageType; /*0x06 */
377 U8 MsgFlags; /*0x07 */
378 U8 VP_ID; /*0x08 */
379 U8 VF_ID; /*0x09 */
380 U16 Reserved1; /*0x0A */
381 U8 Reserved2; /*0x0C */
382 U8 ProxyVF_ID; /*0x0D */
383 U16 Reserved4; /*0x0E */
384 U32 Reserved3; /*0x10 */
385 MPI2_CONFIG_PAGE_HEADER Header; /*0x14 */
386 U32 PageAddress; /*0x18 */
387 MPI2_SGE_IO_UNION PageBufferSGE; /*0x1C */
388} MPI2_CONFIG_REQUEST, *PTR_MPI2_CONFIG_REQUEST,
389 Mpi2ConfigRequest_t, *pMpi2ConfigRequest_t;
390
391/*values for the Action field */
392#define MPI2_CONFIG_ACTION_PAGE_HEADER (0x00)
393#define MPI2_CONFIG_ACTION_PAGE_READ_CURRENT (0x01)
394#define MPI2_CONFIG_ACTION_PAGE_WRITE_CURRENT (0x02)
395#define MPI2_CONFIG_ACTION_PAGE_DEFAULT (0x03)
396#define MPI2_CONFIG_ACTION_PAGE_WRITE_NVRAM (0x04)
397#define MPI2_CONFIG_ACTION_PAGE_READ_DEFAULT (0x05)
398#define MPI2_CONFIG_ACTION_PAGE_READ_NVRAM (0x06)
399#define MPI2_CONFIG_ACTION_PAGE_GET_CHANGEABLE (0x07)
400
401/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
402
403
404/*Config Reply Message */
405typedef struct _MPI2_CONFIG_REPLY {
406 U8 Action; /*0x00 */
407 U8 SGLFlags; /*0x01 */
408 U8 MsgLength; /*0x02 */
409 U8 Function; /*0x03 */
410 U16 ExtPageLength; /*0x04 */
411 U8 ExtPageType; /*0x06 */
412 U8 MsgFlags; /*0x07 */
413 U8 VP_ID; /*0x08 */
414 U8 VF_ID; /*0x09 */
415 U16 Reserved1; /*0x0A */
416 U16 Reserved2; /*0x0C */
417 U16 IOCStatus; /*0x0E */
418 U32 IOCLogInfo; /*0x10 */
419 MPI2_CONFIG_PAGE_HEADER Header; /*0x14 */
420} MPI2_CONFIG_REPLY, *PTR_MPI2_CONFIG_REPLY,
421 Mpi2ConfigReply_t, *pMpi2ConfigReply_t;
422
423
424
425/*****************************************************************************
426*
427* C o n f i g u r a t i o n P a g e s
428*
429*****************************************************************************/
430
431/****************************************************************************
432* Manufacturing Config pages
433****************************************************************************/
434
435#define MPI2_MFGPAGE_VENDORID_LSI (0x1000)
436
437/*MPI v2.0 SAS products */
438#define MPI2_MFGPAGE_DEVID_SAS2004 (0x0070)
439#define MPI2_MFGPAGE_DEVID_SAS2008 (0x0072)
440#define MPI2_MFGPAGE_DEVID_SAS2108_1 (0x0074)
441#define MPI2_MFGPAGE_DEVID_SAS2108_2 (0x0076)
442#define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077)
443#define MPI2_MFGPAGE_DEVID_SAS2116_1 (0x0064)
444#define MPI2_MFGPAGE_DEVID_SAS2116_2 (0x0065)
445
446#define MPI2_MFGPAGE_DEVID_SSS6200 (0x007E)
447
448#define MPI2_MFGPAGE_DEVID_SAS2208_1 (0x0080)
449#define MPI2_MFGPAGE_DEVID_SAS2208_2 (0x0081)
450#define MPI2_MFGPAGE_DEVID_SAS2208_3 (0x0082)
451#define MPI2_MFGPAGE_DEVID_SAS2208_4 (0x0083)
452#define MPI2_MFGPAGE_DEVID_SAS2208_5 (0x0084)
453#define MPI2_MFGPAGE_DEVID_SAS2208_6 (0x0085)
454#define MPI2_MFGPAGE_DEVID_SAS2308_1 (0x0086)
455#define MPI2_MFGPAGE_DEVID_SAS2308_2 (0x0087)
456#define MPI2_MFGPAGE_DEVID_SAS2308_3 (0x006E)
457
458/*MPI v2.5 SAS products */
459#define MPI25_MFGPAGE_DEVID_SAS3004 (0x0096)
460#define MPI25_MFGPAGE_DEVID_SAS3008 (0x0097)
461#define MPI25_MFGPAGE_DEVID_SAS3108_1 (0x0090)
462#define MPI25_MFGPAGE_DEVID_SAS3108_2 (0x0091)
463#define MPI25_MFGPAGE_DEVID_SAS3108_5 (0x0094)
464#define MPI25_MFGPAGE_DEVID_SAS3108_6 (0x0095)
465
466/* MPI v2.6 SAS Products */
467#define MPI26_MFGPAGE_DEVID_SAS3216 (0x00C9)
468#define MPI26_MFGPAGE_DEVID_SAS3224 (0x00C4)
469#define MPI26_MFGPAGE_DEVID_SAS3316_1 (0x00C5)
470#define MPI26_MFGPAGE_DEVID_SAS3316_2 (0x00C6)
471#define MPI26_MFGPAGE_DEVID_SAS3316_3 (0x00C7)
472#define MPI26_MFGPAGE_DEVID_SAS3316_4 (0x00C8)
473#define MPI26_MFGPAGE_DEVID_SAS3324_1 (0x00C0)
474#define MPI26_MFGPAGE_DEVID_SAS3324_2 (0x00C1)
475#define MPI26_MFGPAGE_DEVID_SAS3324_3 (0x00C2)
476#define MPI26_MFGPAGE_DEVID_SAS3324_4 (0x00C3)
477
478/*Manufacturing Page 0 */
479
480typedef struct _MPI2_CONFIG_PAGE_MAN_0 {
481 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
482 U8 ChipName[16]; /*0x04 */
483 U8 ChipRevision[8]; /*0x14 */
484 U8 BoardName[16]; /*0x1C */
485 U8 BoardAssembly[16]; /*0x2C */
486 U8 BoardTracerNumber[16]; /*0x3C */
487} MPI2_CONFIG_PAGE_MAN_0,
488 *PTR_MPI2_CONFIG_PAGE_MAN_0,
489 Mpi2ManufacturingPage0_t,
490 *pMpi2ManufacturingPage0_t;
491
492#define MPI2_MANUFACTURING0_PAGEVERSION (0x00)
493
494
495/*Manufacturing Page 1 */
496
497typedef struct _MPI2_CONFIG_PAGE_MAN_1 {
498 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
499 U8 VPD[256]; /*0x04 */
500} MPI2_CONFIG_PAGE_MAN_1,
501 *PTR_MPI2_CONFIG_PAGE_MAN_1,
502 Mpi2ManufacturingPage1_t,
503 *pMpi2ManufacturingPage1_t;
504
505#define MPI2_MANUFACTURING1_PAGEVERSION (0x00)
506
507
508typedef struct _MPI2_CHIP_REVISION_ID {
509 U16 DeviceID; /*0x00 */
510 U8 PCIRevisionID; /*0x02 */
511 U8 Reserved; /*0x03 */
512} MPI2_CHIP_REVISION_ID, *PTR_MPI2_CHIP_REVISION_ID,
513 Mpi2ChipRevisionId_t, *pMpi2ChipRevisionId_t;
514
515
516/*Manufacturing Page 2 */
517
518/*
519 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
520 *one and check Header.PageLength at runtime.
521 */
522#ifndef MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS
523#define MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS (1)
524#endif
525
526typedef struct _MPI2_CONFIG_PAGE_MAN_2 {
527 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
528 MPI2_CHIP_REVISION_ID ChipId; /*0x04 */
529 U32
530 HwSettings[MPI2_MAN_PAGE_2_HW_SETTINGS_WORDS];/*0x08 */
531} MPI2_CONFIG_PAGE_MAN_2,
532 *PTR_MPI2_CONFIG_PAGE_MAN_2,
533 Mpi2ManufacturingPage2_t,
534 *pMpi2ManufacturingPage2_t;
535
536#define MPI2_MANUFACTURING2_PAGEVERSION (0x00)
537
538
539/*Manufacturing Page 3 */
540
541/*
542 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
543 *one and check Header.PageLength at runtime.
544 */
545#ifndef MPI2_MAN_PAGE_3_INFO_WORDS
546#define MPI2_MAN_PAGE_3_INFO_WORDS (1)
547#endif
548
549typedef struct _MPI2_CONFIG_PAGE_MAN_3 {
550 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
551 MPI2_CHIP_REVISION_ID ChipId; /*0x04 */
552 U32
553 Info[MPI2_MAN_PAGE_3_INFO_WORDS];/*0x08 */
554} MPI2_CONFIG_PAGE_MAN_3,
555 *PTR_MPI2_CONFIG_PAGE_MAN_3,
556 Mpi2ManufacturingPage3_t,
557 *pMpi2ManufacturingPage3_t;
558
559#define MPI2_MANUFACTURING3_PAGEVERSION (0x00)
560
561
562/*Manufacturing Page 4 */
563
564typedef struct _MPI2_MANPAGE4_PWR_SAVE_SETTINGS {
565 U8 PowerSaveFlags; /*0x00 */
566 U8 InternalOperationsSleepTime; /*0x01 */
567 U8 InternalOperationsRunTime; /*0x02 */
568 U8 HostIdleTime; /*0x03 */
569} MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
570 *PTR_MPI2_MANPAGE4_PWR_SAVE_SETTINGS,
571 Mpi2ManPage4PwrSaveSettings_t,
572 *pMpi2ManPage4PwrSaveSettings_t;
573
574/*defines for the PowerSaveFlags field */
575#define MPI2_MANPAGE4_MASK_POWERSAVE_MODE (0x03)
576#define MPI2_MANPAGE4_POWERSAVE_MODE_DISABLED (0x00)
577#define MPI2_MANPAGE4_CUSTOM_POWERSAVE_MODE (0x01)
578#define MPI2_MANPAGE4_FULL_POWERSAVE_MODE (0x02)
579
580typedef struct _MPI2_CONFIG_PAGE_MAN_4 {
581 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
582 U32 Reserved1; /*0x04 */
583 U32 Flags; /*0x08 */
584 U8 InquirySize; /*0x0C */
585 U8 Reserved2; /*0x0D */
586 U16 Reserved3; /*0x0E */
587 U8 InquiryData[56]; /*0x10 */
588 U32 RAID0VolumeSettings; /*0x48 */
589 U32 RAID1EVolumeSettings; /*0x4C */
590 U32 RAID1VolumeSettings; /*0x50 */
591 U32 RAID10VolumeSettings; /*0x54 */
592 U32 Reserved4; /*0x58 */
593 U32 Reserved5; /*0x5C */
594 MPI2_MANPAGE4_PWR_SAVE_SETTINGS PowerSaveSettings; /*0x60 */
595 U8 MaxOCEDisks; /*0x64 */
596 U8 ResyncRate; /*0x65 */
597 U16 DataScrubDuration; /*0x66 */
598 U8 MaxHotSpares; /*0x68 */
599 U8 MaxPhysDisksPerVol; /*0x69 */
600 U8 MaxPhysDisks; /*0x6A */
601 U8 MaxVolumes; /*0x6B */
602} MPI2_CONFIG_PAGE_MAN_4,
603 *PTR_MPI2_CONFIG_PAGE_MAN_4,
604 Mpi2ManufacturingPage4_t,
605 *pMpi2ManufacturingPage4_t;
606
607#define MPI2_MANUFACTURING4_PAGEVERSION (0x0A)
608
609/*Manufacturing Page 4 Flags field */
610#define MPI2_MANPAGE4_METADATA_SIZE_MASK (0x00030000)
611#define MPI2_MANPAGE4_METADATA_512MB (0x00000000)
612
613#define MPI2_MANPAGE4_MIX_SSD_SAS_SATA (0x00008000)
614#define MPI2_MANPAGE4_MIX_SSD_AND_NON_SSD (0x00004000)
615#define MPI2_MANPAGE4_HIDE_PHYSDISK_NON_IR (0x00002000)
616
617#define MPI2_MANPAGE4_MASK_PHYSDISK_COERCION (0x00001C00)
618#define MPI2_MANPAGE4_PHYSDISK_COERCION_1GB (0x00000000)
619#define MPI2_MANPAGE4_PHYSDISK_128MB_COERCION (0x00000400)
620#define MPI2_MANPAGE4_PHYSDISK_ADAPTIVE_COERCION (0x00000800)
621#define MPI2_MANPAGE4_PHYSDISK_ZERO_COERCION (0x00000C00)
622
623#define MPI2_MANPAGE4_MASK_BAD_BLOCK_MARKING (0x00000300)
624#define MPI2_MANPAGE4_DEFAULT_BAD_BLOCK_MARKING (0x00000000)
625#define MPI2_MANPAGE4_TABLE_BAD_BLOCK_MARKING (0x00000100)
626#define MPI2_MANPAGE4_WRITE_LONG_BAD_BLOCK_MARKING (0x00000200)
627
628#define MPI2_MANPAGE4_FORCE_OFFLINE_FAILOVER (0x00000080)
629#define MPI2_MANPAGE4_RAID10_DISABLE (0x00000040)
630#define MPI2_MANPAGE4_RAID1E_DISABLE (0x00000020)
631#define MPI2_MANPAGE4_RAID1_DISABLE (0x00000010)
632#define MPI2_MANPAGE4_RAID0_DISABLE (0x00000008)
633#define MPI2_MANPAGE4_IR_MODEPAGE8_DISABLE (0x00000004)
634#define MPI2_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x00000002)
635#define MPI2_MANPAGE4_IR_NO_MIX_SAS_SATA (0x00000001)
636
637
638/*Manufacturing Page 5 */
639
640/*
641 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
642 *one and check the value returned for NumPhys at runtime.
643 */
644#ifndef MPI2_MAN_PAGE_5_PHY_ENTRIES
645#define MPI2_MAN_PAGE_5_PHY_ENTRIES (1)
646#endif
647
648typedef struct _MPI2_MANUFACTURING5_ENTRY {
649 U64 WWID; /*0x00 */
650 U64 DeviceName; /*0x08 */
651} MPI2_MANUFACTURING5_ENTRY,
652 *PTR_MPI2_MANUFACTURING5_ENTRY,
653 Mpi2Manufacturing5Entry_t,
654 *pMpi2Manufacturing5Entry_t;
655
656typedef struct _MPI2_CONFIG_PAGE_MAN_5 {
657 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
658 U8 NumPhys; /*0x04 */
659 U8 Reserved1; /*0x05 */
660 U16 Reserved2; /*0x06 */
661 U32 Reserved3; /*0x08 */
662 U32 Reserved4; /*0x0C */
663 MPI2_MANUFACTURING5_ENTRY
664 Phy[MPI2_MAN_PAGE_5_PHY_ENTRIES];/*0x08 */
665} MPI2_CONFIG_PAGE_MAN_5,
666 *PTR_MPI2_CONFIG_PAGE_MAN_5,
667 Mpi2ManufacturingPage5_t,
668 *pMpi2ManufacturingPage5_t;
669
670#define MPI2_MANUFACTURING5_PAGEVERSION (0x03)
671
672
673/*Manufacturing Page 6 */
674
675typedef struct _MPI2_CONFIG_PAGE_MAN_6 {
676 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
677 U32 ProductSpecificInfo;/*0x04 */
678} MPI2_CONFIG_PAGE_MAN_6,
679 *PTR_MPI2_CONFIG_PAGE_MAN_6,
680 Mpi2ManufacturingPage6_t,
681 *pMpi2ManufacturingPage6_t;
682
683#define MPI2_MANUFACTURING6_PAGEVERSION (0x00)
684
685
686/*Manufacturing Page 7 */
687
688typedef struct _MPI2_MANPAGE7_CONNECTOR_INFO {
689 U32 Pinout; /*0x00 */
690 U8 Connector[16]; /*0x04 */
691 U8 Location; /*0x14 */
692 U8 ReceptacleID; /*0x15 */
693 U16 Slot; /*0x16 */
694 U32 Reserved2; /*0x18 */
695} MPI2_MANPAGE7_CONNECTOR_INFO,
696 *PTR_MPI2_MANPAGE7_CONNECTOR_INFO,
697 Mpi2ManPage7ConnectorInfo_t,
698 *pMpi2ManPage7ConnectorInfo_t;
699
700/*defines for the Pinout field */
701#define MPI2_MANPAGE7_PINOUT_LANE_MASK (0x0000FF00)
702#define MPI2_MANPAGE7_PINOUT_LANE_SHIFT (8)
703
704#define MPI2_MANPAGE7_PINOUT_TYPE_MASK (0x000000FF)
705#define MPI2_MANPAGE7_PINOUT_TYPE_UNKNOWN (0x00)
706#define MPI2_MANPAGE7_PINOUT_SATA_SINGLE (0x01)
707#define MPI2_MANPAGE7_PINOUT_SFF_8482 (0x02)
708#define MPI2_MANPAGE7_PINOUT_SFF_8486 (0x03)
709#define MPI2_MANPAGE7_PINOUT_SFF_8484 (0x04)
710#define MPI2_MANPAGE7_PINOUT_SFF_8087 (0x05)
711#define MPI2_MANPAGE7_PINOUT_SFF_8643_4I (0x06)
712#define MPI2_MANPAGE7_PINOUT_SFF_8643_8I (0x07)
713#define MPI2_MANPAGE7_PINOUT_SFF_8470 (0x08)
714#define MPI2_MANPAGE7_PINOUT_SFF_8088 (0x09)
715#define MPI2_MANPAGE7_PINOUT_SFF_8644_4X (0x0A)
716#define MPI2_MANPAGE7_PINOUT_SFF_8644_8X (0x0B)
717#define MPI2_MANPAGE7_PINOUT_SFF_8644_16X (0x0C)
718#define MPI2_MANPAGE7_PINOUT_SFF_8436 (0x0D)
719
720/*defines for the Location field */
721#define MPI2_MANPAGE7_LOCATION_UNKNOWN (0x01)
722#define MPI2_MANPAGE7_LOCATION_INTERNAL (0x02)
723#define MPI2_MANPAGE7_LOCATION_EXTERNAL (0x04)
724#define MPI2_MANPAGE7_LOCATION_SWITCHABLE (0x08)
725#define MPI2_MANPAGE7_LOCATION_AUTO (0x10)
726#define MPI2_MANPAGE7_LOCATION_NOT_PRESENT (0x20)
727#define MPI2_MANPAGE7_LOCATION_NOT_CONNECTED (0x80)
728
729/*
730 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
731 *one and check the value returned for NumPhys at runtime.
732 */
733#ifndef MPI2_MANPAGE7_CONNECTOR_INFO_MAX
734#define MPI2_MANPAGE7_CONNECTOR_INFO_MAX (1)
735#endif
736
737typedef struct _MPI2_CONFIG_PAGE_MAN_7 {
738 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
739 U32 Reserved1; /*0x04 */
740 U32 Reserved2; /*0x08 */
741 U32 Flags; /*0x0C */
742 U8 EnclosureName[16]; /*0x10 */
743 U8 NumPhys; /*0x20 */
744 U8 Reserved3; /*0x21 */
745 U16 Reserved4; /*0x22 */
746 MPI2_MANPAGE7_CONNECTOR_INFO
747 ConnectorInfo[MPI2_MANPAGE7_CONNECTOR_INFO_MAX]; /*0x24 */
748} MPI2_CONFIG_PAGE_MAN_7,
749 *PTR_MPI2_CONFIG_PAGE_MAN_7,
750 Mpi2ManufacturingPage7_t,
751 *pMpi2ManufacturingPage7_t;
752
753#define MPI2_MANUFACTURING7_PAGEVERSION (0x01)
754
755/*defines for the Flags field */
756#define MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL (0x00000008)
757#define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER (0x00000002)
758#define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001)
759
760
761/*
762 *Generic structure to use for product-specific manufacturing pages
763 *(currently Manufacturing Page 8 through Manufacturing Page 31).
764 */
765
766typedef struct _MPI2_CONFIG_PAGE_MAN_PS {
767 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
768 U32 ProductSpecificInfo;/*0x04 */
769} MPI2_CONFIG_PAGE_MAN_PS,
770 *PTR_MPI2_CONFIG_PAGE_MAN_PS,
771 Mpi2ManufacturingPagePS_t,
772 *pMpi2ManufacturingPagePS_t;
773
774#define MPI2_MANUFACTURING8_PAGEVERSION (0x00)
775#define MPI2_MANUFACTURING9_PAGEVERSION (0x00)
776#define MPI2_MANUFACTURING10_PAGEVERSION (0x00)
777#define MPI2_MANUFACTURING11_PAGEVERSION (0x00)
778#define MPI2_MANUFACTURING12_PAGEVERSION (0x00)
779#define MPI2_MANUFACTURING13_PAGEVERSION (0x00)
780#define MPI2_MANUFACTURING14_PAGEVERSION (0x00)
781#define MPI2_MANUFACTURING15_PAGEVERSION (0x00)
782#define MPI2_MANUFACTURING16_PAGEVERSION (0x00)
783#define MPI2_MANUFACTURING17_PAGEVERSION (0x00)
784#define MPI2_MANUFACTURING18_PAGEVERSION (0x00)
785#define MPI2_MANUFACTURING19_PAGEVERSION (0x00)
786#define MPI2_MANUFACTURING20_PAGEVERSION (0x00)
787#define MPI2_MANUFACTURING21_PAGEVERSION (0x00)
788#define MPI2_MANUFACTURING22_PAGEVERSION (0x00)
789#define MPI2_MANUFACTURING23_PAGEVERSION (0x00)
790#define MPI2_MANUFACTURING24_PAGEVERSION (0x00)
791#define MPI2_MANUFACTURING25_PAGEVERSION (0x00)
792#define MPI2_MANUFACTURING26_PAGEVERSION (0x00)
793#define MPI2_MANUFACTURING27_PAGEVERSION (0x00)
794#define MPI2_MANUFACTURING28_PAGEVERSION (0x00)
795#define MPI2_MANUFACTURING29_PAGEVERSION (0x00)
796#define MPI2_MANUFACTURING30_PAGEVERSION (0x00)
797#define MPI2_MANUFACTURING31_PAGEVERSION (0x00)
798
799
800/****************************************************************************
801* IO Unit Config Pages
802****************************************************************************/
803
804/*IO Unit Page 0 */
805
806typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_0 {
807 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
808 U64 UniqueValue; /*0x04 */
809 MPI2_VERSION_UNION NvdataVersionDefault; /*0x08 */
810 MPI2_VERSION_UNION NvdataVersionPersistent; /*0x0A */
811} MPI2_CONFIG_PAGE_IO_UNIT_0,
812 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_0,
813 Mpi2IOUnitPage0_t, *pMpi2IOUnitPage0_t;
814
815#define MPI2_IOUNITPAGE0_PAGEVERSION (0x02)
816
817
818/*IO Unit Page 1 */
819
820typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_1 {
821 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
822 U32 Flags; /*0x04 */
823} MPI2_CONFIG_PAGE_IO_UNIT_1,
824 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_1,
825 Mpi2IOUnitPage1_t, *pMpi2IOUnitPage1_t;
826
827#define MPI2_IOUNITPAGE1_PAGEVERSION (0x04)
828
829/*IO Unit Page 1 Flags defines */
830#define MPI2_IOUNITPAGE1_ATA_SECURITY_FREEZE_LOCK (0x00004000)
831#define MPI25_IOUNITPAGE1_NEW_DEVICE_FAST_PATH_DISABLE (0x00002000)
832#define MPI25_IOUNITPAGE1_DISABLE_FAST_PATH (0x00001000)
833#define MPI2_IOUNITPAGE1_ENABLE_HOST_BASED_DISCOVERY (0x00000800)
834#define MPI2_IOUNITPAGE1_MASK_SATA_WRITE_CACHE (0x00000600)
835#define MPI2_IOUNITPAGE1_SATA_WRITE_CACHE_SHIFT (9)
836#define MPI2_IOUNITPAGE1_ENABLE_SATA_WRITE_CACHE (0x00000000)
837#define MPI2_IOUNITPAGE1_DISABLE_SATA_WRITE_CACHE (0x00000200)
838#define MPI2_IOUNITPAGE1_UNCHANGED_SATA_WRITE_CACHE (0x00000400)
839#define MPI2_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE (0x00000100)
840#define MPI2_IOUNITPAGE1_DISABLE_IR (0x00000040)
841#define MPI2_IOUNITPAGE1_DISABLE_TASK_SET_FULL_HANDLING (0x00000020)
842#define MPI2_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID (0x00000004)
843
844
845/*IO Unit Page 3 */
846
847/*
848 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
849 *one and check the value returned for GPIOCount at runtime.
850 */
851#ifndef MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX
852#define MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX (1)
853#endif
854
855typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_3 {
856 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
857 U8 GPIOCount; /*0x04 */
858 U8 Reserved1; /*0x05 */
859 U16 Reserved2; /*0x06 */
860 U16
861 GPIOVal[MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX];/*0x08 */
862} MPI2_CONFIG_PAGE_IO_UNIT_3,
863 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_3,
864 Mpi2IOUnitPage3_t, *pMpi2IOUnitPage3_t;
865
866#define MPI2_IOUNITPAGE3_PAGEVERSION (0x01)
867
868/*defines for IO Unit Page 3 GPIOVal field */
869#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_MASK (0xFFFC)
870#define MPI2_IOUNITPAGE3_GPIO_FUNCTION_SHIFT (2)
871#define MPI2_IOUNITPAGE3_GPIO_SETTING_OFF (0x0000)
872#define MPI2_IOUNITPAGE3_GPIO_SETTING_ON (0x0001)
873
874
875/*IO Unit Page 5 */
876
877/*
878 *Upper layer code (drivers, utilities, etc.) should leave this define set to
879 *one and check the value returned for NumDmaEngines at runtime.
880 */
881#ifndef MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES
882#define MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES (1)
883#endif
884
885typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_5 {
886 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
887 U64
888 RaidAcceleratorBufferBaseAddress; /*0x04 */
889 U64
890 RaidAcceleratorBufferSize; /*0x0C */
891 U64
892 RaidAcceleratorControlBaseAddress; /*0x14 */
893 U8 RAControlSize; /*0x1C */
894 U8 NumDmaEngines; /*0x1D */
895 U8 RAMinControlSize; /*0x1E */
896 U8 RAMaxControlSize; /*0x1F */
897 U32 Reserved1; /*0x20 */
898 U32 Reserved2; /*0x24 */
899 U32 Reserved3; /*0x28 */
900 U32
901 DmaEngineCapabilities[MPI2_IOUNITPAGE5_DMAENGINE_ENTRIES]; /*0x2C */
902} MPI2_CONFIG_PAGE_IO_UNIT_5,
903 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_5,
904 Mpi2IOUnitPage5_t, *pMpi2IOUnitPage5_t;
905
906#define MPI2_IOUNITPAGE5_PAGEVERSION (0x00)
907
908/*defines for IO Unit Page 5 DmaEngineCapabilities field */
909#define MPI2_IOUNITPAGE5_DMA_CAP_MASK_MAX_REQUESTS (0xFFFF0000)
910#define MPI2_IOUNITPAGE5_DMA_CAP_SHIFT_MAX_REQUESTS (16)
911
912#define MPI2_IOUNITPAGE5_DMA_CAP_EEDP (0x0008)
913#define MPI2_IOUNITPAGE5_DMA_CAP_PARITY_GENERATION (0x0004)
914#define MPI2_IOUNITPAGE5_DMA_CAP_HASHING (0x0002)
915#define MPI2_IOUNITPAGE5_DMA_CAP_ENCRYPTION (0x0001)
916
917
918/*IO Unit Page 6 */
919
920typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_6 {
921 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
922 U16 Flags; /*0x04 */
923 U8 RAHostControlSize; /*0x06 */
924 U8 Reserved0; /*0x07 */
925 U64
926 RaidAcceleratorHostControlBaseAddress; /*0x08 */
927 U32 Reserved1; /*0x10 */
928 U32 Reserved2; /*0x14 */
929 U32 Reserved3; /*0x18 */
930} MPI2_CONFIG_PAGE_IO_UNIT_6,
931 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_6,
932 Mpi2IOUnitPage6_t, *pMpi2IOUnitPage6_t;
933
934#define MPI2_IOUNITPAGE6_PAGEVERSION (0x00)
935
936/*defines for IO Unit Page 6 Flags field */
937#define MPI2_IOUNITPAGE6_FLAGS_ENABLE_RAID_ACCELERATOR (0x0001)
938
939
940/*IO Unit Page 7 */
941
942typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 {
943 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
944 U8 CurrentPowerMode; /*0x04 */
945 U8 PreviousPowerMode; /*0x05 */
946 U8 PCIeWidth; /*0x06 */
947 U8 PCIeSpeed; /*0x07 */
948 U32 ProcessorState; /*0x08 */
949 U32
950 PowerManagementCapabilities; /*0x0C */
951 U16 IOCTemperature; /*0x10 */
952 U8
953 IOCTemperatureUnits; /*0x12 */
954 U8 IOCSpeed; /*0x13 */
955 U16 BoardTemperature; /*0x14 */
956 U8
957 BoardTemperatureUnits; /*0x16 */
958 U8 Reserved3; /*0x17 */
959 U32 BoardPowerRequirement; /*0x18 */
960 U32 PCISlotPowerAllocation; /*0x1C */
961 U32 Reserved6; /* 0x20 */
962 U32 Reserved7; /* 0x24 */
963} MPI2_CONFIG_PAGE_IO_UNIT_7,
964 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_7,
965 Mpi2IOUnitPage7_t, *pMpi2IOUnitPage7_t;
966
967#define MPI2_IOUNITPAGE7_PAGEVERSION (0x04)
968
969/*defines for IO Unit Page 7 CurrentPowerMode and PreviousPowerMode fields */
970#define MPI25_IOUNITPAGE7_PM_INIT_MASK (0xC0)
971#define MPI25_IOUNITPAGE7_PM_INIT_UNAVAILABLE (0x00)
972#define MPI25_IOUNITPAGE7_PM_INIT_HOST (0x40)
973#define MPI25_IOUNITPAGE7_PM_INIT_IO_UNIT (0x80)
974#define MPI25_IOUNITPAGE7_PM_INIT_PCIE_DPA (0xC0)
975
976#define MPI25_IOUNITPAGE7_PM_MODE_MASK (0x07)
977#define MPI25_IOUNITPAGE7_PM_MODE_UNAVAILABLE (0x00)
978#define MPI25_IOUNITPAGE7_PM_MODE_UNKNOWN (0x01)
979#define MPI25_IOUNITPAGE7_PM_MODE_FULL_POWER (0x04)
980#define MPI25_IOUNITPAGE7_PM_MODE_REDUCED_POWER (0x05)
981#define MPI25_IOUNITPAGE7_PM_MODE_STANDBY (0x06)
982
983
984/*defines for IO Unit Page 7 PCIeWidth field */
985#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X1 (0x01)
986#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2 (0x02)
987#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4 (0x04)
988#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8 (0x08)
989
990/*defines for IO Unit Page 7 PCIeSpeed field */
991#define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS (0x00)
992#define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS (0x01)
993#define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS (0x02)
994
995/*defines for IO Unit Page 7 ProcessorState field */
996#define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND (0x0000000F)
997#define MPI2_IOUNITPAGE7_PSTATE_SHIFT_SECOND (0)
998
999#define MPI2_IOUNITPAGE7_PSTATE_NOT_PRESENT (0x00)
1000#define MPI2_IOUNITPAGE7_PSTATE_DISABLED (0x01)
1001#define MPI2_IOUNITPAGE7_PSTATE_ENABLED (0x02)
1002
1003/*defines for IO Unit Page 7 PowerManagementCapabilities field */
1004#define MPI25_IOUNITPAGE7_PMCAP_DPA_FULL_PWR_MODE (0x00400000)
1005#define MPI25_IOUNITPAGE7_PMCAP_DPA_REDUCED_PWR_MODE (0x00200000)
1006#define MPI25_IOUNITPAGE7_PMCAP_DPA_STANDBY_MODE (0x00100000)
1007#define MPI25_IOUNITPAGE7_PMCAP_HOST_FULL_PWR_MODE (0x00040000)
1008#define MPI25_IOUNITPAGE7_PMCAP_HOST_REDUCED_PWR_MODE (0x00020000)
1009#define MPI25_IOUNITPAGE7_PMCAP_HOST_STANDBY_MODE (0x00010000)
1010#define MPI25_IOUNITPAGE7_PMCAP_IO_FULL_PWR_MODE (0x00004000)
1011#define MPI25_IOUNITPAGE7_PMCAP_IO_REDUCED_PWR_MODE (0x00002000)
1012#define MPI25_IOUNITPAGE7_PMCAP_IO_STANDBY_MODE (0x00001000)
1013#define MPI2_IOUNITPAGE7_PMCAP_HOST_12_5_PCT_IOCSPEED (0x00000400)
1014#define MPI2_IOUNITPAGE7_PMCAP_HOST_25_0_PCT_IOCSPEED (0x00000200)
1015#define MPI2_IOUNITPAGE7_PMCAP_HOST_50_0_PCT_IOCSPEED (0x00000100)
1016#define MPI25_IOUNITPAGE7_PMCAP_IO_12_5_PCT_IOCSPEED (0x00000040)
1017#define MPI25_IOUNITPAGE7_PMCAP_IO_25_0_PCT_IOCSPEED (0x00000020)
1018#define MPI25_IOUNITPAGE7_PMCAP_IO_50_0_PCT_IOCSPEED (0x00000010)
1019#define MPI2_IOUNITPAGE7_PMCAP_HOST_WIDTH_CHANGE_PCIE (0x00000008)
1020#define MPI2_IOUNITPAGE7_PMCAP_HOST_SPEED_CHANGE_PCIE (0x00000004)
1021#define MPI25_IOUNITPAGE7_PMCAP_IO_WIDTH_CHANGE_PCIE (0x00000002)
1022#define MPI25_IOUNITPAGE7_PMCAP_IO_SPEED_CHANGE_PCIE (0x00000001)
1023
1024/*obsolete names for the PowerManagementCapabilities bits (above) */
1025#define MPI2_IOUNITPAGE7_PMCAP_12_5_PCT_IOCSPEED (0x00000400)
1026#define MPI2_IOUNITPAGE7_PMCAP_25_0_PCT_IOCSPEED (0x00000200)
1027#define MPI2_IOUNITPAGE7_PMCAP_50_0_PCT_IOCSPEED (0x00000100)
1028#define MPI2_IOUNITPAGE7_PMCAP_PCIE_WIDTH_CHANGE (0x00000008) /*obsolete */
1029#define MPI2_IOUNITPAGE7_PMCAP_PCIE_SPEED_CHANGE (0x00000004) /*obsolete */
1030
1031
1032/*defines for IO Unit Page 7 IOCTemperatureUnits field */
1033#define MPI2_IOUNITPAGE7_IOC_TEMP_NOT_PRESENT (0x00)
1034#define MPI2_IOUNITPAGE7_IOC_TEMP_FAHRENHEIT (0x01)
1035#define MPI2_IOUNITPAGE7_IOC_TEMP_CELSIUS (0x02)
1036
1037/*defines for IO Unit Page 7 IOCSpeed field */
1038#define MPI2_IOUNITPAGE7_IOC_SPEED_FULL (0x01)
1039#define MPI2_IOUNITPAGE7_IOC_SPEED_HALF (0x02)
1040#define MPI2_IOUNITPAGE7_IOC_SPEED_QUARTER (0x04)
1041#define MPI2_IOUNITPAGE7_IOC_SPEED_EIGHTH (0x08)
1042
1043/*defines for IO Unit Page 7 BoardTemperatureUnits field */
1044#define MPI2_IOUNITPAGE7_BOARD_TEMP_NOT_PRESENT (0x00)
1045#define MPI2_IOUNITPAGE7_BOARD_TEMP_FAHRENHEIT (0x01)
1046#define MPI2_IOUNITPAGE7_BOARD_TEMP_CELSIUS (0x02)
1047
1048
1049/*IO Unit Page 8 */
1050
1051#define MPI2_IOUNIT8_NUM_THRESHOLDS (4)
1052
1053typedef struct _MPI2_IOUNIT8_SENSOR {
1054 U16 Flags; /*0x00 */
1055 U16 Reserved1; /*0x02 */
1056 U16
1057 Threshold[MPI2_IOUNIT8_NUM_THRESHOLDS]; /*0x04 */
1058 U32 Reserved2; /*0x0C */
1059 U32 Reserved3; /*0x10 */
1060 U32 Reserved4; /*0x14 */
1061} MPI2_IOUNIT8_SENSOR, *PTR_MPI2_IOUNIT8_SENSOR,
1062 Mpi2IOUnit8Sensor_t, *pMpi2IOUnit8Sensor_t;
1063
1064/*defines for IO Unit Page 8 Sensor Flags field */
1065#define MPI2_IOUNIT8_SENSOR_FLAGS_T3_ENABLE (0x0008)
1066#define MPI2_IOUNIT8_SENSOR_FLAGS_T2_ENABLE (0x0004)
1067#define MPI2_IOUNIT8_SENSOR_FLAGS_T1_ENABLE (0x0002)
1068#define MPI2_IOUNIT8_SENSOR_FLAGS_T0_ENABLE (0x0001)
1069
1070/*
1071 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1072 *one and check the value returned for NumSensors at runtime.
1073 */
1074#ifndef MPI2_IOUNITPAGE8_SENSOR_ENTRIES
1075#define MPI2_IOUNITPAGE8_SENSOR_ENTRIES (1)
1076#endif
1077
1078typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_8 {
1079 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1080 U32 Reserved1; /*0x04 */
1081 U32 Reserved2; /*0x08 */
1082 U8 NumSensors; /*0x0C */
1083 U8 PollingInterval; /*0x0D */
1084 U16 Reserved3; /*0x0E */
1085 MPI2_IOUNIT8_SENSOR
1086 Sensor[MPI2_IOUNITPAGE8_SENSOR_ENTRIES];/*0x10 */
1087} MPI2_CONFIG_PAGE_IO_UNIT_8,
1088 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_8,
1089 Mpi2IOUnitPage8_t, *pMpi2IOUnitPage8_t;
1090
1091#define MPI2_IOUNITPAGE8_PAGEVERSION (0x00)
1092
1093
1094/*IO Unit Page 9 */
1095
1096typedef struct _MPI2_IOUNIT9_SENSOR {
1097 U16 CurrentTemperature; /*0x00 */
1098 U16 Reserved1; /*0x02 */
1099 U8 Flags; /*0x04 */
1100 U8 Reserved2; /*0x05 */
1101 U16 Reserved3; /*0x06 */
1102 U32 Reserved4; /*0x08 */
1103 U32 Reserved5; /*0x0C */
1104} MPI2_IOUNIT9_SENSOR, *PTR_MPI2_IOUNIT9_SENSOR,
1105 Mpi2IOUnit9Sensor_t, *pMpi2IOUnit9Sensor_t;
1106
1107/*defines for IO Unit Page 9 Sensor Flags field */
1108#define MPI2_IOUNIT9_SENSOR_FLAGS_TEMP_VALID (0x01)
1109
1110/*
1111 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1112 *one and check the value returned for NumSensors at runtime.
1113 */
1114#ifndef MPI2_IOUNITPAGE9_SENSOR_ENTRIES
1115#define MPI2_IOUNITPAGE9_SENSOR_ENTRIES (1)
1116#endif
1117
1118typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_9 {
1119 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1120 U32 Reserved1; /*0x04 */
1121 U32 Reserved2; /*0x08 */
1122 U8 NumSensors; /*0x0C */
1123 U8 Reserved4; /*0x0D */
1124 U16 Reserved3; /*0x0E */
1125 MPI2_IOUNIT9_SENSOR
1126 Sensor[MPI2_IOUNITPAGE9_SENSOR_ENTRIES];/*0x10 */
1127} MPI2_CONFIG_PAGE_IO_UNIT_9,
1128 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_9,
1129 Mpi2IOUnitPage9_t, *pMpi2IOUnitPage9_t;
1130
1131#define MPI2_IOUNITPAGE9_PAGEVERSION (0x00)
1132
1133
1134/*IO Unit Page 10 */
1135
1136typedef struct _MPI2_IOUNIT10_FUNCTION {
1137 U8 CreditPercent; /*0x00 */
1138 U8 Reserved1; /*0x01 */
1139 U16 Reserved2; /*0x02 */
1140} MPI2_IOUNIT10_FUNCTION,
1141 *PTR_MPI2_IOUNIT10_FUNCTION,
1142 Mpi2IOUnit10Function_t,
1143 *pMpi2IOUnit10Function_t;
1144
1145/*
1146 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1147 *one and check the value returned for NumFunctions at runtime.
1148 */
1149#ifndef MPI2_IOUNITPAGE10_FUNCTION_ENTRIES
1150#define MPI2_IOUNITPAGE10_FUNCTION_ENTRIES (1)
1151#endif
1152
1153typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_10 {
1154 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1155 U8 NumFunctions; /*0x04 */
1156 U8 Reserved1; /*0x05 */
1157 U16 Reserved2; /*0x06 */
1158 U32 Reserved3; /*0x08 */
1159 U32 Reserved4; /*0x0C */
1160 MPI2_IOUNIT10_FUNCTION
1161 Function[MPI2_IOUNITPAGE10_FUNCTION_ENTRIES];/*0x10 */
1162} MPI2_CONFIG_PAGE_IO_UNIT_10,
1163 *PTR_MPI2_CONFIG_PAGE_IO_UNIT_10,
1164 Mpi2IOUnitPage10_t, *pMpi2IOUnitPage10_t;
1165
1166#define MPI2_IOUNITPAGE10_PAGEVERSION (0x01)
1167
1168
1169/* IO Unit Page 11 (for MPI v2.6 and later) */
1170
1171typedef struct _MPI26_IOUNIT11_SPINUP_GROUP {
1172 U8 MaxTargetSpinup; /* 0x00 */
1173 U8 SpinupDelay; /* 0x01 */
1174 U8 SpinupFlags; /* 0x02 */
1175 U8 Reserved1; /* 0x03 */
1176} MPI26_IOUNIT11_SPINUP_GROUP,
1177 *PTR_MPI26_IOUNIT11_SPINUP_GROUP,
1178 Mpi26IOUnit11SpinupGroup_t,
1179 *pMpi26IOUnit11SpinupGroup_t;
1180
1181/* defines for IO Unit Page 11 SpinupFlags */
1182#define MPI26_IOUNITPAGE11_SPINUP_DISABLE_FLAG (0x01)
1183
1184
1185/*
1186 * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1187 * four and check the value returned for NumPhys at runtime.
1188 */
1189#ifndef MPI26_IOUNITPAGE11_PHY_MAX
1190#define MPI26_IOUNITPAGE11_PHY_MAX (4)
1191#endif
1192
1193typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 {
1194 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1195 U32 Reserved1; /*0x04 */
1196 MPI26_IOUNIT11_SPINUP_GROUP SpinupGroupParameters[4]; /*0x08 */
1197 U32 Reserved2; /*0x18 */
1198 U32 Reserved3; /*0x1C */
1199 U32 Reserved4; /*0x20 */
1200 U8 BootDeviceWaitTime; /*0x24 */
1201 U8 Reserved5; /*0x25 */
1202 U16 Reserved6; /*0x26 */
1203 U8 NumPhys; /*0x28 */
1204 U8 PEInitialSpinupDelay; /*0x29 */
1205 U8 PEReplyDelay; /*0x2A */
1206 U8 Flags; /*0x2B */
1207 U8 PHY[MPI26_IOUNITPAGE11_PHY_MAX];/*0x2C */
1208} MPI26_CONFIG_PAGE_IO_UNIT_11,
1209 *PTR_MPI26_CONFIG_PAGE_IO_UNIT_11,
1210 Mpi26IOUnitPage11_t,
1211 *pMpi26IOUnitPage11_t;
1212
1213#define MPI26_IOUNITPAGE11_PAGEVERSION (0x00)
1214
1215/* defines for Flags field */
1216#define MPI26_IOUNITPAGE11_FLAGS_AUTO_PORTENABLE (0x01)
1217
1218/* defines for PHY field */
1219#define MPI26_IOUNITPAGE11_PHY_SPINUP_GROUP_MASK (0x03)
1220
1221
1222
1223
1224
1225
1226/****************************************************************************
1227* IOC Config Pages
1228****************************************************************************/
1229
1230/*IOC Page 0 */
1231
1232typedef struct _MPI2_CONFIG_PAGE_IOC_0 {
1233 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1234 U32 Reserved1; /*0x04 */
1235 U32 Reserved2; /*0x08 */
1236 U16 VendorID; /*0x0C */
1237 U16 DeviceID; /*0x0E */
1238 U8 RevisionID; /*0x10 */
1239 U8 Reserved3; /*0x11 */
1240 U16 Reserved4; /*0x12 */
1241 U32 ClassCode; /*0x14 */
1242 U16 SubsystemVendorID; /*0x18 */
1243 U16 SubsystemID; /*0x1A */
1244} MPI2_CONFIG_PAGE_IOC_0,
1245 *PTR_MPI2_CONFIG_PAGE_IOC_0,
1246 Mpi2IOCPage0_t, *pMpi2IOCPage0_t;
1247
1248#define MPI2_IOCPAGE0_PAGEVERSION (0x02)
1249
1250
1251/*IOC Page 1 */
1252
1253typedef struct _MPI2_CONFIG_PAGE_IOC_1 {
1254 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1255 U32 Flags; /*0x04 */
1256 U32 CoalescingTimeout; /*0x08 */
1257 U8 CoalescingDepth; /*0x0C */
1258 U8 PCISlotNum; /*0x0D */
1259 U8 PCIBusNum; /*0x0E */
1260 U8 PCIDomainSegment; /*0x0F */
1261 U32 Reserved1; /*0x10 */
1262 U32 Reserved2; /*0x14 */
1263} MPI2_CONFIG_PAGE_IOC_1,
1264 *PTR_MPI2_CONFIG_PAGE_IOC_1,
1265 Mpi2IOCPage1_t, *pMpi2IOCPage1_t;
1266
1267#define MPI2_IOCPAGE1_PAGEVERSION (0x05)
1268
1269/*defines for IOC Page 1 Flags field */
1270#define MPI2_IOCPAGE1_REPLY_COALESCING (0x00000001)
1271
1272#define MPI2_IOCPAGE1_PCISLOTNUM_UNKNOWN (0xFF)
1273#define MPI2_IOCPAGE1_PCIBUSNUM_UNKNOWN (0xFF)
1274#define MPI2_IOCPAGE1_PCIDOMAIN_UNKNOWN (0xFF)
1275
1276/*IOC Page 6 */
1277
1278typedef struct _MPI2_CONFIG_PAGE_IOC_6 {
1279 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1280 U32
1281 CapabilitiesFlags; /*0x04 */
1282 U8 MaxDrivesRAID0; /*0x08 */
1283 U8 MaxDrivesRAID1; /*0x09 */
1284 U8
1285 MaxDrivesRAID1E; /*0x0A */
1286 U8
1287 MaxDrivesRAID10; /*0x0B */
1288 U8 MinDrivesRAID0; /*0x0C */
1289 U8 MinDrivesRAID1; /*0x0D */
1290 U8
1291 MinDrivesRAID1E; /*0x0E */
1292 U8
1293 MinDrivesRAID10; /*0x0F */
1294 U32 Reserved1; /*0x10 */
1295 U8
1296 MaxGlobalHotSpares; /*0x14 */
1297 U8 MaxPhysDisks; /*0x15 */
1298 U8 MaxVolumes; /*0x16 */
1299 U8 MaxConfigs; /*0x17 */
1300 U8 MaxOCEDisks; /*0x18 */
1301 U8 Reserved2; /*0x19 */
1302 U16 Reserved3; /*0x1A */
1303 U32
1304 SupportedStripeSizeMapRAID0; /*0x1C */
1305 U32
1306 SupportedStripeSizeMapRAID1E; /*0x20 */
1307 U32
1308 SupportedStripeSizeMapRAID10; /*0x24 */
1309 U32 Reserved4; /*0x28 */
1310 U32 Reserved5; /*0x2C */
1311 U16
1312 DefaultMetadataSize; /*0x30 */
1313 U16 Reserved6; /*0x32 */
1314 U16
1315 MaxBadBlockTableEntries; /*0x34 */
1316 U16 Reserved7; /*0x36 */
1317 U32
1318 IRNvsramVersion; /*0x38 */
1319} MPI2_CONFIG_PAGE_IOC_6,
1320 *PTR_MPI2_CONFIG_PAGE_IOC_6,
1321 Mpi2IOCPage6_t, *pMpi2IOCPage6_t;
1322
1323#define MPI2_IOCPAGE6_PAGEVERSION (0x05)
1324
1325/*defines for IOC Page 6 CapabilitiesFlags */
1326#define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT (0x00000020)
1327#define MPI2_IOCPAGE6_CAP_FLAGS_RAID10_SUPPORT (0x00000010)
1328#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1_SUPPORT (0x00000008)
1329#define MPI2_IOCPAGE6_CAP_FLAGS_RAID1E_SUPPORT (0x00000004)
1330#define MPI2_IOCPAGE6_CAP_FLAGS_RAID0_SUPPORT (0x00000002)
1331#define MPI2_IOCPAGE6_CAP_FLAGS_GLOBAL_HOT_SPARE (0x00000001)
1332
1333
1334/*IOC Page 7 */
1335
1336#define MPI2_IOCPAGE7_EVENTMASK_WORDS (4)
1337
1338typedef struct _MPI2_CONFIG_PAGE_IOC_7 {
1339 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1340 U32 Reserved1; /*0x04 */
1341 U32
1342 EventMasks[MPI2_IOCPAGE7_EVENTMASK_WORDS];/*0x08 */
1343 U16 SASBroadcastPrimitiveMasks; /*0x18 */
1344 U16 SASNotifyPrimitiveMasks; /*0x1A */
1345 U32 Reserved3; /*0x1C */
1346} MPI2_CONFIG_PAGE_IOC_7,
1347 *PTR_MPI2_CONFIG_PAGE_IOC_7,
1348 Mpi2IOCPage7_t, *pMpi2IOCPage7_t;
1349
1350#define MPI2_IOCPAGE7_PAGEVERSION (0x02)
1351
1352
1353/*IOC Page 8 */
1354
1355typedef struct _MPI2_CONFIG_PAGE_IOC_8 {
1356 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1357 U8 NumDevsPerEnclosure; /*0x04 */
1358 U8 Reserved1; /*0x05 */
1359 U16 Reserved2; /*0x06 */
1360 U16 MaxPersistentEntries; /*0x08 */
1361 U16 MaxNumPhysicalMappedIDs; /*0x0A */
1362 U16 Flags; /*0x0C */
1363 U16 Reserved3; /*0x0E */
1364 U16 IRVolumeMappingFlags; /*0x10 */
1365 U16 Reserved4; /*0x12 */
1366 U32 Reserved5; /*0x14 */
1367} MPI2_CONFIG_PAGE_IOC_8,
1368 *PTR_MPI2_CONFIG_PAGE_IOC_8,
1369 Mpi2IOCPage8_t, *pMpi2IOCPage8_t;
1370
1371#define MPI2_IOCPAGE8_PAGEVERSION (0x00)
1372
1373/*defines for IOC Page 8 Flags field */
1374#define MPI2_IOCPAGE8_FLAGS_DA_START_SLOT_1 (0x00000020)
1375#define MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0 (0x00000010)
1376
1377#define MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE (0x0000000E)
1378#define MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING (0x00000000)
1379#define MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING (0x00000002)
1380
1381#define MPI2_IOCPAGE8_FLAGS_DISABLE_PERSISTENT_MAPPING (0x00000001)
1382#define MPI2_IOCPAGE8_FLAGS_ENABLE_PERSISTENT_MAPPING (0x00000000)
1383
1384/*defines for IOC Page 8 IRVolumeMappingFlags */
1385#define MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE (0x00000003)
1386#define MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING (0x00000000)
1387#define MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING (0x00000001)
1388
1389
1390/****************************************************************************
1391* BIOS Config Pages
1392****************************************************************************/
1393
1394/*BIOS Page 1 */
1395
1396typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
1397 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1398 U32 BiosOptions; /*0x04 */
1399 U32 IOCSettings; /*0x08 */
1400 U8 SSUTimeout; /*0x0C */
1401 U8 Reserved1; /*0x0D */
1402 U16 Reserved2; /*0x0E */
1403 U32 DeviceSettings; /*0x10 */
1404 U16 NumberOfDevices; /*0x14 */
1405 U16 UEFIVersion; /*0x16 */
1406 U16 IOTimeoutBlockDevicesNonRM; /*0x18 */
1407 U16 IOTimeoutSequential; /*0x1A */
1408 U16 IOTimeoutOther; /*0x1C */
1409 U16 IOTimeoutBlockDevicesRM; /*0x1E */
1410} MPI2_CONFIG_PAGE_BIOS_1,
1411 *PTR_MPI2_CONFIG_PAGE_BIOS_1,
1412 Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
1413
1414#define MPI2_BIOSPAGE1_PAGEVERSION (0x07)
1415
1416/*values for BIOS Page 1 BiosOptions field */
1417#define MPI2_BIOSPAGE1_OPTIONS_BOOT_LIST_ADD_ALT_BOOT_DEVICE (0x00008000)
1418#define MPI2_BIOSPAGE1_OPTIONS_ADVANCED_CONFIG (0x00004000)
1419
1420#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK (0x00003800)
1421#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK (0x00003800)
1422#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL (0x00000000)
1423#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE (0x00000800)
1424#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID (0x00001000)
1425#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS (0x00001800)
1426#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY (0x00002000)
1427
1428#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS (0x00000400)
1429
1430#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD (0x00000300)
1431#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD (0x00000000)
1432#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD (0x00000100)
1433#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD (0x00000200)
1434#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD (0x00000300)
1435
1436#define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID (0x000000F0)
1437#define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID (0x00000000)
1438
1439#define MPI2_BIOSPAGE1_OPTIONS_MASK_UEFI_HII_REGISTRATION (0x00000006)
1440#define MPI2_BIOSPAGE1_OPTIONS_ENABLE_UEFI_HII (0x00000000)
1441#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_UEFI_HII (0x00000002)
1442#define MPI2_BIOSPAGE1_OPTIONS_VERSION_CHECK_UEFI_HII (0x00000004)
1443
1444#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_BIOS (0x00000001)
1445
1446/*values for BIOS Page 1 IOCSettings field */
1447#define MPI2_BIOSPAGE1_IOCSET_MASK_BOOT_PREFERENCE (0x00030000)
1448#define MPI2_BIOSPAGE1_IOCSET_ENCLOSURE_SLOT_BOOT (0x00000000)
1449#define MPI2_BIOSPAGE1_IOCSET_SAS_ADDRESS_BOOT (0x00010000)
1450
1451#define MPI2_BIOSPAGE1_IOCSET_MASK_RM_SETTING (0x000000C0)
1452#define MPI2_BIOSPAGE1_IOCSET_NONE_RM_SETTING (0x00000000)
1453#define MPI2_BIOSPAGE1_IOCSET_BOOT_RM_SETTING (0x00000040)
1454#define MPI2_BIOSPAGE1_IOCSET_MEDIA_RM_SETTING (0x00000080)
1455
1456#define MPI2_BIOSPAGE1_IOCSET_MASK_ADAPTER_SUPPORT (0x00000030)
1457#define MPI2_BIOSPAGE1_IOCSET_NO_SUPPORT (0x00000000)
1458#define MPI2_BIOSPAGE1_IOCSET_BIOS_SUPPORT (0x00000010)
1459#define MPI2_BIOSPAGE1_IOCSET_OS_SUPPORT (0x00000020)
1460#define MPI2_BIOSPAGE1_IOCSET_ALL_SUPPORT (0x00000030)
1461
1462#define MPI2_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008)
1463
1464/*values for BIOS Page 1 DeviceSettings field */
1465#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING (0x00000010)
1466#define MPI2_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008)
1467#define MPI2_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004)
1468#define MPI2_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002)
1469#define MPI2_BIOSPAGE1_DEVSET_DISABLE_OTHER_LUN (0x00000001)
1470
1471/*defines for BIOS Page 1 UEFIVersion field */
1472#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_MASK (0xFF00)
1473#define MPI2_BIOSPAGE1_UEFI_VER_MAJOR_SHIFT (8)
1474#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_MASK (0x00FF)
1475#define MPI2_BIOSPAGE1_UEFI_VER_MINOR_SHIFT (0)
1476
1477
1478
1479/*BIOS Page 2 */
1480
1481typedef struct _MPI2_BOOT_DEVICE_ADAPTER_ORDER {
1482 U32 Reserved1; /*0x00 */
1483 U32 Reserved2; /*0x04 */
1484 U32 Reserved3; /*0x08 */
1485 U32 Reserved4; /*0x0C */
1486 U32 Reserved5; /*0x10 */
1487 U32 Reserved6; /*0x14 */
1488} MPI2_BOOT_DEVICE_ADAPTER_ORDER,
1489 *PTR_MPI2_BOOT_DEVICE_ADAPTER_ORDER,
1490 Mpi2BootDeviceAdapterOrder_t,
1491 *pMpi2BootDeviceAdapterOrder_t;
1492
1493typedef struct _MPI2_BOOT_DEVICE_SAS_WWID {
1494 U64 SASAddress; /*0x00 */
1495 U8 LUN[8]; /*0x08 */
1496 U32 Reserved1; /*0x10 */
1497 U32 Reserved2; /*0x14 */
1498} MPI2_BOOT_DEVICE_SAS_WWID,
1499 *PTR_MPI2_BOOT_DEVICE_SAS_WWID,
1500 Mpi2BootDeviceSasWwid_t,
1501 *pMpi2BootDeviceSasWwid_t;
1502
1503typedef struct _MPI2_BOOT_DEVICE_ENCLOSURE_SLOT {
1504 U64 EnclosureLogicalID; /*0x00 */
1505 U32 Reserved1; /*0x08 */
1506 U32 Reserved2; /*0x0C */
1507 U16 SlotNumber; /*0x10 */
1508 U16 Reserved3; /*0x12 */
1509 U32 Reserved4; /*0x14 */
1510} MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
1511 *PTR_MPI2_BOOT_DEVICE_ENCLOSURE_SLOT,
1512 Mpi2BootDeviceEnclosureSlot_t,
1513 *pMpi2BootDeviceEnclosureSlot_t;
1514
1515typedef struct _MPI2_BOOT_DEVICE_DEVICE_NAME {
1516 U64 DeviceName; /*0x00 */
1517 U8 LUN[8]; /*0x08 */
1518 U32 Reserved1; /*0x10 */
1519 U32 Reserved2; /*0x14 */
1520} MPI2_BOOT_DEVICE_DEVICE_NAME,
1521 *PTR_MPI2_BOOT_DEVICE_DEVICE_NAME,
1522 Mpi2BootDeviceDeviceName_t,
1523 *pMpi2BootDeviceDeviceName_t;
1524
1525typedef union _MPI2_MPI2_BIOSPAGE2_BOOT_DEVICE {
1526 MPI2_BOOT_DEVICE_ADAPTER_ORDER AdapterOrder;
1527 MPI2_BOOT_DEVICE_SAS_WWID SasWwid;
1528 MPI2_BOOT_DEVICE_ENCLOSURE_SLOT EnclosureSlot;
1529 MPI2_BOOT_DEVICE_DEVICE_NAME DeviceName;
1530} MPI2_BIOSPAGE2_BOOT_DEVICE,
1531 *PTR_MPI2_BIOSPAGE2_BOOT_DEVICE,
1532 Mpi2BiosPage2BootDevice_t,
1533 *pMpi2BiosPage2BootDevice_t;
1534
1535typedef struct _MPI2_CONFIG_PAGE_BIOS_2 {
1536 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1537 U32 Reserved1; /*0x04 */
1538 U32 Reserved2; /*0x08 */
1539 U32 Reserved3; /*0x0C */
1540 U32 Reserved4; /*0x10 */
1541 U32 Reserved5; /*0x14 */
1542 U32 Reserved6; /*0x18 */
1543 U8 ReqBootDeviceForm; /*0x1C */
1544 U8 Reserved7; /*0x1D */
1545 U16 Reserved8; /*0x1E */
1546 MPI2_BIOSPAGE2_BOOT_DEVICE RequestedBootDevice; /*0x20 */
1547 U8 ReqAltBootDeviceForm; /*0x38 */
1548 U8 Reserved9; /*0x39 */
1549 U16 Reserved10; /*0x3A */
1550 MPI2_BIOSPAGE2_BOOT_DEVICE RequestedAltBootDevice; /*0x3C */
1551 U8 CurrentBootDeviceForm; /*0x58 */
1552 U8 Reserved11; /*0x59 */
1553 U16 Reserved12; /*0x5A */
1554 MPI2_BIOSPAGE2_BOOT_DEVICE CurrentBootDevice; /*0x58 */
1555} MPI2_CONFIG_PAGE_BIOS_2, *PTR_MPI2_CONFIG_PAGE_BIOS_2,
1556 Mpi2BiosPage2_t, *pMpi2BiosPage2_t;
1557
1558#define MPI2_BIOSPAGE2_PAGEVERSION (0x04)
1559
1560/*values for BIOS Page 2 BootDeviceForm fields */
1561#define MPI2_BIOSPAGE2_FORM_MASK (0x0F)
1562#define MPI2_BIOSPAGE2_FORM_NO_DEVICE_SPECIFIED (0x00)
1563#define MPI2_BIOSPAGE2_FORM_SAS_WWID (0x05)
1564#define MPI2_BIOSPAGE2_FORM_ENCLOSURE_SLOT (0x06)
1565#define MPI2_BIOSPAGE2_FORM_DEVICE_NAME (0x07)
1566
1567
1568/*BIOS Page 3 */
1569
1570#define MPI2_BIOSPAGE3_NUM_ADAPTER (4)
1571
1572typedef struct _MPI2_ADAPTER_INFO {
1573 U8 PciBusNumber; /*0x00 */
1574 U8 PciDeviceAndFunctionNumber; /*0x01 */
1575 U16 AdapterFlags; /*0x02 */
1576} MPI2_ADAPTER_INFO, *PTR_MPI2_ADAPTER_INFO,
1577 Mpi2AdapterInfo_t, *pMpi2AdapterInfo_t;
1578
1579#define MPI2_ADAPTER_INFO_FLAGS_EMBEDDED (0x0001)
1580#define MPI2_ADAPTER_INFO_FLAGS_INIT_STATUS (0x0002)
1581
1582typedef struct _MPI2_ADAPTER_ORDER_AUX {
1583 U64 WWID; /* 0x00 */
1584 U32 Reserved1; /* 0x08 */
1585 U32 Reserved2; /* 0x0C */
1586} MPI2_ADAPTER_ORDER_AUX, *PTR_MPI2_ADAPTER_ORDER_AUX,
1587 Mpi2AdapterOrderAux_t, *pMpi2AdapterOrderAux_t;
1588
1589
1590typedef struct _MPI2_CONFIG_PAGE_BIOS_3 {
1591 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1592 U32 GlobalFlags; /*0x04 */
1593 U32 BiosVersion; /*0x08 */
1594 MPI2_ADAPTER_INFO AdapterOrder[MPI2_BIOSPAGE3_NUM_ADAPTER];
1595 U32 Reserved1; /*0x1C */
1596 MPI2_ADAPTER_ORDER_AUX AdapterOrderAux[MPI2_BIOSPAGE3_NUM_ADAPTER];
1597} MPI2_CONFIG_PAGE_BIOS_3,
1598 *PTR_MPI2_CONFIG_PAGE_BIOS_3,
1599 Mpi2BiosPage3_t, *pMpi2BiosPage3_t;
1600
1601#define MPI2_BIOSPAGE3_PAGEVERSION (0x01)
1602
1603/*values for BIOS Page 3 GlobalFlags */
1604#define MPI2_BIOSPAGE3_FLAGS_PAUSE_ON_ERROR (0x00000002)
1605#define MPI2_BIOSPAGE3_FLAGS_VERBOSE_ENABLE (0x00000004)
1606#define MPI2_BIOSPAGE3_FLAGS_HOOK_INT_40_DISABLE (0x00000010)
1607
1608#define MPI2_BIOSPAGE3_FLAGS_DEV_LIST_DISPLAY_MASK (0x000000E0)
1609#define MPI2_BIOSPAGE3_FLAGS_INSTALLED_DEV_DISPLAY (0x00000000)
1610#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DISPLAY (0x00000020)
1611#define MPI2_BIOSPAGE3_FLAGS_ADAPTER_DEV_DISPLAY (0x00000040)
1612
1613
1614/*BIOS Page 4 */
1615
1616/*
1617 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1618 *one and check the value returned for NumPhys at runtime.
1619 */
1620#ifndef MPI2_BIOS_PAGE_4_PHY_ENTRIES
1621#define MPI2_BIOS_PAGE_4_PHY_ENTRIES (1)
1622#endif
1623
1624typedef struct _MPI2_BIOS4_ENTRY {
1625 U64 ReassignmentWWID; /*0x00 */
1626 U64 ReassignmentDeviceName; /*0x08 */
1627} MPI2_BIOS4_ENTRY, *PTR_MPI2_BIOS4_ENTRY,
1628 Mpi2MBios4Entry_t, *pMpi2Bios4Entry_t;
1629
1630typedef struct _MPI2_CONFIG_PAGE_BIOS_4 {
1631 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1632 U8 NumPhys; /*0x04 */
1633 U8 Reserved1; /*0x05 */
1634 U16 Reserved2; /*0x06 */
1635 MPI2_BIOS4_ENTRY
1636 Phy[MPI2_BIOS_PAGE_4_PHY_ENTRIES]; /*0x08 */
1637} MPI2_CONFIG_PAGE_BIOS_4, *PTR_MPI2_CONFIG_PAGE_BIOS_4,
1638 Mpi2BiosPage4_t, *pMpi2BiosPage4_t;
1639
1640#define MPI2_BIOSPAGE4_PAGEVERSION (0x01)
1641
1642
1643/****************************************************************************
1644* RAID Volume Config Pages
1645****************************************************************************/
1646
1647/*RAID Volume Page 0 */
1648
1649typedef struct _MPI2_RAIDVOL0_PHYS_DISK {
1650 U8 RAIDSetNum; /*0x00 */
1651 U8 PhysDiskMap; /*0x01 */
1652 U8 PhysDiskNum; /*0x02 */
1653 U8 Reserved; /*0x03 */
1654} MPI2_RAIDVOL0_PHYS_DISK, *PTR_MPI2_RAIDVOL0_PHYS_DISK,
1655 Mpi2RaidVol0PhysDisk_t, *pMpi2RaidVol0PhysDisk_t;
1656
1657/*defines for the PhysDiskMap field */
1658#define MPI2_RAIDVOL0_PHYSDISK_PRIMARY (0x01)
1659#define MPI2_RAIDVOL0_PHYSDISK_SECONDARY (0x02)
1660
1661typedef struct _MPI2_RAIDVOL0_SETTINGS {
1662 U16 Settings; /*0x00 */
1663 U8 HotSparePool; /*0x01 */
1664 U8 Reserved; /*0x02 */
1665} MPI2_RAIDVOL0_SETTINGS, *PTR_MPI2_RAIDVOL0_SETTINGS,
1666 Mpi2RaidVol0Settings_t,
1667 *pMpi2RaidVol0Settings_t;
1668
1669/*RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk */
1670#define MPI2_RAID_HOT_SPARE_POOL_0 (0x01)
1671#define MPI2_RAID_HOT_SPARE_POOL_1 (0x02)
1672#define MPI2_RAID_HOT_SPARE_POOL_2 (0x04)
1673#define MPI2_RAID_HOT_SPARE_POOL_3 (0x08)
1674#define MPI2_RAID_HOT_SPARE_POOL_4 (0x10)
1675#define MPI2_RAID_HOT_SPARE_POOL_5 (0x20)
1676#define MPI2_RAID_HOT_SPARE_POOL_6 (0x40)
1677#define MPI2_RAID_HOT_SPARE_POOL_7 (0x80)
1678
1679/*RAID Volume Page 0 VolumeSettings defines */
1680#define MPI2_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX (0x0008)
1681#define MPI2_RAIDVOL0_SETTING_AUTO_CONFIG_HSWAP_DISABLE (0x0004)
1682
1683#define MPI2_RAIDVOL0_SETTING_MASK_WRITE_CACHING (0x0003)
1684#define MPI2_RAIDVOL0_SETTING_UNCHANGED (0x0000)
1685#define MPI2_RAIDVOL0_SETTING_DISABLE_WRITE_CACHING (0x0001)
1686#define MPI2_RAIDVOL0_SETTING_ENABLE_WRITE_CACHING (0x0002)
1687
1688/*
1689 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1690 *one and check the value returned for NumPhysDisks at runtime.
1691 */
1692#ifndef MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX
1693#define MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX (1)
1694#endif
1695
1696typedef struct _MPI2_CONFIG_PAGE_RAID_VOL_0 {
1697 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1698 U16 DevHandle; /*0x04 */
1699 U8 VolumeState; /*0x06 */
1700 U8 VolumeType; /*0x07 */
1701 U32 VolumeStatusFlags; /*0x08 */
1702 MPI2_RAIDVOL0_SETTINGS VolumeSettings; /*0x0C */
1703 U64 MaxLBA; /*0x10 */
1704 U32 StripeSize; /*0x18 */
1705 U16 BlockSize; /*0x1C */
1706 U16 Reserved1; /*0x1E */
1707 U8 SupportedPhysDisks;/*0x20 */
1708 U8 ResyncRate; /*0x21 */
1709 U16 DataScrubDuration; /*0x22 */
1710 U8 NumPhysDisks; /*0x24 */
1711 U8 Reserved2; /*0x25 */
1712 U8 Reserved3; /*0x26 */
1713 U8 InactiveStatus; /*0x27 */
1714 MPI2_RAIDVOL0_PHYS_DISK
1715 PhysDisk[MPI2_RAID_VOL_PAGE_0_PHYSDISK_MAX]; /*0x28 */
1716} MPI2_CONFIG_PAGE_RAID_VOL_0,
1717 *PTR_MPI2_CONFIG_PAGE_RAID_VOL_0,
1718 Mpi2RaidVolPage0_t, *pMpi2RaidVolPage0_t;
1719
1720#define MPI2_RAIDVOLPAGE0_PAGEVERSION (0x0A)
1721
1722/*values for RAID VolumeState */
1723#define MPI2_RAID_VOL_STATE_MISSING (0x00)
1724#define MPI2_RAID_VOL_STATE_FAILED (0x01)
1725#define MPI2_RAID_VOL_STATE_INITIALIZING (0x02)
1726#define MPI2_RAID_VOL_STATE_ONLINE (0x03)
1727#define MPI2_RAID_VOL_STATE_DEGRADED (0x04)
1728#define MPI2_RAID_VOL_STATE_OPTIMAL (0x05)
1729
1730/*values for RAID VolumeType */
1731#define MPI2_RAID_VOL_TYPE_RAID0 (0x00)
1732#define MPI2_RAID_VOL_TYPE_RAID1E (0x01)
1733#define MPI2_RAID_VOL_TYPE_RAID1 (0x02)
1734#define MPI2_RAID_VOL_TYPE_RAID10 (0x05)
1735#define MPI2_RAID_VOL_TYPE_UNKNOWN (0xFF)
1736
1737/*values for RAID Volume Page 0 VolumeStatusFlags field */
1738#define MPI2_RAIDVOL0_STATUS_FLAG_PENDING_RESYNC (0x02000000)
1739#define MPI2_RAIDVOL0_STATUS_FLAG_BACKG_INIT_PENDING (0x01000000)
1740#define MPI2_RAIDVOL0_STATUS_FLAG_MDC_PENDING (0x00800000)
1741#define MPI2_RAIDVOL0_STATUS_FLAG_USER_CONSIST_PENDING (0x00400000)
1742#define MPI2_RAIDVOL0_STATUS_FLAG_MAKE_DATA_CONSISTENT (0x00200000)
1743#define MPI2_RAIDVOL0_STATUS_FLAG_DATA_SCRUB (0x00100000)
1744#define MPI2_RAIDVOL0_STATUS_FLAG_CONSISTENCY_CHECK (0x00080000)
1745#define MPI2_RAIDVOL0_STATUS_FLAG_CAPACITY_EXPANSION (0x00040000)
1746#define MPI2_RAIDVOL0_STATUS_FLAG_BACKGROUND_INIT (0x00020000)
1747#define MPI2_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS (0x00010000)
1748#define MPI2_RAIDVOL0_STATUS_FLAG_VOL_NOT_CONSISTENT (0x00000080)
1749#define MPI2_RAIDVOL0_STATUS_FLAG_OCE_ALLOWED (0x00000040)
1750#define MPI2_RAIDVOL0_STATUS_FLAG_BGI_COMPLETE (0x00000020)
1751#define MPI2_RAIDVOL0_STATUS_FLAG_1E_OFFSET_MIRROR (0x00000000)
1752#define MPI2_RAIDVOL0_STATUS_FLAG_1E_ADJACENT_MIRROR (0x00000010)
1753#define MPI2_RAIDVOL0_STATUS_FLAG_BAD_BLOCK_TABLE_FULL (0x00000008)
1754#define MPI2_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE (0x00000004)
1755#define MPI2_RAIDVOL0_STATUS_FLAG_QUIESCED (0x00000002)
1756#define MPI2_RAIDVOL0_STATUS_FLAG_ENABLED (0x00000001)
1757
1758/*values for RAID Volume Page 0 SupportedPhysDisks field */
1759#define MPI2_RAIDVOL0_SUPPORT_SOLID_STATE_DISKS (0x08)
1760#define MPI2_RAIDVOL0_SUPPORT_HARD_DISKS (0x04)
1761#define MPI2_RAIDVOL0_SUPPORT_SAS_PROTOCOL (0x02)
1762#define MPI2_RAIDVOL0_SUPPORT_SATA_PROTOCOL (0x01)
1763
1764/*values for RAID Volume Page 0 InactiveStatus field */
1765#define MPI2_RAIDVOLPAGE0_UNKNOWN_INACTIVE (0x00)
1766#define MPI2_RAIDVOLPAGE0_STALE_METADATA_INACTIVE (0x01)
1767#define MPI2_RAIDVOLPAGE0_FOREIGN_VOLUME_INACTIVE (0x02)
1768#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_RESOURCE_INACTIVE (0x03)
1769#define MPI2_RAIDVOLPAGE0_CLONE_VOLUME_INACTIVE (0x04)
1770#define MPI2_RAIDVOLPAGE0_INSUFFICIENT_METADATA_INACTIVE (0x05)
1771#define MPI2_RAIDVOLPAGE0_PREVIOUSLY_DELETED (0x06)
1772
1773
1774/*RAID Volume Page 1 */
1775
1776typedef struct _MPI2_CONFIG_PAGE_RAID_VOL_1 {
1777 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1778 U16 DevHandle; /*0x04 */
1779 U16 Reserved0; /*0x06 */
1780 U8 GUID[24]; /*0x08 */
1781 U8 Name[16]; /*0x20 */
1782 U64 WWID; /*0x30 */
1783 U32 Reserved1; /*0x38 */
1784 U32 Reserved2; /*0x3C */
1785} MPI2_CONFIG_PAGE_RAID_VOL_1,
1786 *PTR_MPI2_CONFIG_PAGE_RAID_VOL_1,
1787 Mpi2RaidVolPage1_t, *pMpi2RaidVolPage1_t;
1788
1789#define MPI2_RAIDVOLPAGE1_PAGEVERSION (0x03)
1790
1791
1792/****************************************************************************
1793* RAID Physical Disk Config Pages
1794****************************************************************************/
1795
1796/*RAID Physical Disk Page 0 */
1797
1798typedef struct _MPI2_RAIDPHYSDISK0_SETTINGS {
1799 U16 Reserved1; /*0x00 */
1800 U8 HotSparePool; /*0x02 */
1801 U8 Reserved2; /*0x03 */
1802} MPI2_RAIDPHYSDISK0_SETTINGS,
1803 *PTR_MPI2_RAIDPHYSDISK0_SETTINGS,
1804 Mpi2RaidPhysDisk0Settings_t,
1805 *pMpi2RaidPhysDisk0Settings_t;
1806
1807/*use MPI2_RAID_HOT_SPARE_POOL_ defines for the HotSparePool field */
1808
1809typedef struct _MPI2_RAIDPHYSDISK0_INQUIRY_DATA {
1810 U8 VendorID[8]; /*0x00 */
1811 U8 ProductID[16]; /*0x08 */
1812 U8 ProductRevLevel[4]; /*0x18 */
1813 U8 SerialNum[32]; /*0x1C */
1814} MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
1815 *PTR_MPI2_RAIDPHYSDISK0_INQUIRY_DATA,
1816 Mpi2RaidPhysDisk0InquiryData_t,
1817 *pMpi2RaidPhysDisk0InquiryData_t;
1818
1819typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_0 {
1820 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1821 U16 DevHandle; /*0x04 */
1822 U8 Reserved1; /*0x06 */
1823 U8 PhysDiskNum; /*0x07 */
1824 MPI2_RAIDPHYSDISK0_SETTINGS PhysDiskSettings; /*0x08 */
1825 U32 Reserved2; /*0x0C */
1826 MPI2_RAIDPHYSDISK0_INQUIRY_DATA InquiryData; /*0x10 */
1827 U32 Reserved3; /*0x4C */
1828 U8 PhysDiskState; /*0x50 */
1829 U8 OfflineReason; /*0x51 */
1830 U8 IncompatibleReason; /*0x52 */
1831 U8 PhysDiskAttributes; /*0x53 */
1832 U32 PhysDiskStatusFlags;/*0x54 */
1833 U64 DeviceMaxLBA; /*0x58 */
1834 U64 HostMaxLBA; /*0x60 */
1835 U64 CoercedMaxLBA; /*0x68 */
1836 U16 BlockSize; /*0x70 */
1837 U16 Reserved5; /*0x72 */
1838 U32 Reserved6; /*0x74 */
1839} MPI2_CONFIG_PAGE_RD_PDISK_0,
1840 *PTR_MPI2_CONFIG_PAGE_RD_PDISK_0,
1841 Mpi2RaidPhysDiskPage0_t,
1842 *pMpi2RaidPhysDiskPage0_t;
1843
1844#define MPI2_RAIDPHYSDISKPAGE0_PAGEVERSION (0x05)
1845
1846/*PhysDiskState defines */
1847#define MPI2_RAID_PD_STATE_NOT_CONFIGURED (0x00)
1848#define MPI2_RAID_PD_STATE_NOT_COMPATIBLE (0x01)
1849#define MPI2_RAID_PD_STATE_OFFLINE (0x02)
1850#define MPI2_RAID_PD_STATE_ONLINE (0x03)
1851#define MPI2_RAID_PD_STATE_HOT_SPARE (0x04)
1852#define MPI2_RAID_PD_STATE_DEGRADED (0x05)
1853#define MPI2_RAID_PD_STATE_REBUILDING (0x06)
1854#define MPI2_RAID_PD_STATE_OPTIMAL (0x07)
1855
1856/*OfflineReason defines */
1857#define MPI2_PHYSDISK0_ONLINE (0x00)
1858#define MPI2_PHYSDISK0_OFFLINE_MISSING (0x01)
1859#define MPI2_PHYSDISK0_OFFLINE_FAILED (0x03)
1860#define MPI2_PHYSDISK0_OFFLINE_INITIALIZING (0x04)
1861#define MPI2_PHYSDISK0_OFFLINE_REQUESTED (0x05)
1862#define MPI2_PHYSDISK0_OFFLINE_FAILED_REQUESTED (0x06)
1863#define MPI2_PHYSDISK0_OFFLINE_OTHER (0xFF)
1864
1865/*IncompatibleReason defines */
1866#define MPI2_PHYSDISK0_COMPATIBLE (0x00)
1867#define MPI2_PHYSDISK0_INCOMPATIBLE_PROTOCOL (0x01)
1868#define MPI2_PHYSDISK0_INCOMPATIBLE_BLOCKSIZE (0x02)
1869#define MPI2_PHYSDISK0_INCOMPATIBLE_MAX_LBA (0x03)
1870#define MPI2_PHYSDISK0_INCOMPATIBLE_SATA_EXTENDED_CMD (0x04)
1871#define MPI2_PHYSDISK0_INCOMPATIBLE_REMOVEABLE_MEDIA (0x05)
1872#define MPI2_PHYSDISK0_INCOMPATIBLE_MEDIA_TYPE (0x06)
1873#define MPI2_PHYSDISK0_INCOMPATIBLE_UNKNOWN (0xFF)
1874
1875/*PhysDiskAttributes defines */
1876#define MPI2_PHYSDISK0_ATTRIB_MEDIA_MASK (0x0C)
1877#define MPI2_PHYSDISK0_ATTRIB_SOLID_STATE_DRIVE (0x08)
1878#define MPI2_PHYSDISK0_ATTRIB_HARD_DISK_DRIVE (0x04)
1879
1880#define MPI2_PHYSDISK0_ATTRIB_PROTOCOL_MASK (0x03)
1881#define MPI2_PHYSDISK0_ATTRIB_SAS_PROTOCOL (0x02)
1882#define MPI2_PHYSDISK0_ATTRIB_SATA_PROTOCOL (0x01)
1883
1884/*PhysDiskStatusFlags defines */
1885#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_CERTIFIED (0x00000040)
1886#define MPI2_PHYSDISK0_STATUS_FLAG_OCE_TARGET (0x00000020)
1887#define MPI2_PHYSDISK0_STATUS_FLAG_WRITE_CACHE_ENABLED (0x00000010)
1888#define MPI2_PHYSDISK0_STATUS_FLAG_OPTIMAL_PREVIOUS (0x00000000)
1889#define MPI2_PHYSDISK0_STATUS_FLAG_NOT_OPTIMAL_PREVIOUS (0x00000008)
1890#define MPI2_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME (0x00000004)
1891#define MPI2_PHYSDISK0_STATUS_FLAG_QUIESCED (0x00000002)
1892#define MPI2_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x00000001)
1893
1894
1895/*RAID Physical Disk Page 1 */
1896
1897/*
1898 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
1899 *one and check the value returned for NumPhysDiskPaths at runtime.
1900 */
1901#ifndef MPI2_RAID_PHYS_DISK1_PATH_MAX
1902#define MPI2_RAID_PHYS_DISK1_PATH_MAX (1)
1903#endif
1904
1905typedef struct _MPI2_RAIDPHYSDISK1_PATH {
1906 U16 DevHandle; /*0x00 */
1907 U16 Reserved1; /*0x02 */
1908 U64 WWID; /*0x04 */
1909 U64 OwnerWWID; /*0x0C */
1910 U8 OwnerIdentifier; /*0x14 */
1911 U8 Reserved2; /*0x15 */
1912 U16 Flags; /*0x16 */
1913} MPI2_RAIDPHYSDISK1_PATH, *PTR_MPI2_RAIDPHYSDISK1_PATH,
1914 Mpi2RaidPhysDisk1Path_t,
1915 *pMpi2RaidPhysDisk1Path_t;
1916
1917/*RAID Physical Disk Page 1 Physical Disk Path Flags field defines */
1918#define MPI2_RAID_PHYSDISK1_FLAG_PRIMARY (0x0004)
1919#define MPI2_RAID_PHYSDISK1_FLAG_BROKEN (0x0002)
1920#define MPI2_RAID_PHYSDISK1_FLAG_INVALID (0x0001)
1921
1922typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 {
1923 MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
1924 U8 NumPhysDiskPaths; /*0x04 */
1925 U8 PhysDiskNum; /*0x05 */
1926 U16 Reserved1; /*0x06 */
1927 U32 Reserved2; /*0x08 */
1928 MPI2_RAIDPHYSDISK1_PATH
1929 PhysicalDiskPath[MPI2_RAID_PHYS_DISK1_PATH_MAX];/*0x0C */
1930} MPI2_CONFIG_PAGE_RD_PDISK_1,
1931 *PTR_MPI2_CONFIG_PAGE_RD_PDISK_1,
1932 Mpi2RaidPhysDiskPage1_t,
1933 *pMpi2RaidPhysDiskPage1_t;
1934
1935#define MPI2_RAIDPHYSDISKPAGE1_PAGEVERSION (0x02)
1936
1937
1938/****************************************************************************
1939* values for fields used by several types of SAS Config Pages
1940****************************************************************************/
1941
1942/*values for NegotiatedLinkRates fields */
1943#define MPI2_SAS_NEG_LINK_RATE_MASK_LOGICAL (0xF0)
1944#define MPI2_SAS_NEG_LINK_RATE_SHIFT_LOGICAL (4)
1945#define MPI2_SAS_NEG_LINK_RATE_MASK_PHYSICAL (0x0F)
1946/*link rates used for Negotiated Physical and Logical Link Rate */
1947#define MPI2_SAS_NEG_LINK_RATE_UNKNOWN_LINK_RATE (0x00)
1948#define MPI2_SAS_NEG_LINK_RATE_PHY_DISABLED (0x01)
1949#define MPI2_SAS_NEG_LINK_RATE_NEGOTIATION_FAILED (0x02)
1950#define MPI2_SAS_NEG_LINK_RATE_SATA_OOB_COMPLETE (0x03)
1951#define MPI2_SAS_NEG_LINK_RATE_PORT_SELECTOR (0x04)
1952#define MPI2_SAS_NEG_LINK_RATE_SMP_RESET_IN_PROGRESS (0x05)
1953#define MPI2_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY (0x06)
1954#define MPI2_SAS_NEG_LINK_RATE_1_5 (0x08)
1955#define MPI2_SAS_NEG_LINK_RATE_3_0 (0x09)
1956#define MPI2_SAS_NEG_LINK_RATE_6_0 (0x0A)
1957#define MPI25_SAS_NEG_LINK_RATE_12_0 (0x0B)
1958
1959
1960/*values for AttachedPhyInfo fields */
1961#define MPI2_SAS_APHYINFO_INSIDE_ZPSDS_PERSISTENT (0x00000040)
1962#define MPI2_SAS_APHYINFO_REQUESTED_INSIDE_ZPSDS (0x00000020)
1963#define MPI2_SAS_APHYINFO_BREAK_REPLY_CAPABLE (0x00000010)
1964
1965#define MPI2_SAS_APHYINFO_REASON_MASK (0x0000000F)
1966#define MPI2_SAS_APHYINFO_REASON_UNKNOWN (0x00000000)
1967#define MPI2_SAS_APHYINFO_REASON_POWER_ON (0x00000001)
1968#define MPI2_SAS_APHYINFO_REASON_HARD_RESET (0x00000002)
1969#define MPI2_SAS_APHYINFO_REASON_SMP_PHY_CONTROL (0x00000003)
1970#define MPI2_SAS_APHYINFO_REASON_LOSS_OF_SYNC (0x00000004)
1971#define MPI2_SAS_APHYINFO_REASON_MULTIPLEXING_SEQ (0x00000005)
1972#define MPI2_SAS_APHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00000006)
1973#define MPI2_SAS_APHYINFO_REASON_BREAK_TIMEOUT (0x00000007)
1974#define MPI2_SAS_APHYINFO_REASON_PHY_TEST_STOPPED (0x00000008)
1975
1976
1977/*values for PhyInfo fields */
1978#define MPI2_SAS_PHYINFO_PHY_VACANT (0x80000000)
1979
1980#define MPI2_SAS_PHYINFO_PHY_POWER_CONDITION_MASK (0x18000000)
1981#define MPI2_SAS_PHYINFO_SHIFT_PHY_POWER_CONDITION (27)
1982#define MPI2_SAS_PHYINFO_PHY_POWER_ACTIVE (0x00000000)
1983#define MPI2_SAS_PHYINFO_PHY_POWER_PARTIAL (0x08000000)
1984#define MPI2_SAS_PHYINFO_PHY_POWER_SLUMBER (0x10000000)
1985
1986#define MPI2_SAS_PHYINFO_CHANGED_REQ_INSIDE_ZPSDS (0x04000000)
1987#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS_PERSISTENT (0x02000000)
1988#define MPI2_SAS_PHYINFO_REQ_INSIDE_ZPSDS (0x01000000)
1989#define MPI2_SAS_PHYINFO_ZONE_GROUP_PERSISTENT (0x00400000)
1990#define MPI2_SAS_PHYINFO_INSIDE_ZPSDS (0x00200000)
1991#define MPI2_SAS_PHYINFO_ZONING_ENABLED (0x00100000)
1992
1993#define MPI2_SAS_PHYINFO_REASON_MASK (0x000F0000)
1994#define MPI2_SAS_PHYINFO_REASON_UNKNOWN (0x00000000)
1995#define MPI2_SAS_PHYINFO_REASON_POWER_ON (0x00010000)
1996#define MPI2_SAS_PHYINFO_REASON_HARD_RESET (0x00020000)
1997#define MPI2_SAS_PHYINFO_REASON_SMP_PHY_CONTROL (0x00030000)
1998#define MPI2_SAS_PHYINFO_REASON_LOSS_OF_SYNC (0x00040000)
1999#define MPI2_SAS_PHYINFO_REASON_MULTIPLEXING_SEQ (0x00050000)
2000#define MPI2_SAS_PHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00060000)
2001#define MPI2_SAS_PHYINFO_REASON_BREAK_TIMEOUT (0x00070000)
2002#define MPI2_SAS_PHYINFO_REASON_PHY_TEST_STOPPED (0x00080000)
2003
2004#define MPI2_SAS_PHYINFO_MULTIPLEXING_SUPPORTED (0x00008000)
2005#define MPI2_SAS_PHYINFO_SATA_PORT_ACTIVE (0x00004000)
2006#define MPI2_SAS_PHYINFO_SATA_PORT_SELECTOR_PRESENT (0x00002000)
2007#define MPI2_SAS_PHYINFO_VIRTUAL_PHY (0x00001000)
2008
2009#define MPI2_SAS_PHYINFO_MASK_PARTIAL_PATHWAY_TIME (0x00000F00)
2010#define MPI2_SAS_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME (8)
2011
2012#define MPI2_SAS_PHYINFO_MASK_ROUTING_ATTRIBUTE (0x000000F0)
2013#define MPI2_SAS_PHYINFO_DIRECT_ROUTING (0x00000000)
2014#define MPI2_SAS_PHYINFO_SUBTRACTIVE_ROUTING (0x00000010)
2015#define MPI2_SAS_PHYINFO_TABLE_ROUTING (0x00000020)
2016
2017
2018/*values for SAS ProgrammedLinkRate fields */
2019#define MPI2_SAS_PRATE_MAX_RATE_MASK (0xF0)
2020#define MPI2_SAS_PRATE_MAX_RATE_NOT_PROGRAMMABLE (0x00)
2021#define MPI2_SAS_PRATE_MAX_RATE_1_5 (0x80)
2022#define MPI2_SAS_PRATE_MAX_RATE_3_0 (0x90)
2023#define MPI2_SAS_PRATE_MAX_RATE_6_0 (0xA0)
2024#define MPI25_SAS_PRATE_MAX_RATE_12_0 (0xB0)
2025#define MPI2_SAS_PRATE_MIN_RATE_MASK (0x0F)
2026#define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00)
2027#define MPI2_SAS_PRATE_MIN_RATE_1_5 (0x08)
2028#define MPI2_SAS_PRATE_MIN_RATE_3_0 (0x09)
2029#define MPI2_SAS_PRATE_MIN_RATE_6_0 (0x0A)
2030#define MPI25_SAS_PRATE_MIN_RATE_12_0 (0x0B)
2031
2032
2033/*values for SAS HwLinkRate fields */
2034#define MPI2_SAS_HWRATE_MAX_RATE_MASK (0xF0)
2035#define MPI2_SAS_HWRATE_MAX_RATE_1_5 (0x80)
2036#define MPI2_SAS_HWRATE_MAX_RATE_3_0 (0x90)
2037#define MPI2_SAS_HWRATE_MAX_RATE_6_0 (0xA0)
2038#define MPI25_SAS_HWRATE_MAX_RATE_12_0 (0xB0)
2039#define MPI2_SAS_HWRATE_MIN_RATE_MASK (0x0F)
2040#define MPI2_SAS_HWRATE_MIN_RATE_1_5 (0x08)
2041#define MPI2_SAS_HWRATE_MIN_RATE_3_0 (0x09)
2042#define MPI2_SAS_HWRATE_MIN_RATE_6_0 (0x0A)
2043#define MPI25_SAS_HWRATE_MIN_RATE_12_0 (0x0B)
2044
2045
2046
2047/****************************************************************************
2048* SAS IO Unit Config Pages
2049****************************************************************************/
2050
2051/*SAS IO Unit Page 0 */
2052
2053typedef struct _MPI2_SAS_IO_UNIT0_PHY_DATA {
2054 U8 Port; /*0x00 */
2055 U8 PortFlags; /*0x01 */
2056 U8 PhyFlags; /*0x02 */
2057 U8 NegotiatedLinkRate; /*0x03 */
2058 U32 ControllerPhyDeviceInfo;/*0x04 */
2059 U16 AttachedDevHandle; /*0x08 */
2060 U16 ControllerDevHandle; /*0x0A */
2061 U32 DiscoveryStatus; /*0x0C */
2062 U32 Reserved; /*0x10 */
2063} MPI2_SAS_IO_UNIT0_PHY_DATA,
2064 *PTR_MPI2_SAS_IO_UNIT0_PHY_DATA,
2065 Mpi2SasIOUnit0PhyData_t,
2066 *pMpi2SasIOUnit0PhyData_t;
2067
2068/*
2069 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2070 *one and check the value returned for NumPhys at runtime.
2071 */
2072#ifndef MPI2_SAS_IOUNIT0_PHY_MAX
2073#define MPI2_SAS_IOUNIT0_PHY_MAX (1)
2074#endif
2075
2076typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_0 {
2077 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2078 U32 Reserved1;/*0x08 */
2079 U8 NumPhys; /*0x0C */
2080 U8 Reserved2;/*0x0D */
2081 U16 Reserved3;/*0x0E */
2082 MPI2_SAS_IO_UNIT0_PHY_DATA
2083 PhyData[MPI2_SAS_IOUNIT0_PHY_MAX]; /*0x10 */
2084} MPI2_CONFIG_PAGE_SASIOUNIT_0,
2085 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_0,
2086 Mpi2SasIOUnitPage0_t, *pMpi2SasIOUnitPage0_t;
2087
2088#define MPI2_SASIOUNITPAGE0_PAGEVERSION (0x05)
2089
2090/*values for SAS IO Unit Page 0 PortFlags */
2091#define MPI2_SASIOUNIT0_PORTFLAGS_DISCOVERY_IN_PROGRESS (0x08)
2092#define MPI2_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG (0x01)
2093
2094/*values for SAS IO Unit Page 0 PhyFlags */
2095#define MPI2_SASIOUNIT0_PHYFLAGS_INIT_PERSIST_CONNECT (0x40)
2096#define MPI2_SASIOUNIT0_PHYFLAGS_TARG_PERSIST_CONNECT (0x20)
2097#define MPI2_SASIOUNIT0_PHYFLAGS_ZONING_ENABLED (0x10)
2098#define MPI2_SASIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08)
2099
2100/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2101
2102/*see mpi2_sas.h for values for
2103 *SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
2104
2105/*values for SAS IO Unit Page 0 DiscoveryStatus */
2106#define MPI2_SASIOUNIT0_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
2107#define MPI2_SASIOUNIT0_DS_MAX_EXPANDERS_EXCEED (0x40000000)
2108#define MPI2_SASIOUNIT0_DS_MAX_DEVICES_EXCEED (0x20000000)
2109#define MPI2_SASIOUNIT0_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
2110#define MPI2_SASIOUNIT0_DS_DOWNSTREAM_INITIATOR (0x08000000)
2111#define MPI2_SASIOUNIT0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
2112#define MPI2_SASIOUNIT0_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
2113#define MPI2_SASIOUNIT0_DS_MULTI_PORT_DOMAIN (0x00002000)
2114#define MPI2_SASIOUNIT0_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
2115#define MPI2_SASIOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800)
2116#define MPI2_SASIOUNIT0_DS_TABLE_LINK (0x00000400)
2117#define MPI2_SASIOUNIT0_DS_SUBTRACTIVE_LINK (0x00000200)
2118#define MPI2_SASIOUNIT0_DS_SMP_CRC_ERROR (0x00000100)
2119#define MPI2_SASIOUNIT0_DS_SMP_FUNCTION_FAILED (0x00000080)
2120#define MPI2_SASIOUNIT0_DS_INDEX_NOT_EXIST (0x00000040)
2121#define MPI2_SASIOUNIT0_DS_OUT_ROUTE_ENTRIES (0x00000020)
2122#define MPI2_SASIOUNIT0_DS_SMP_TIMEOUT (0x00000010)
2123#define MPI2_SASIOUNIT0_DS_MULTIPLE_PORTS (0x00000004)
2124#define MPI2_SASIOUNIT0_DS_UNADDRESSABLE_DEVICE (0x00000002)
2125#define MPI2_SASIOUNIT0_DS_LOOP_DETECTED (0x00000001)
2126
2127
2128/*SAS IO Unit Page 1 */
2129
2130typedef struct _MPI2_SAS_IO_UNIT1_PHY_DATA {
2131 U8 Port; /*0x00 */
2132 U8 PortFlags; /*0x01 */
2133 U8 PhyFlags; /*0x02 */
2134 U8 MaxMinLinkRate; /*0x03 */
2135 U32 ControllerPhyDeviceInfo; /*0x04 */
2136 U16 MaxTargetPortConnectTime; /*0x08 */
2137 U16 Reserved1; /*0x0A */
2138} MPI2_SAS_IO_UNIT1_PHY_DATA,
2139 *PTR_MPI2_SAS_IO_UNIT1_PHY_DATA,
2140 Mpi2SasIOUnit1PhyData_t,
2141 *pMpi2SasIOUnit1PhyData_t;
2142
2143/*
2144 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2145 *one and check the value returned for NumPhys at runtime.
2146 */
2147#ifndef MPI2_SAS_IOUNIT1_PHY_MAX
2148#define MPI2_SAS_IOUNIT1_PHY_MAX (1)
2149#endif
2150
2151typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_1 {
2152 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2153 U16
2154 ControlFlags; /*0x08 */
2155 U16
2156 SASNarrowMaxQueueDepth; /*0x0A */
2157 U16
2158 AdditionalControlFlags; /*0x0C */
2159 U16
2160 SASWideMaxQueueDepth; /*0x0E */
2161 U8
2162 NumPhys; /*0x10 */
2163 U8
2164 SATAMaxQDepth; /*0x11 */
2165 U8
2166 ReportDeviceMissingDelay; /*0x12 */
2167 U8
2168 IODeviceMissingDelay; /*0x13 */
2169 MPI2_SAS_IO_UNIT1_PHY_DATA
2170 PhyData[MPI2_SAS_IOUNIT1_PHY_MAX]; /*0x14 */
2171} MPI2_CONFIG_PAGE_SASIOUNIT_1,
2172 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_1,
2173 Mpi2SasIOUnitPage1_t, *pMpi2SasIOUnitPage1_t;
2174
2175#define MPI2_SASIOUNITPAGE1_PAGEVERSION (0x09)
2176
2177/*values for SAS IO Unit Page 1 ControlFlags */
2178#define MPI2_SASIOUNIT1_CONTROL_DEVICE_SELF_TEST (0x8000)
2179#define MPI2_SASIOUNIT1_CONTROL_SATA_3_0_MAX (0x4000)
2180#define MPI2_SASIOUNIT1_CONTROL_SATA_1_5_MAX (0x2000)
2181#define MPI2_SASIOUNIT1_CONTROL_SATA_SW_PRESERVE (0x1000)
2182
2183#define MPI2_SASIOUNIT1_CONTROL_MASK_DEV_SUPPORT (0x0600)
2184#define MPI2_SASIOUNIT1_CONTROL_SHIFT_DEV_SUPPORT (9)
2185#define MPI2_SASIOUNIT1_CONTROL_DEV_SUPPORT_BOTH (0x0)
2186#define MPI2_SASIOUNIT1_CONTROL_DEV_SAS_SUPPORT (0x1)
2187#define MPI2_SASIOUNIT1_CONTROL_DEV_SATA_SUPPORT (0x2)
2188
2189#define MPI2_SASIOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED (0x0080)
2190#define MPI2_SASIOUNIT1_CONTROL_SATA_SMART_REQUIRED (0x0040)
2191#define MPI2_SASIOUNIT1_CONTROL_SATA_NCQ_REQUIRED (0x0020)
2192#define MPI2_SASIOUNIT1_CONTROL_SATA_FUA_REQUIRED (0x0010)
2193#define MPI2_SASIOUNIT1_CONTROL_TABLE_SUBTRACTIVE_ILLEGAL (0x0008)
2194#define MPI2_SASIOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL (0x0004)
2195#define MPI2_SASIOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY (0x0002)
2196#define MPI2_SASIOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001)
2197
2198/*values for SAS IO Unit Page 1 AdditionalControlFlags */
2199#define MPI2_SASIOUNIT1_ACONTROL_DA_PERSIST_CONNECT (0x0100)
2200#define MPI2_SASIOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080)
2201#define MPI2_SASIOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040)
2202#define MPI2_SASIOUNIT1_ACONTROL_INVALID_TOPOLOGY_CORRECTION (0x0020)
2203#define MPI2_SASIOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010)
2204#define MPI2_SASIOUNIT1_ACONTROL_OTHER_AFFILIATION_SATA_LINK_RESET (0x0008)
2205#define MPI2_SASIOUNIT1_ACONTROL_SELF_AFFILIATION_SATA_LINK_RESET (0x0004)
2206#define MPI2_SASIOUNIT1_ACONTROL_NO_AFFILIATION_SATA_LINK_RESET (0x0002)
2207#define MPI2_SASIOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE (0x0001)
2208
2209/*defines for SAS IO Unit Page 1 ReportDeviceMissingDelay */
2210#define MPI2_SASIOUNIT1_REPORT_MISSING_TIMEOUT_MASK (0x7F)
2211#define MPI2_SASIOUNIT1_REPORT_MISSING_UNIT_16 (0x80)
2212
2213/*values for SAS IO Unit Page 1 PortFlags */
2214#define MPI2_SASIOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG (0x01)
2215
2216/*values for SAS IO Unit Page 1 PhyFlags */
2217#define MPI2_SASIOUNIT1_PHYFLAGS_INIT_PERSIST_CONNECT (0x40)
2218#define MPI2_SASIOUNIT1_PHYFLAGS_TARG_PERSIST_CONNECT (0x20)
2219#define MPI2_SASIOUNIT1_PHYFLAGS_ZONING_ENABLE (0x10)
2220#define MPI2_SASIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08)
2221
2222/*values for SAS IO Unit Page 1 MaxMinLinkRate */
2223#define MPI2_SASIOUNIT1_MAX_RATE_MASK (0xF0)
2224#define MPI2_SASIOUNIT1_MAX_RATE_1_5 (0x80)
2225#define MPI2_SASIOUNIT1_MAX_RATE_3_0 (0x90)
2226#define MPI2_SASIOUNIT1_MAX_RATE_6_0 (0xA0)
2227#define MPI25_SASIOUNIT1_MAX_RATE_12_0 (0xB0)
2228#define MPI2_SASIOUNIT1_MIN_RATE_MASK (0x0F)
2229#define MPI2_SASIOUNIT1_MIN_RATE_1_5 (0x08)
2230#define MPI2_SASIOUNIT1_MIN_RATE_3_0 (0x09)
2231#define MPI2_SASIOUNIT1_MIN_RATE_6_0 (0x0A)
2232#define MPI25_SASIOUNIT1_MIN_RATE_12_0 (0x0B)
2233
2234/*see mpi2_sas.h for values for
2235 *SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
2236
2237
2238/*SAS IO Unit Page 4 (for MPI v2.5 and earlier) */
2239
2240typedef struct _MPI2_SAS_IOUNIT4_SPINUP_GROUP {
2241 U8 MaxTargetSpinup; /*0x00 */
2242 U8 SpinupDelay; /*0x01 */
2243 U8 SpinupFlags; /*0x02 */
2244 U8 Reserved1; /*0x03 */
2245} MPI2_SAS_IOUNIT4_SPINUP_GROUP,
2246 *PTR_MPI2_SAS_IOUNIT4_SPINUP_GROUP,
2247 Mpi2SasIOUnit4SpinupGroup_t,
2248 *pMpi2SasIOUnit4SpinupGroup_t;
2249/*defines for SAS IO Unit Page 4 SpinupFlags */
2250#define MPI2_SASIOUNIT4_SPINUP_DISABLE_FLAG (0x01)
2251
2252
2253/*
2254 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2255 *one and check the value returned for NumPhys at runtime.
2256 */
2257#ifndef MPI2_SAS_IOUNIT4_PHY_MAX
2258#define MPI2_SAS_IOUNIT4_PHY_MAX (4)
2259#endif
2260
2261typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_4 {
2262 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header;/*0x00 */
2263 MPI2_SAS_IOUNIT4_SPINUP_GROUP
2264 SpinupGroupParameters[4]; /*0x08 */
2265 U32
2266 Reserved1; /*0x18 */
2267 U32
2268 Reserved2; /*0x1C */
2269 U32
2270 Reserved3; /*0x20 */
2271 U8
2272 BootDeviceWaitTime; /*0x24 */
2273 U8
2274 Reserved4; /*0x25 */
2275 U16
2276 Reserved5; /*0x26 */
2277 U8
2278 NumPhys; /*0x28 */
2279 U8
2280 PEInitialSpinupDelay; /*0x29 */
2281 U8
2282 PEReplyDelay; /*0x2A */
2283 U8
2284 Flags; /*0x2B */
2285 U8
2286 PHY[MPI2_SAS_IOUNIT4_PHY_MAX]; /*0x2C */
2287} MPI2_CONFIG_PAGE_SASIOUNIT_4,
2288 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_4,
2289 Mpi2SasIOUnitPage4_t, *pMpi2SasIOUnitPage4_t;
2290
2291#define MPI2_SASIOUNITPAGE4_PAGEVERSION (0x02)
2292
2293/*defines for Flags field */
2294#define MPI2_SASIOUNIT4_FLAGS_AUTO_PORTENABLE (0x01)
2295
2296/*defines for PHY field */
2297#define MPI2_SASIOUNIT4_PHY_SPINUP_GROUP_MASK (0x03)
2298
2299
2300/*SAS IO Unit Page 5 */
2301
2302typedef struct _MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS {
2303 U8 ControlFlags; /*0x00 */
2304 U8 PortWidthModGroup; /*0x01 */
2305 U16 InactivityTimerExponent; /*0x02 */
2306 U8 SATAPartialTimeout; /*0x04 */
2307 U8 Reserved2; /*0x05 */
2308 U8 SATASlumberTimeout; /*0x06 */
2309 U8 Reserved3; /*0x07 */
2310 U8 SASPartialTimeout; /*0x08 */
2311 U8 Reserved4; /*0x09 */
2312 U8 SASSlumberTimeout; /*0x0A */
2313 U8 Reserved5; /*0x0B */
2314} MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
2315 *PTR_MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS,
2316 Mpi2SasIOUnit5PhyPmSettings_t,
2317 *pMpi2SasIOUnit5PhyPmSettings_t;
2318
2319/*defines for ControlFlags field */
2320#define MPI2_SASIOUNIT5_CONTROL_SAS_SLUMBER_ENABLE (0x08)
2321#define MPI2_SASIOUNIT5_CONTROL_SAS_PARTIAL_ENABLE (0x04)
2322#define MPI2_SASIOUNIT5_CONTROL_SATA_SLUMBER_ENABLE (0x02)
2323#define MPI2_SASIOUNIT5_CONTROL_SATA_PARTIAL_ENABLE (0x01)
2324
2325/*defines for PortWidthModeGroup field */
2326#define MPI2_SASIOUNIT5_PWMG_DISABLE (0xFF)
2327
2328/*defines for InactivityTimerExponent field */
2329#define MPI2_SASIOUNIT5_ITE_MASK_SAS_SLUMBER (0x7000)
2330#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_SLUMBER (12)
2331#define MPI2_SASIOUNIT5_ITE_MASK_SAS_PARTIAL (0x0700)
2332#define MPI2_SASIOUNIT5_ITE_SHIFT_SAS_PARTIAL (8)
2333#define MPI2_SASIOUNIT5_ITE_MASK_SATA_SLUMBER (0x0070)
2334#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_SLUMBER (4)
2335#define MPI2_SASIOUNIT5_ITE_MASK_SATA_PARTIAL (0x0007)
2336#define MPI2_SASIOUNIT5_ITE_SHIFT_SATA_PARTIAL (0)
2337
2338#define MPI2_SASIOUNIT5_ITE_TEN_SECONDS (7)
2339#define MPI2_SASIOUNIT5_ITE_ONE_SECOND (6)
2340#define MPI2_SASIOUNIT5_ITE_HUNDRED_MILLISECONDS (5)
2341#define MPI2_SASIOUNIT5_ITE_TEN_MILLISECONDS (4)
2342#define MPI2_SASIOUNIT5_ITE_ONE_MILLISECOND (3)
2343#define MPI2_SASIOUNIT5_ITE_HUNDRED_MICROSECONDS (2)
2344#define MPI2_SASIOUNIT5_ITE_TEN_MICROSECONDS (1)
2345#define MPI2_SASIOUNIT5_ITE_ONE_MICROSECOND (0)
2346
2347/*
2348 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2349 *one and check the value returned for NumPhys at runtime.
2350 */
2351#ifndef MPI2_SAS_IOUNIT5_PHY_MAX
2352#define MPI2_SAS_IOUNIT5_PHY_MAX (1)
2353#endif
2354
2355typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_5 {
2356 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2357 U8 NumPhys; /*0x08 */
2358 U8 Reserved1;/*0x09 */
2359 U16 Reserved2;/*0x0A */
2360 U32 Reserved3;/*0x0C */
2361 MPI2_SAS_IO_UNIT5_PHY_PM_SETTINGS
2362 SASPhyPowerManagementSettings[MPI2_SAS_IOUNIT5_PHY_MAX];/*0x10 */
2363} MPI2_CONFIG_PAGE_SASIOUNIT_5,
2364 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_5,
2365 Mpi2SasIOUnitPage5_t, *pMpi2SasIOUnitPage5_t;
2366
2367#define MPI2_SASIOUNITPAGE5_PAGEVERSION (0x01)
2368
2369
2370/*SAS IO Unit Page 6 */
2371
2372typedef struct _MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS {
2373 U8 CurrentStatus; /*0x00 */
2374 U8 CurrentModulation; /*0x01 */
2375 U8 CurrentUtilization; /*0x02 */
2376 U8 Reserved1; /*0x03 */
2377 U32 Reserved2; /*0x04 */
2378} MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
2379 *PTR_MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS,
2380 Mpi2SasIOUnit6PortWidthModGroupStatus_t,
2381 *pMpi2SasIOUnit6PortWidthModGroupStatus_t;
2382
2383/*defines for CurrentStatus field */
2384#define MPI2_SASIOUNIT6_STATUS_UNAVAILABLE (0x00)
2385#define MPI2_SASIOUNIT6_STATUS_UNCONFIGURED (0x01)
2386#define MPI2_SASIOUNIT6_STATUS_INVALID_CONFIG (0x02)
2387#define MPI2_SASIOUNIT6_STATUS_LINK_DOWN (0x03)
2388#define MPI2_SASIOUNIT6_STATUS_OBSERVATION_ONLY (0x04)
2389#define MPI2_SASIOUNIT6_STATUS_INACTIVE (0x05)
2390#define MPI2_SASIOUNIT6_STATUS_ACTIVE_IOUNIT (0x06)
2391#define MPI2_SASIOUNIT6_STATUS_ACTIVE_HOST (0x07)
2392
2393/*defines for CurrentModulation field */
2394#define MPI2_SASIOUNIT6_MODULATION_25_PERCENT (0x00)
2395#define MPI2_SASIOUNIT6_MODULATION_50_PERCENT (0x01)
2396#define MPI2_SASIOUNIT6_MODULATION_75_PERCENT (0x02)
2397#define MPI2_SASIOUNIT6_MODULATION_100_PERCENT (0x03)
2398
2399/*
2400 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2401 *one and check the value returned for NumGroups at runtime.
2402 */
2403#ifndef MPI2_SAS_IOUNIT6_GROUP_MAX
2404#define MPI2_SAS_IOUNIT6_GROUP_MAX (1)
2405#endif
2406
2407typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_6 {
2408 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2409 U32 Reserved1; /*0x08 */
2410 U32 Reserved2; /*0x0C */
2411 U8 NumGroups; /*0x10 */
2412 U8 Reserved3; /*0x11 */
2413 U16 Reserved4; /*0x12 */
2414 MPI2_SAS_IO_UNIT6_PORT_WIDTH_MOD_GROUP_STATUS
2415 PortWidthModulationGroupStatus[MPI2_SAS_IOUNIT6_GROUP_MAX]; /*0x14 */
2416} MPI2_CONFIG_PAGE_SASIOUNIT_6,
2417 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_6,
2418 Mpi2SasIOUnitPage6_t, *pMpi2SasIOUnitPage6_t;
2419
2420#define MPI2_SASIOUNITPAGE6_PAGEVERSION (0x00)
2421
2422
2423/*SAS IO Unit Page 7 */
2424
2425typedef struct _MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS {
2426 U8 Flags; /*0x00 */
2427 U8 Reserved1; /*0x01 */
2428 U16 Reserved2; /*0x02 */
2429 U8 Threshold75Pct; /*0x04 */
2430 U8 Threshold50Pct; /*0x05 */
2431 U8 Threshold25Pct; /*0x06 */
2432 U8 Reserved3; /*0x07 */
2433} MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
2434 *PTR_MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS,
2435 Mpi2SasIOUnit7PortWidthModGroupSettings_t,
2436 *pMpi2SasIOUnit7PortWidthModGroupSettings_t;
2437
2438/*defines for Flags field */
2439#define MPI2_SASIOUNIT7_FLAGS_ENABLE_PORT_WIDTH_MODULATION (0x01)
2440
2441
2442/*
2443 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2444 *one and check the value returned for NumGroups at runtime.
2445 */
2446#ifndef MPI2_SAS_IOUNIT7_GROUP_MAX
2447#define MPI2_SAS_IOUNIT7_GROUP_MAX (1)
2448#endif
2449
2450typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_7 {
2451 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
2452 U8 SamplingInterval; /*0x08 */
2453 U8 WindowLength; /*0x09 */
2454 U16 Reserved1; /*0x0A */
2455 U32 Reserved2; /*0x0C */
2456 U32 Reserved3; /*0x10 */
2457 U8 NumGroups; /*0x14 */
2458 U8 Reserved4; /*0x15 */
2459 U16 Reserved5; /*0x16 */
2460 MPI2_SAS_IO_UNIT7_PORT_WIDTH_MOD_GROUP_SETTINGS
2461 PortWidthModulationGroupSettings[MPI2_SAS_IOUNIT7_GROUP_MAX];/*0x18 */
2462} MPI2_CONFIG_PAGE_SASIOUNIT_7,
2463 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_7,
2464 Mpi2SasIOUnitPage7_t, *pMpi2SasIOUnitPage7_t;
2465
2466#define MPI2_SASIOUNITPAGE7_PAGEVERSION (0x00)
2467
2468
2469/*SAS IO Unit Page 8 */
2470
2471typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_8 {
2472 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2473 Header; /*0x00 */
2474 U32
2475 Reserved1; /*0x08 */
2476 U32
2477 PowerManagementCapabilities; /*0x0C */
2478 U8
2479 TxRxSleepStatus; /*0x10 */
2480 U8
2481 Reserved2; /*0x11 */
2482 U16
2483 Reserved3; /*0x12 */
2484} MPI2_CONFIG_PAGE_SASIOUNIT_8,
2485 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT_8,
2486 Mpi2SasIOUnitPage8_t, *pMpi2SasIOUnitPage8_t;
2487
2488#define MPI2_SASIOUNITPAGE8_PAGEVERSION (0x00)
2489
2490/*defines for PowerManagementCapabilities field */
2491#define MPI2_SASIOUNIT8_PM_HOST_PORT_WIDTH_MOD (0x00001000)
2492#define MPI2_SASIOUNIT8_PM_HOST_SAS_SLUMBER_MODE (0x00000800)
2493#define MPI2_SASIOUNIT8_PM_HOST_SAS_PARTIAL_MODE (0x00000400)
2494#define MPI2_SASIOUNIT8_PM_HOST_SATA_SLUMBER_MODE (0x00000200)
2495#define MPI2_SASIOUNIT8_PM_HOST_SATA_PARTIAL_MODE (0x00000100)
2496#define MPI2_SASIOUNIT8_PM_IOUNIT_PORT_WIDTH_MOD (0x00000010)
2497#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_SLUMBER_MODE (0x00000008)
2498#define MPI2_SASIOUNIT8_PM_IOUNIT_SAS_PARTIAL_MODE (0x00000004)
2499#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_SLUMBER_MODE (0x00000002)
2500#define MPI2_SASIOUNIT8_PM_IOUNIT_SATA_PARTIAL_MODE (0x00000001)
2501
2502/*defines for TxRxSleepStatus field */
2503#define MPI25_SASIOUNIT8_TXRXSLEEP_UNSUPPORTED (0x00)
2504#define MPI25_SASIOUNIT8_TXRXSLEEP_DISENGAGED (0x01)
2505#define MPI25_SASIOUNIT8_TXRXSLEEP_ACTIVE (0x02)
2506#define MPI25_SASIOUNIT8_TXRXSLEEP_SHUTDOWN (0x03)
2507
2508
2509
2510/*SAS IO Unit Page 16 */
2511
2512typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT16 {
2513 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2514 Header; /*0x00 */
2515 U64
2516 TimeStamp; /*0x08 */
2517 U32
2518 Reserved1; /*0x10 */
2519 U32
2520 Reserved2; /*0x14 */
2521 U32
2522 FastPathPendedRequests; /*0x18 */
2523 U32
2524 FastPathUnPendedRequests; /*0x1C */
2525 U32
2526 FastPathHostRequestStarts; /*0x20 */
2527 U32
2528 FastPathFirmwareRequestStarts; /*0x24 */
2529 U32
2530 FastPathHostCompletions; /*0x28 */
2531 U32
2532 FastPathFirmwareCompletions; /*0x2C */
2533 U32
2534 NonFastPathRequestStarts; /*0x30 */
2535 U32
2536 NonFastPathHostCompletions; /*0x30 */
2537} MPI2_CONFIG_PAGE_SASIOUNIT16,
2538 *PTR_MPI2_CONFIG_PAGE_SASIOUNIT16,
2539 Mpi2SasIOUnitPage16_t, *pMpi2SasIOUnitPage16_t;
2540
2541#define MPI2_SASIOUNITPAGE16_PAGEVERSION (0x00)
2542
2543
2544/****************************************************************************
2545* SAS Expander Config Pages
2546****************************************************************************/
2547
2548/*SAS Expander Page 0 */
2549
2550typedef struct _MPI2_CONFIG_PAGE_EXPANDER_0 {
2551 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2552 Header; /*0x00 */
2553 U8
2554 PhysicalPort; /*0x08 */
2555 U8
2556 ReportGenLength; /*0x09 */
2557 U16
2558 EnclosureHandle; /*0x0A */
2559 U64
2560 SASAddress; /*0x0C */
2561 U32
2562 DiscoveryStatus; /*0x14 */
2563 U16
2564 DevHandle; /*0x18 */
2565 U16
2566 ParentDevHandle; /*0x1A */
2567 U16
2568 ExpanderChangeCount; /*0x1C */
2569 U16
2570 ExpanderRouteIndexes; /*0x1E */
2571 U8
2572 NumPhys; /*0x20 */
2573 U8
2574 SASLevel; /*0x21 */
2575 U16
2576 Flags; /*0x22 */
2577 U16
2578 STPBusInactivityTimeLimit; /*0x24 */
2579 U16
2580 STPMaxConnectTimeLimit; /*0x26 */
2581 U16
2582 STP_SMP_NexusLossTime; /*0x28 */
2583 U16
2584 MaxNumRoutedSasAddresses; /*0x2A */
2585 U64
2586 ActiveZoneManagerSASAddress;/*0x2C */
2587 U16
2588 ZoneLockInactivityLimit; /*0x34 */
2589 U16
2590 Reserved1; /*0x36 */
2591 U8
2592 TimeToReducedFunc; /*0x38 */
2593 U8
2594 InitialTimeToReducedFunc; /*0x39 */
2595 U8
2596 MaxReducedFuncTime; /*0x3A */
2597 U8
2598 Reserved2; /*0x3B */
2599} MPI2_CONFIG_PAGE_EXPANDER_0,
2600 *PTR_MPI2_CONFIG_PAGE_EXPANDER_0,
2601 Mpi2ExpanderPage0_t, *pMpi2ExpanderPage0_t;
2602
2603#define MPI2_SASEXPANDER0_PAGEVERSION (0x06)
2604
2605/*values for SAS Expander Page 0 DiscoveryStatus field */
2606#define MPI2_SAS_EXPANDER0_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
2607#define MPI2_SAS_EXPANDER0_DS_MAX_EXPANDERS_EXCEED (0x40000000)
2608#define MPI2_SAS_EXPANDER0_DS_MAX_DEVICES_EXCEED (0x20000000)
2609#define MPI2_SAS_EXPANDER0_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
2610#define MPI2_SAS_EXPANDER0_DS_DOWNSTREAM_INITIATOR (0x08000000)
2611#define MPI2_SAS_EXPANDER0_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
2612#define MPI2_SAS_EXPANDER0_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
2613#define MPI2_SAS_EXPANDER0_DS_MULTI_PORT_DOMAIN (0x00002000)
2614#define MPI2_SAS_EXPANDER0_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
2615#define MPI2_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800)
2616#define MPI2_SAS_EXPANDER0_DS_TABLE_LINK (0x00000400)
2617#define MPI2_SAS_EXPANDER0_DS_SUBTRACTIVE_LINK (0x00000200)
2618#define MPI2_SAS_EXPANDER0_DS_SMP_CRC_ERROR (0x00000100)
2619#define MPI2_SAS_EXPANDER0_DS_SMP_FUNCTION_FAILED (0x00000080)
2620#define MPI2_SAS_EXPANDER0_DS_INDEX_NOT_EXIST (0x00000040)
2621#define MPI2_SAS_EXPANDER0_DS_OUT_ROUTE_ENTRIES (0x00000020)
2622#define MPI2_SAS_EXPANDER0_DS_SMP_TIMEOUT (0x00000010)
2623#define MPI2_SAS_EXPANDER0_DS_MULTIPLE_PORTS (0x00000004)
2624#define MPI2_SAS_EXPANDER0_DS_UNADDRESSABLE_DEVICE (0x00000002)
2625#define MPI2_SAS_EXPANDER0_DS_LOOP_DETECTED (0x00000001)
2626
2627/*values for SAS Expander Page 0 Flags field */
2628#define MPI2_SAS_EXPANDER0_FLAGS_REDUCED_FUNCTIONALITY (0x2000)
2629#define MPI2_SAS_EXPANDER0_FLAGS_ZONE_LOCKED (0x1000)
2630#define MPI2_SAS_EXPANDER0_FLAGS_SUPPORTED_PHYSICAL_PRES (0x0800)
2631#define MPI2_SAS_EXPANDER0_FLAGS_ASSERTED_PHYSICAL_PRES (0x0400)
2632#define MPI2_SAS_EXPANDER0_FLAGS_ZONING_SUPPORT (0x0200)
2633#define MPI2_SAS_EXPANDER0_FLAGS_ENABLED_ZONING (0x0100)
2634#define MPI2_SAS_EXPANDER0_FLAGS_TABLE_TO_TABLE_SUPPORT (0x0080)
2635#define MPI2_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x0010)
2636#define MPI2_SAS_EXPANDER0_FLAGS_OTHERS_CONFIG (0x0004)
2637#define MPI2_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x0002)
2638#define MPI2_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x0001)
2639
2640
2641/*SAS Expander Page 1 */
2642
2643typedef struct _MPI2_CONFIG_PAGE_EXPANDER_1 {
2644 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2645 Header; /*0x00 */
2646 U8
2647 PhysicalPort; /*0x08 */
2648 U8
2649 Reserved1; /*0x09 */
2650 U16
2651 Reserved2; /*0x0A */
2652 U8
2653 NumPhys; /*0x0C */
2654 U8
2655 Phy; /*0x0D */
2656 U16
2657 NumTableEntriesProgrammed; /*0x0E */
2658 U8
2659 ProgrammedLinkRate; /*0x10 */
2660 U8
2661 HwLinkRate; /*0x11 */
2662 U16
2663 AttachedDevHandle; /*0x12 */
2664 U32
2665 PhyInfo; /*0x14 */
2666 U32
2667 AttachedDeviceInfo; /*0x18 */
2668 U16
2669 ExpanderDevHandle; /*0x1C */
2670 U8
2671 ChangeCount; /*0x1E */
2672 U8
2673 NegotiatedLinkRate; /*0x1F */
2674 U8
2675 PhyIdentifier; /*0x20 */
2676 U8
2677 AttachedPhyIdentifier; /*0x21 */
2678 U8
2679 Reserved3; /*0x22 */
2680 U8
2681 DiscoveryInfo; /*0x23 */
2682 U32
2683 AttachedPhyInfo; /*0x24 */
2684 U8
2685 ZoneGroup; /*0x28 */
2686 U8
2687 SelfConfigStatus; /*0x29 */
2688 U16
2689 Reserved4; /*0x2A */
2690} MPI2_CONFIG_PAGE_EXPANDER_1,
2691 *PTR_MPI2_CONFIG_PAGE_EXPANDER_1,
2692 Mpi2ExpanderPage1_t, *pMpi2ExpanderPage1_t;
2693
2694#define MPI2_SASEXPANDER1_PAGEVERSION (0x02)
2695
2696/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
2697
2698/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
2699
2700/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
2701
2702/*see mpi2_sas.h for the MPI2_SAS_DEVICE_INFO_ defines
2703 *used for the AttachedDeviceInfo field */
2704
2705/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2706
2707/*values for SAS Expander Page 1 DiscoveryInfo field */
2708#define MPI2_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04)
2709#define MPI2_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02)
2710#define MPI2_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01)
2711
2712/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
2713
2714
2715/****************************************************************************
2716* SAS Device Config Pages
2717****************************************************************************/
2718
2719/*SAS Device Page 0 */
2720
2721typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
2722 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2723 Header; /*0x00 */
2724 U16
2725 Slot; /*0x08 */
2726 U16
2727 EnclosureHandle; /*0x0A */
2728 U64
2729 SASAddress; /*0x0C */
2730 U16
2731 ParentDevHandle; /*0x14 */
2732 U8
2733 PhyNum; /*0x16 */
2734 U8
2735 AccessStatus; /*0x17 */
2736 U16
2737 DevHandle; /*0x18 */
2738 U8
2739 AttachedPhyIdentifier; /*0x1A */
2740 U8
2741 ZoneGroup; /*0x1B */
2742 U32
2743 DeviceInfo; /*0x1C */
2744 U16
2745 Flags; /*0x20 */
2746 U8
2747 PhysicalPort; /*0x22 */
2748 U8
2749 MaxPortConnections; /*0x23 */
2750 U64
2751 DeviceName; /*0x24 */
2752 U8
2753 PortGroups; /*0x2C */
2754 U8
2755 DmaGroup; /*0x2D */
2756 U8
2757 ControlGroup; /*0x2E */
2758 U8
2759 EnclosureLevel; /*0x2F */
2760 U32
2761 ConnectorName[4]; /*0x30 */
2762 U32
2763 Reserved3; /*0x34 */
2764} MPI2_CONFIG_PAGE_SAS_DEV_0,
2765 *PTR_MPI2_CONFIG_PAGE_SAS_DEV_0,
2766 Mpi2SasDevicePage0_t,
2767 *pMpi2SasDevicePage0_t;
2768
2769#define MPI2_SASDEVICE0_PAGEVERSION (0x09)
2770
2771/*values for SAS Device Page 0 AccessStatus field */
2772#define MPI2_SAS_DEVICE0_ASTATUS_NO_ERRORS (0x00)
2773#define MPI2_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED (0x01)
2774#define MPI2_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED (0x02)
2775#define MPI2_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT (0x03)
2776#define MPI2_SAS_DEVICE0_ASTATUS_SATA_NEEDS_INITIALIZATION (0x04)
2777#define MPI2_SAS_DEVICE0_ASTATUS_ROUTE_NOT_ADDRESSABLE (0x05)
2778#define MPI2_SAS_DEVICE0_ASTATUS_SMP_ERROR_NOT_ADDRESSABLE (0x06)
2779#define MPI2_SAS_DEVICE0_ASTATUS_DEVICE_BLOCKED (0x07)
2780/*specific values for SATA Init failures */
2781#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN (0x10)
2782#define MPI2_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT (0x11)
2783#define MPI2_SAS_DEVICE0_ASTATUS_SIF_DIAG (0x12)
2784#define MPI2_SAS_DEVICE0_ASTATUS_SIF_IDENTIFICATION (0x13)
2785#define MPI2_SAS_DEVICE0_ASTATUS_SIF_CHECK_POWER (0x14)
2786#define MPI2_SAS_DEVICE0_ASTATUS_SIF_PIO_SN (0x15)
2787#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MDMA_SN (0x16)
2788#define MPI2_SAS_DEVICE0_ASTATUS_SIF_UDMA_SN (0x17)
2789#define MPI2_SAS_DEVICE0_ASTATUS_SIF_ZONING_VIOLATION (0x18)
2790#define MPI2_SAS_DEVICE0_ASTATUS_SIF_NOT_ADDRESSABLE (0x19)
2791#define MPI2_SAS_DEVICE0_ASTATUS_SIF_MAX (0x1F)
2792
2793/*see mpi2_sas.h for values for SAS Device Page 0 DeviceInfo values */
2794
2795/*values for SAS Device Page 0 Flags field */
2796#define MPI2_SAS_DEVICE0_FLAGS_UNAUTHORIZED_DEVICE (0x8000)
2797#define MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH (0x4000)
2798#define MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE (0x2000)
2799#define MPI2_SAS_DEVICE0_FLAGS_SLUMBER_PM_CAPABLE (0x1000)
2800#define MPI2_SAS_DEVICE0_FLAGS_PARTIAL_PM_CAPABLE (0x0800)
2801#define MPI2_SAS_DEVICE0_FLAGS_SATA_ASYNCHRONOUS_NOTIFY (0x0400)
2802#define MPI2_SAS_DEVICE0_FLAGS_SATA_SW_PRESERVE (0x0200)
2803#define MPI2_SAS_DEVICE0_FLAGS_UNSUPPORTED_DEVICE (0x0100)
2804#define MPI2_SAS_DEVICE0_FLAGS_SATA_48BIT_LBA_SUPPORTED (0x0080)
2805#define MPI2_SAS_DEVICE0_FLAGS_SATA_SMART_SUPPORTED (0x0040)
2806#define MPI2_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED (0x0020)
2807#define MPI2_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED (0x0010)
2808#define MPI2_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH (0x0008)
2809#define MPI2_SAS_DEVICE0_FLAGS_PERSIST_CAPABLE (0x0004)
2810#define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID (0x0002)
2811#define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001)
2812
2813
2814/*SAS Device Page 1 */
2815
2816typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1 {
2817 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2818 Header; /*0x00 */
2819 U32
2820 Reserved1; /*0x08 */
2821 U64
2822 SASAddress; /*0x0C */
2823 U32
2824 Reserved2; /*0x14 */
2825 U16
2826 DevHandle; /*0x18 */
2827 U16
2828 Reserved3; /*0x1A */
2829 U8
2830 InitialRegDeviceFIS[20];/*0x1C */
2831} MPI2_CONFIG_PAGE_SAS_DEV_1,
2832 *PTR_MPI2_CONFIG_PAGE_SAS_DEV_1,
2833 Mpi2SasDevicePage1_t,
2834 *pMpi2SasDevicePage1_t;
2835
2836#define MPI2_SASDEVICE1_PAGEVERSION (0x01)
2837
2838
2839/****************************************************************************
2840* SAS PHY Config Pages
2841****************************************************************************/
2842
2843/*SAS PHY Page 0 */
2844
2845typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_0 {
2846 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2847 Header; /*0x00 */
2848 U16
2849 OwnerDevHandle; /*0x08 */
2850 U16
2851 Reserved1; /*0x0A */
2852 U16
2853 AttachedDevHandle; /*0x0C */
2854 U8
2855 AttachedPhyIdentifier; /*0x0E */
2856 U8
2857 Reserved2; /*0x0F */
2858 U32
2859 AttachedPhyInfo; /*0x10 */
2860 U8
2861 ProgrammedLinkRate; /*0x14 */
2862 U8
2863 HwLinkRate; /*0x15 */
2864 U8
2865 ChangeCount; /*0x16 */
2866 U8
2867 Flags; /*0x17 */
2868 U32
2869 PhyInfo; /*0x18 */
2870 U8
2871 NegotiatedLinkRate; /*0x1C */
2872 U8
2873 Reserved3; /*0x1D */
2874 U16
2875 Reserved4; /*0x1E */
2876} MPI2_CONFIG_PAGE_SAS_PHY_0,
2877 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_0,
2878 Mpi2SasPhyPage0_t, *pMpi2SasPhyPage0_t;
2879
2880#define MPI2_SASPHY0_PAGEVERSION (0x03)
2881
2882/*use MPI2_SAS_APHYINFO_ defines for AttachedPhyInfo field */
2883
2884/*use MPI2_SAS_PRATE_ defines for the ProgrammedLinkRate field */
2885
2886/*use MPI2_SAS_HWRATE_ defines for the HwLinkRate field */
2887
2888/*values for SAS PHY Page 0 Flags field */
2889#define MPI2_SAS_PHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC (0x01)
2890
2891/*use MPI2_SAS_PHYINFO_ for the PhyInfo field */
2892
2893/*use MPI2_SAS_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
2894
2895
2896/*SAS PHY Page 1 */
2897
2898typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_1 {
2899 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2900 Header; /*0x00 */
2901 U32
2902 Reserved1; /*0x08 */
2903 U32
2904 InvalidDwordCount; /*0x0C */
2905 U32
2906 RunningDisparityErrorCount; /*0x10 */
2907 U32
2908 LossDwordSynchCount; /*0x14 */
2909 U32
2910 PhyResetProblemCount; /*0x18 */
2911} MPI2_CONFIG_PAGE_SAS_PHY_1,
2912 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_1,
2913 Mpi2SasPhyPage1_t, *pMpi2SasPhyPage1_t;
2914
2915#define MPI2_SASPHY1_PAGEVERSION (0x01)
2916
2917
2918/*SAS PHY Page 2 */
2919
2920typedef struct _MPI2_SASPHY2_PHY_EVENT {
2921 U8 PhyEventCode; /*0x00 */
2922 U8 Reserved1; /*0x01 */
2923 U16 Reserved2; /*0x02 */
2924 U32 PhyEventInfo; /*0x04 */
2925} MPI2_SASPHY2_PHY_EVENT, *PTR_MPI2_SASPHY2_PHY_EVENT,
2926 Mpi2SasPhy2PhyEvent_t, *pMpi2SasPhy2PhyEvent_t;
2927
2928/*use MPI2_SASPHY3_EVENT_CODE_ for the PhyEventCode field */
2929
2930
2931/*
2932 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
2933 *one and check the value returned for NumPhyEvents at runtime.
2934 */
2935#ifndef MPI2_SASPHY2_PHY_EVENT_MAX
2936#define MPI2_SASPHY2_PHY_EVENT_MAX (1)
2937#endif
2938
2939typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_2 {
2940 MPI2_CONFIG_EXTENDED_PAGE_HEADER
2941 Header; /*0x00 */
2942 U32
2943 Reserved1; /*0x08 */
2944 U8
2945 NumPhyEvents; /*0x0C */
2946 U8
2947 Reserved2; /*0x0D */
2948 U16
2949 Reserved3; /*0x0E */
2950 MPI2_SASPHY2_PHY_EVENT
2951 PhyEvent[MPI2_SASPHY2_PHY_EVENT_MAX]; /*0x10 */
2952} MPI2_CONFIG_PAGE_SAS_PHY_2,
2953 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_2,
2954 Mpi2SasPhyPage2_t,
2955 *pMpi2SasPhyPage2_t;
2956
2957#define MPI2_SASPHY2_PAGEVERSION (0x00)
2958
2959
2960/*SAS PHY Page 3 */
2961
2962typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG {
2963 U8 PhyEventCode; /*0x00 */
2964 U8 Reserved1; /*0x01 */
2965 U16 Reserved2; /*0x02 */
2966 U8 CounterType; /*0x04 */
2967 U8 ThresholdWindow; /*0x05 */
2968 U8 TimeUnits; /*0x06 */
2969 U8 Reserved3; /*0x07 */
2970 U32 EventThreshold; /*0x08 */
2971 U16 ThresholdFlags; /*0x0C */
2972 U16 Reserved4; /*0x0E */
2973} MPI2_SASPHY3_PHY_EVENT_CONFIG,
2974 *PTR_MPI2_SASPHY3_PHY_EVENT_CONFIG,
2975 Mpi2SasPhy3PhyEventConfig_t,
2976 *pMpi2SasPhy3PhyEventConfig_t;
2977
2978/*values for PhyEventCode field */
2979#define MPI2_SASPHY3_EVENT_CODE_NO_EVENT (0x00)
2980#define MPI2_SASPHY3_EVENT_CODE_INVALID_DWORD (0x01)
2981#define MPI2_SASPHY3_EVENT_CODE_RUNNING_DISPARITY_ERROR (0x02)
2982#define MPI2_SASPHY3_EVENT_CODE_LOSS_DWORD_SYNC (0x03)
2983#define MPI2_SASPHY3_EVENT_CODE_PHY_RESET_PROBLEM (0x04)
2984#define MPI2_SASPHY3_EVENT_CODE_ELASTICITY_BUF_OVERFLOW (0x05)
2985#define MPI2_SASPHY3_EVENT_CODE_RX_ERROR (0x06)
2986#define MPI2_SASPHY3_EVENT_CODE_RX_ADDR_FRAME_ERROR (0x20)
2987#define MPI2_SASPHY3_EVENT_CODE_TX_AC_OPEN_REJECT (0x21)
2988#define MPI2_SASPHY3_EVENT_CODE_RX_AC_OPEN_REJECT (0x22)
2989#define MPI2_SASPHY3_EVENT_CODE_TX_RC_OPEN_REJECT (0x23)
2990#define MPI2_SASPHY3_EVENT_CODE_RX_RC_OPEN_REJECT (0x24)
2991#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_PARTIAL_WAITING_ON (0x25)
2992#define MPI2_SASPHY3_EVENT_CODE_RX_AIP_CONNECT_WAITING_ON (0x26)
2993#define MPI2_SASPHY3_EVENT_CODE_TX_BREAK (0x27)
2994#define MPI2_SASPHY3_EVENT_CODE_RX_BREAK (0x28)
2995#define MPI2_SASPHY3_EVENT_CODE_BREAK_TIMEOUT (0x29)
2996#define MPI2_SASPHY3_EVENT_CODE_CONNECTION (0x2A)
2997#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_PATHWAY_BLOCKED (0x2B)
2998#define MPI2_SASPHY3_EVENT_CODE_PEAKTX_ARB_WAIT_TIME (0x2C)
2999#define MPI2_SASPHY3_EVENT_CODE_PEAK_ARB_WAIT_TIME (0x2D)
3000#define MPI2_SASPHY3_EVENT_CODE_PEAK_CONNECT_TIME (0x2E)
3001#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_FRAMES (0x40)
3002#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_FRAMES (0x41)
3003#define MPI2_SASPHY3_EVENT_CODE_TX_SSP_ERROR_FRAMES (0x42)
3004#define MPI2_SASPHY3_EVENT_CODE_RX_SSP_ERROR_FRAMES (0x43)
3005#define MPI2_SASPHY3_EVENT_CODE_TX_CREDIT_BLOCKED (0x44)
3006#define MPI2_SASPHY3_EVENT_CODE_RX_CREDIT_BLOCKED (0x45)
3007#define MPI2_SASPHY3_EVENT_CODE_TX_SATA_FRAMES (0x50)
3008#define MPI2_SASPHY3_EVENT_CODE_RX_SATA_FRAMES (0x51)
3009#define MPI2_SASPHY3_EVENT_CODE_SATA_OVERFLOW (0x52)
3010#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_FRAMES (0x60)
3011#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_FRAMES (0x61)
3012#define MPI2_SASPHY3_EVENT_CODE_RX_SMP_ERROR_FRAMES (0x63)
3013#define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT (0xD0)
3014#define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE (0xD1)
3015#define MPI2_SASPHY3_EVENT_CODE_RX_AIP (0xD2)
3016
3017/*Following codes are product specific and in MPI v2.6 and later */
3018#define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME (0xD3)
3019#define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME (0xD4)
3020#define MPI2_SASPHY3_EVENT_CODE_LCCONN_TIME (0xD5)
3021#define MPI2_SASPHY3_EVENT_CODE_SSP_TX_START_TRANSMIT (0xD6)
3022#define MPI2_SASPHY3_EVENT_CODE_SATA_TX_START (0xD7)
3023#define MPI2_SASPHY3_EVENT_CODE_SMP_TX_START_TRANSMT (0xD8)
3024#define MPI2_SASPHY3_EVENT_CODE_TX_SMP_BREAK_CONN (0xD9)
3025#define MPI2_SASPHY3_EVENT_CODE_SSP_RX_START_RECEIVE (0xDA)
3026#define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE (0xDB)
3027#define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE (0xDC)
3028
3029
3030/*values for the CounterType field */
3031#define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING (0x00)
3032#define MPI2_SASPHY3_COUNTER_TYPE_SATURATING (0x01)
3033#define MPI2_SASPHY3_COUNTER_TYPE_PEAK_VALUE (0x02)
3034
3035/*values for the TimeUnits field */
3036#define MPI2_SASPHY3_TIME_UNITS_10_MICROSECONDS (0x00)
3037#define MPI2_SASPHY3_TIME_UNITS_100_MICROSECONDS (0x01)
3038#define MPI2_SASPHY3_TIME_UNITS_1_MILLISECOND (0x02)
3039#define MPI2_SASPHY3_TIME_UNITS_10_MILLISECONDS (0x03)
3040
3041/*values for the ThresholdFlags field */
3042#define MPI2_SASPHY3_TFLAGS_PHY_RESET (0x0002)
3043#define MPI2_SASPHY3_TFLAGS_EVENT_NOTIFY (0x0001)
3044
3045/*
3046 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
3047 *one and check the value returned for NumPhyEvents at runtime.
3048 */
3049#ifndef MPI2_SASPHY3_PHY_EVENT_MAX
3050#define MPI2_SASPHY3_PHY_EVENT_MAX (1)
3051#endif
3052
3053typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_3 {
3054 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3055 Header; /*0x00 */
3056 U32
3057 Reserved1; /*0x08 */
3058 U8
3059 NumPhyEvents; /*0x0C */
3060 U8
3061 Reserved2; /*0x0D */
3062 U16
3063 Reserved3; /*0x0E */
3064 MPI2_SASPHY3_PHY_EVENT_CONFIG
3065 PhyEventConfig[MPI2_SASPHY3_PHY_EVENT_MAX]; /*0x10 */
3066} MPI2_CONFIG_PAGE_SAS_PHY_3,
3067 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_3,
3068 Mpi2SasPhyPage3_t, *pMpi2SasPhyPage3_t;
3069
3070#define MPI2_SASPHY3_PAGEVERSION (0x00)
3071
3072
3073/*SAS PHY Page 4 */
3074
3075typedef struct _MPI2_CONFIG_PAGE_SAS_PHY_4 {
3076 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3077 Header; /*0x00 */
3078 U16
3079 Reserved1; /*0x08 */
3080 U8
3081 Reserved2; /*0x0A */
3082 U8
3083 Flags; /*0x0B */
3084 U8
3085 InitialFrame[28]; /*0x0C */
3086} MPI2_CONFIG_PAGE_SAS_PHY_4,
3087 *PTR_MPI2_CONFIG_PAGE_SAS_PHY_4,
3088 Mpi2SasPhyPage4_t, *pMpi2SasPhyPage4_t;
3089
3090#define MPI2_SASPHY4_PAGEVERSION (0x00)
3091
3092/*values for the Flags field */
3093#define MPI2_SASPHY4_FLAGS_FRAME_VALID (0x02)
3094#define MPI2_SASPHY4_FLAGS_SATA_FRAME (0x01)
3095
3096
3097
3098
3099/****************************************************************************
3100* SAS Port Config Pages
3101****************************************************************************/
3102
3103/*SAS Port Page 0 */
3104
3105typedef struct _MPI2_CONFIG_PAGE_SAS_PORT_0 {
3106 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3107 Header; /*0x00 */
3108 U8
3109 PortNumber; /*0x08 */
3110 U8
3111 PhysicalPort; /*0x09 */
3112 U8
3113 PortWidth; /*0x0A */
3114 U8
3115 PhysicalPortWidth; /*0x0B */
3116 U8
3117 ZoneGroup; /*0x0C */
3118 U8
3119 Reserved1; /*0x0D */
3120 U16
3121 Reserved2; /*0x0E */
3122 U64
3123 SASAddress; /*0x10 */
3124 U32
3125 DeviceInfo; /*0x18 */
3126 U32
3127 Reserved3; /*0x1C */
3128 U32
3129 Reserved4; /*0x20 */
3130} MPI2_CONFIG_PAGE_SAS_PORT_0,
3131 *PTR_MPI2_CONFIG_PAGE_SAS_PORT_0,
3132 Mpi2SasPortPage0_t, *pMpi2SasPortPage0_t;
3133
3134#define MPI2_SASPORT0_PAGEVERSION (0x00)
3135
3136/*see mpi2_sas.h for values for SAS Port Page 0 DeviceInfo values */
3137
3138
3139/****************************************************************************
3140* SAS Enclosure Config Pages
3141****************************************************************************/
3142
3143/*SAS Enclosure Page 0 */
3144
3145typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
3146 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3147 Header; /*0x00 */
3148 U32
3149 Reserved1; /*0x08 */
3150 U64
3151 EnclosureLogicalID; /*0x0C */
3152 U16
3153 Flags; /*0x14 */
3154 U16
3155 EnclosureHandle; /*0x16 */
3156 U16
3157 NumSlots; /*0x18 */
3158 U16
3159 StartSlot; /*0x1A */
3160 U8
3161 Reserved2; /*0x1C */
3162 U8
3163 EnclosureLevel; /*0x1D */
3164 U16
3165 SEPDevHandle; /*0x1E */
3166 U32
3167 Reserved3; /*0x20 */
3168 U32
3169 Reserved4; /*0x24 */
3170} MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
3171 *PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
3172 Mpi2SasEnclosurePage0_t, *pMpi2SasEnclosurePage0_t;
3173
3174#define MPI2_SASENCLOSURE0_PAGEVERSION (0x04)
3175
3176/*values for SAS Enclosure Page 0 Flags field */
3177#define MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID (0x0010)
3178#define MPI2_SAS_ENCLS0_FLAGS_MNG_MASK (0x000F)
3179#define MPI2_SAS_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000)
3180#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SES (0x0001)
3181#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002)
3182#define MPI2_SAS_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003)
3183#define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004)
3184#define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005)
3185
3186
3187/****************************************************************************
3188* Log Config Page
3189****************************************************************************/
3190
3191/*Log Page 0 */
3192
3193/*
3194 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
3195 *one and check the value returned for NumLogEntries at runtime.
3196 */
3197#ifndef MPI2_LOG_0_NUM_LOG_ENTRIES
3198#define MPI2_LOG_0_NUM_LOG_ENTRIES (1)
3199#endif
3200
3201#define MPI2_LOG_0_LOG_DATA_LENGTH (0x1C)
3202
3203typedef struct _MPI2_LOG_0_ENTRY {
3204 U64 TimeStamp; /*0x00 */
3205 U32 Reserved1; /*0x08 */
3206 U16 LogSequence; /*0x0C */
3207 U16 LogEntryQualifier; /*0x0E */
3208 U8 VP_ID; /*0x10 */
3209 U8 VF_ID; /*0x11 */
3210 U16 Reserved2; /*0x12 */
3211 U8
3212 LogData[MPI2_LOG_0_LOG_DATA_LENGTH];/*0x14 */
3213} MPI2_LOG_0_ENTRY, *PTR_MPI2_LOG_0_ENTRY,
3214 Mpi2Log0Entry_t, *pMpi2Log0Entry_t;
3215
3216/*values for Log Page 0 LogEntry LogEntryQualifier field */
3217#define MPI2_LOG_0_ENTRY_QUAL_ENTRY_UNUSED (0x0000)
3218#define MPI2_LOG_0_ENTRY_QUAL_POWER_ON_RESET (0x0001)
3219#define MPI2_LOG_0_ENTRY_QUAL_TIMESTAMP_UPDATE (0x0002)
3220#define MPI2_LOG_0_ENTRY_QUAL_MIN_IMPLEMENT_SPEC (0x8000)
3221#define MPI2_LOG_0_ENTRY_QUAL_MAX_IMPLEMENT_SPEC (0xFFFF)
3222
3223typedef struct _MPI2_CONFIG_PAGE_LOG_0 {
3224 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3225 U32 Reserved1; /*0x08 */
3226 U32 Reserved2; /*0x0C */
3227 U16 NumLogEntries;/*0x10 */
3228 U16 Reserved3; /*0x12 */
3229 MPI2_LOG_0_ENTRY
3230 LogEntry[MPI2_LOG_0_NUM_LOG_ENTRIES]; /*0x14 */
3231} MPI2_CONFIG_PAGE_LOG_0, *PTR_MPI2_CONFIG_PAGE_LOG_0,
3232 Mpi2LogPage0_t, *pMpi2LogPage0_t;
3233
3234#define MPI2_LOG_0_PAGEVERSION (0x02)
3235
3236
3237/****************************************************************************
3238* RAID Config Page
3239****************************************************************************/
3240
3241/*RAID Page 0 */
3242
3243/*
3244 *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
3245 *one and check the value returned for NumElements at runtime.
3246 */
3247#ifndef MPI2_RAIDCONFIG0_MAX_ELEMENTS
3248#define MPI2_RAIDCONFIG0_MAX_ELEMENTS (1)
3249#endif
3250
3251typedef struct _MPI2_RAIDCONFIG0_CONFIG_ELEMENT {
3252 U16 ElementFlags; /*0x00 */
3253 U16 VolDevHandle; /*0x02 */
3254 U8 HotSparePool; /*0x04 */
3255 U8 PhysDiskNum; /*0x05 */
3256 U16 PhysDiskDevHandle; /*0x06 */
3257} MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
3258 *PTR_MPI2_RAIDCONFIG0_CONFIG_ELEMENT,
3259 Mpi2RaidConfig0ConfigElement_t,
3260 *pMpi2RaidConfig0ConfigElement_t;
3261
3262/*values for the ElementFlags field */
3263#define MPI2_RAIDCONFIG0_EFLAGS_MASK_ELEMENT_TYPE (0x000F)
3264#define MPI2_RAIDCONFIG0_EFLAGS_VOLUME_ELEMENT (0x0000)
3265#define MPI2_RAIDCONFIG0_EFLAGS_VOL_PHYS_DISK_ELEMENT (0x0001)
3266#define MPI2_RAIDCONFIG0_EFLAGS_HOT_SPARE_ELEMENT (0x0002)
3267#define MPI2_RAIDCONFIG0_EFLAGS_OCE_ELEMENT (0x0003)
3268
3269
3270typedef struct _MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0 {
3271 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3272 U8 NumHotSpares; /*0x08 */
3273 U8 NumPhysDisks; /*0x09 */
3274 U8 NumVolumes; /*0x0A */
3275 U8 ConfigNum; /*0x0B */
3276 U32 Flags; /*0x0C */
3277 U8 ConfigGUID[24]; /*0x10 */
3278 U32 Reserved1; /*0x28 */
3279 U8 NumElements; /*0x2C */
3280 U8 Reserved2; /*0x2D */
3281 U16 Reserved3; /*0x2E */
3282 MPI2_RAIDCONFIG0_CONFIG_ELEMENT
3283 ConfigElement[MPI2_RAIDCONFIG0_MAX_ELEMENTS]; /*0x30 */
3284} MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
3285 *PTR_MPI2_CONFIG_PAGE_RAID_CONFIGURATION_0,
3286 Mpi2RaidConfigurationPage0_t,
3287 *pMpi2RaidConfigurationPage0_t;
3288
3289#define MPI2_RAIDCONFIG0_PAGEVERSION (0x00)
3290
3291/*values for RAID Configuration Page 0 Flags field */
3292#define MPI2_RAIDCONFIG0_FLAG_FOREIGN_CONFIG (0x00000001)
3293
3294
3295/****************************************************************************
3296* Driver Persistent Mapping Config Pages
3297****************************************************************************/
3298
3299/*Driver Persistent Mapping Page 0 */
3300
3301typedef struct _MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY {
3302 U64 PhysicalIdentifier; /*0x00 */
3303 U16 MappingInformation; /*0x08 */
3304 U16 DeviceIndex; /*0x0A */
3305 U32 PhysicalBitsMapping; /*0x0C */
3306 U32 Reserved1; /*0x10 */
3307} MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
3308 *PTR_MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY,
3309 Mpi2DriverMap0Entry_t, *pMpi2DriverMap0Entry_t;
3310
3311typedef struct _MPI2_CONFIG_PAGE_DRIVER_MAPPING_0 {
3312 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3313 MPI2_CONFIG_PAGE_DRIVER_MAP0_ENTRY Entry; /*0x08 */
3314} MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
3315 *PTR_MPI2_CONFIG_PAGE_DRIVER_MAPPING_0,
3316 Mpi2DriverMappingPage0_t, *pMpi2DriverMappingPage0_t;
3317
3318#define MPI2_DRIVERMAPPING0_PAGEVERSION (0x00)
3319
3320/*values for Driver Persistent Mapping Page 0 MappingInformation field */
3321#define MPI2_DRVMAP0_MAPINFO_SLOT_MASK (0x07F0)
3322#define MPI2_DRVMAP0_MAPINFO_SLOT_SHIFT (4)
3323#define MPI2_DRVMAP0_MAPINFO_MISSING_MASK (0x000F)
3324
3325
3326/****************************************************************************
3327* Ethernet Config Pages
3328****************************************************************************/
3329
3330/*Ethernet Page 0 */
3331
3332/*IP address (union of IPv4 and IPv6) */
3333typedef union _MPI2_ETHERNET_IP_ADDR {
3334 U32 IPv4Addr;
3335 U32 IPv6Addr[4];
3336} MPI2_ETHERNET_IP_ADDR, *PTR_MPI2_ETHERNET_IP_ADDR,
3337 Mpi2EthernetIpAddr_t, *pMpi2EthernetIpAddr_t;
3338
3339#define MPI2_ETHERNET_HOST_NAME_LENGTH (32)
3340
3341typedef struct _MPI2_CONFIG_PAGE_ETHERNET_0 {
3342 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /*0x00 */
3343 U8 NumInterfaces; /*0x08 */
3344 U8 Reserved0; /*0x09 */
3345 U16 Reserved1; /*0x0A */
3346 U32 Status; /*0x0C */
3347 U8 MediaState; /*0x10 */
3348 U8 Reserved2; /*0x11 */
3349 U16 Reserved3; /*0x12 */
3350 U8 MacAddress[6]; /*0x14 */
3351 U8 Reserved4; /*0x1A */
3352 U8 Reserved5; /*0x1B */
3353 MPI2_ETHERNET_IP_ADDR IpAddress; /*0x1C */
3354 MPI2_ETHERNET_IP_ADDR SubnetMask; /*0x2C */
3355 MPI2_ETHERNET_IP_ADDR GatewayIpAddress;/*0x3C */
3356 MPI2_ETHERNET_IP_ADDR DNS1IpAddress; /*0x4C */
3357 MPI2_ETHERNET_IP_ADDR DNS2IpAddress; /*0x5C */
3358 MPI2_ETHERNET_IP_ADDR DhcpIpAddress; /*0x6C */
3359 U8
3360 HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
3361} MPI2_CONFIG_PAGE_ETHERNET_0,
3362 *PTR_MPI2_CONFIG_PAGE_ETHERNET_0,
3363 Mpi2EthernetPage0_t, *pMpi2EthernetPage0_t;
3364
3365#define MPI2_ETHERNETPAGE0_PAGEVERSION (0x00)
3366
3367/*values for Ethernet Page 0 Status field */
3368#define MPI2_ETHPG0_STATUS_IPV6_CAPABLE (0x80000000)
3369#define MPI2_ETHPG0_STATUS_IPV4_CAPABLE (0x40000000)
3370#define MPI2_ETHPG0_STATUS_CONSOLE_CONNECTED (0x20000000)
3371#define MPI2_ETHPG0_STATUS_DEFAULT_IF (0x00000100)
3372#define MPI2_ETHPG0_STATUS_FW_DWNLD_ENABLED (0x00000080)
3373#define MPI2_ETHPG0_STATUS_TELNET_ENABLED (0x00000040)
3374#define MPI2_ETHPG0_STATUS_SSH2_ENABLED (0x00000020)
3375#define MPI2_ETHPG0_STATUS_DHCP_CLIENT_ENABLED (0x00000010)
3376#define MPI2_ETHPG0_STATUS_IPV6_ENABLED (0x00000008)
3377#define MPI2_ETHPG0_STATUS_IPV4_ENABLED (0x00000004)
3378#define MPI2_ETHPG0_STATUS_IPV6_ADDRESSES (0x00000002)
3379#define MPI2_ETHPG0_STATUS_ETH_IF_ENABLED (0x00000001)
3380
3381/*values for Ethernet Page 0 MediaState field */
3382#define MPI2_ETHPG0_MS_DUPLEX_MASK (0x80)
3383#define MPI2_ETHPG0_MS_HALF_DUPLEX (0x00)
3384#define MPI2_ETHPG0_MS_FULL_DUPLEX (0x80)
3385
3386#define MPI2_ETHPG0_MS_CONNECT_SPEED_MASK (0x07)
3387#define MPI2_ETHPG0_MS_NOT_CONNECTED (0x00)
3388#define MPI2_ETHPG0_MS_10MBIT (0x01)
3389#define MPI2_ETHPG0_MS_100MBIT (0x02)
3390#define MPI2_ETHPG0_MS_1GBIT (0x03)
3391
3392
3393/*Ethernet Page 1 */
3394
3395typedef struct _MPI2_CONFIG_PAGE_ETHERNET_1 {
3396 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3397 Header; /*0x00 */
3398 U32
3399 Reserved0; /*0x08 */
3400 U32
3401 Flags; /*0x0C */
3402 U8
3403 MediaState; /*0x10 */
3404 U8
3405 Reserved1; /*0x11 */
3406 U16
3407 Reserved2; /*0x12 */
3408 U8
3409 MacAddress[6]; /*0x14 */
3410 U8
3411 Reserved3; /*0x1A */
3412 U8
3413 Reserved4; /*0x1B */
3414 MPI2_ETHERNET_IP_ADDR
3415 StaticIpAddress; /*0x1C */
3416 MPI2_ETHERNET_IP_ADDR
3417 StaticSubnetMask; /*0x2C */
3418 MPI2_ETHERNET_IP_ADDR
3419 StaticGatewayIpAddress; /*0x3C */
3420 MPI2_ETHERNET_IP_ADDR
3421 StaticDNS1IpAddress; /*0x4C */
3422 MPI2_ETHERNET_IP_ADDR
3423 StaticDNS2IpAddress; /*0x5C */
3424 U32
3425 Reserved5; /*0x6C */
3426 U32
3427 Reserved6; /*0x70 */
3428 U32
3429 Reserved7; /*0x74 */
3430 U32
3431 Reserved8; /*0x78 */
3432 U8
3433 HostName[MPI2_ETHERNET_HOST_NAME_LENGTH];/*0x7C */
3434} MPI2_CONFIG_PAGE_ETHERNET_1,
3435 *PTR_MPI2_CONFIG_PAGE_ETHERNET_1,
3436 Mpi2EthernetPage1_t, *pMpi2EthernetPage1_t;
3437
3438#define MPI2_ETHERNETPAGE1_PAGEVERSION (0x00)
3439
3440/*values for Ethernet Page 1 Flags field */
3441#define MPI2_ETHPG1_FLAG_SET_DEFAULT_IF (0x00000100)
3442#define MPI2_ETHPG1_FLAG_ENABLE_FW_DOWNLOAD (0x00000080)
3443#define MPI2_ETHPG1_FLAG_ENABLE_TELNET (0x00000040)
3444#define MPI2_ETHPG1_FLAG_ENABLE_SSH2 (0x00000020)
3445#define MPI2_ETHPG1_FLAG_ENABLE_DHCP_CLIENT (0x00000010)
3446#define MPI2_ETHPG1_FLAG_ENABLE_IPV6 (0x00000008)
3447#define MPI2_ETHPG1_FLAG_ENABLE_IPV4 (0x00000004)
3448#define MPI2_ETHPG1_FLAG_USE_IPV6_ADDRESSES (0x00000002)
3449#define MPI2_ETHPG1_FLAG_ENABLE_ETH_IF (0x00000001)
3450
3451/*values for Ethernet Page 1 MediaState field */
3452#define MPI2_ETHPG1_MS_DUPLEX_MASK (0x80)
3453#define MPI2_ETHPG1_MS_HALF_DUPLEX (0x00)
3454#define MPI2_ETHPG1_MS_FULL_DUPLEX (0x80)
3455
3456#define MPI2_ETHPG1_MS_DATA_RATE_MASK (0x07)
3457#define MPI2_ETHPG1_MS_DATA_RATE_AUTO (0x00)
3458#define MPI2_ETHPG1_MS_DATA_RATE_10MBIT (0x01)
3459#define MPI2_ETHPG1_MS_DATA_RATE_100MBIT (0x02)
3460#define MPI2_ETHPG1_MS_DATA_RATE_1GBIT (0x03)
3461
3462
3463/****************************************************************************
3464* Extended Manufacturing Config Pages
3465****************************************************************************/
3466
3467/*
3468 *Generic structure to use for product-specific extended manufacturing pages
3469 *(currently Extended Manufacturing Page 40 through Extended Manufacturing
3470 *Page 60).
3471 */
3472
3473typedef struct _MPI2_CONFIG_PAGE_EXT_MAN_PS {
3474 MPI2_CONFIG_EXTENDED_PAGE_HEADER
3475 Header; /*0x00 */
3476 U32
3477 ProductSpecificInfo; /*0x08 */
3478} MPI2_CONFIG_PAGE_EXT_MAN_PS,
3479 *PTR_MPI2_CONFIG_PAGE_EXT_MAN_PS,
3480 Mpi2ExtManufacturingPagePS_t,
3481 *pMpi2ExtManufacturingPagePS_t;
3482
3483/*PageVersion should be provided by product-specific code */
3484
3485#endif