xref: /freebsd/sys/dev/isci/scil/sati_mode_pages.c (revision 685dc743dc3b5645e34836464128e1c0558b404b)
1f11c7f63SJim Harris /*-
2*718cf2ccSPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
3*718cf2ccSPedro F. Giffuni  *
4f11c7f63SJim Harris  * This file is provided under a dual BSD/GPLv2 license.  When using or
5f11c7f63SJim Harris  * redistributing this file, you may do so under either license.
6f11c7f63SJim Harris  *
7f11c7f63SJim Harris  * GPL LICENSE SUMMARY
8f11c7f63SJim Harris  *
9f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
10f11c7f63SJim Harris  *
11f11c7f63SJim Harris  * This program is free software; you can redistribute it and/or modify
12f11c7f63SJim Harris  * it under the terms of version 2 of the GNU General Public License as
13f11c7f63SJim Harris  * published by the Free Software Foundation.
14f11c7f63SJim Harris  *
15f11c7f63SJim Harris  * This program is distributed in the hope that it will be useful, but
16f11c7f63SJim Harris  * WITHOUT ANY WARRANTY; without even the implied warranty of
17f11c7f63SJim Harris  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18f11c7f63SJim Harris  * General Public License for more details.
19f11c7f63SJim Harris  *
20f11c7f63SJim Harris  * You should have received a copy of the GNU General Public License
21f11c7f63SJim Harris  * along with this program; if not, write to the Free Software
22f11c7f63SJim Harris  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23f11c7f63SJim Harris  * The full GNU General Public License is included in this distribution
24f11c7f63SJim Harris  * in the file called LICENSE.GPL.
25f11c7f63SJim Harris  *
26f11c7f63SJim Harris  * BSD LICENSE
27f11c7f63SJim Harris  *
28f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29f11c7f63SJim Harris  * All rights reserved.
30f11c7f63SJim Harris  *
31f11c7f63SJim Harris  * Redistribution and use in source and binary forms, with or without
32f11c7f63SJim Harris  * modification, are permitted provided that the following conditions
33f11c7f63SJim Harris  * are met:
34f11c7f63SJim Harris  *
35f11c7f63SJim Harris  *   * Redistributions of source code must retain the above copyright
36f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer.
37f11c7f63SJim Harris  *   * Redistributions in binary form must reproduce the above copyright
38f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer in
39f11c7f63SJim Harris  *     the documentation and/or other materials provided with the
40f11c7f63SJim Harris  *     distribution.
41f11c7f63SJim Harris  *
42f11c7f63SJim Harris  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43f11c7f63SJim Harris  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44f11c7f63SJim Harris  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45f11c7f63SJim Harris  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46f11c7f63SJim Harris  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47f11c7f63SJim Harris  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48f11c7f63SJim Harris  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49f11c7f63SJim Harris  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50f11c7f63SJim Harris  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51f11c7f63SJim Harris  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52f11c7f63SJim Harris  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53f11c7f63SJim Harris  */
54f11c7f63SJim Harris 
55f11c7f63SJim Harris #include <sys/cdefs.h>
56f11c7f63SJim Harris /**
57f11c7f63SJim Harris  * @file
58f11c7f63SJim Harris  * @brief This file contains the mode page constants and data for the mode
59f11c7f63SJim Harris  *        pages supported by this translation implementation.
60f11c7f63SJim Harris  */
61f11c7f63SJim Harris 
62f11c7f63SJim Harris // DO NOT MOVE THIS INCLUDE STATEMENT! This include must occur before
63f11c7f63SJim Harris // the below check for ENABLE_SATI_MODE_PAGES.
64f11c7f63SJim Harris #include <dev/isci/scil/sati_types.h>
65f11c7f63SJim Harris 
66f11c7f63SJim Harris #if defined(ENABLE_SATI_MODE_PAGES)
67f11c7f63SJim Harris 
68f11c7f63SJim Harris #include <dev/isci/scil/sati_mode_pages.h>
69f11c7f63SJim Harris #include <dev/isci/scil/intel_scsi.h>
70f11c7f63SJim Harris 
71f11c7f63SJim Harris //******************************************************************************
72f11c7f63SJim Harris //* C O N S T A N T S
73f11c7f63SJim Harris //******************************************************************************
74f11c7f63SJim Harris 
75f11c7f63SJim Harris #define SCSI_MODE_PAGE19_SAS_ID         0x6
76f11c7f63SJim Harris #define SCSI_MODE_PAGE19_SUB1_PAGE_NUM  0x1
77f11c7f63SJim Harris #define SCSI_MODE_PAGE19_SUB1_PC        0x59
78f11c7f63SJim Harris 
79f11c7f63SJim Harris //******************************************************************************
80f11c7f63SJim Harris //* M O D E   P A G E S
81f11c7f63SJim Harris //******************************************************************************
82f11c7f63SJim Harris 
83f11c7f63SJim Harris U8 sat_default_mode_page_01[] =
84f11c7f63SJim Harris {
85f11c7f63SJim Harris    SCSI_MODE_PAGE_READ_WRITE_ERROR, // Byte 0 - Page Code, SPF(0), PS(0)
86f11c7f63SJim Harris    SCSI_MODE_PAGE_01_LENGTH-2,      // Byte 1 - Page Length
87f11c7f63SJim Harris    0x80, // Byte 2 - AWRE, ARRE, TB, RC, EER, PER, DTE, DCR
88f11c7f63SJim Harris    0x00, // Byte 3 - Read Retry Count
89f11c7f63SJim Harris 
90f11c7f63SJim Harris    0x00, // Byte 4 - Obsolete
91f11c7f63SJim Harris    0x00, // Byte 5 - Obsolete
92f11c7f63SJim Harris    0x00, // Byte 6 - Obsolete
93f11c7f63SJim Harris    0x00, // Byte 7 - Restricted for MMC-4
94f11c7f63SJim Harris 
95f11c7f63SJim Harris    0x00, // Byte 8 - Write Retry Count
96f11c7f63SJim Harris    0x00, // Byte 9 - Reserved
97f11c7f63SJim Harris    0x00, // Byte 10 - Recovery Time Limit
98f11c7f63SJim Harris    0x00, // Byte 11
99f11c7f63SJim Harris };
100f11c7f63SJim Harris 
101f11c7f63SJim Harris U8 sat_changeable_mode_page_01[] =
102f11c7f63SJim Harris {
103f11c7f63SJim Harris    SCSI_MODE_PAGE_READ_WRITE_ERROR,
104f11c7f63SJim Harris    SCSI_MODE_PAGE_01_LENGTH-2,
105f11c7f63SJim Harris    0x00,
106f11c7f63SJim Harris    0x00,
107f11c7f63SJim Harris 
108f11c7f63SJim Harris    0x00,
109f11c7f63SJim Harris    0x00,
110f11c7f63SJim Harris    0x00,
111f11c7f63SJim Harris    0x00,
112f11c7f63SJim Harris 
113f11c7f63SJim Harris    0x00,
114f11c7f63SJim Harris    0x00,
115f11c7f63SJim Harris    0x00,
116f11c7f63SJim Harris    0x00,
117f11c7f63SJim Harris };
118f11c7f63SJim Harris 
119f11c7f63SJim Harris U8 sat_default_mode_page_02[] =
120f11c7f63SJim Harris {
121f11c7f63SJim Harris    SCSI_MODE_PAGE_DISCONNECT_RECONNECT, // Byte 0 - Page Code, SPF(0), PS(0)
122f11c7f63SJim Harris    SCSI_MODE_PAGE_02_LENGTH-2,          // Byte 1 - Page Length
123f11c7f63SJim Harris    0x00, // Byte 2 - Buffer Full Ratio
124f11c7f63SJim Harris    0x00, // Byte 3 - Buffer Empty Ratio
125f11c7f63SJim Harris 
126f11c7f63SJim Harris    0x00, // Byte 4 - Bus Inactivity Limit
127f11c7f63SJim Harris    0x00, // Byte 5
128f11c7f63SJim Harris    0x00, // Byte 6 - Disconnect Time Limit
129f11c7f63SJim Harris    0x00, // Byte 7
130f11c7f63SJim Harris 
131f11c7f63SJim Harris    0x00, // Byte 8 - Connect Time Limit
132f11c7f63SJim Harris    0x00, // Byte 9
133f11c7f63SJim Harris    0x00, // Byte 10 - Maximum Burst Size
134f11c7f63SJim Harris    0x00, // Byte 11
135f11c7f63SJim Harris 
136f11c7f63SJim Harris    0x00, // Byte 12 - EMDP, FAIR_ARB, DIMM, DTDC
137f11c7f63SJim Harris    0x00, // Byte 13
138f11c7f63SJim Harris    0x00, // Byte 14 - First Burst Size
139f11c7f63SJim Harris    0x00, // Byte 15
140f11c7f63SJim Harris };
141f11c7f63SJim Harris 
142f11c7f63SJim Harris U8 sat_changeable_mode_page_02[] =
143f11c7f63SJim Harris {
144f11c7f63SJim Harris    SCSI_MODE_PAGE_DISCONNECT_RECONNECT,
145f11c7f63SJim Harris    SCSI_MODE_PAGE_02_LENGTH-2,
146f11c7f63SJim Harris    0x00,
147f11c7f63SJim Harris    0x00,
148f11c7f63SJim Harris 
149f11c7f63SJim Harris    0x00,
150f11c7f63SJim Harris    0x00,
151f11c7f63SJim Harris    0x00,
152f11c7f63SJim Harris    0x00,
153f11c7f63SJim Harris 
154f11c7f63SJim Harris    0x00,
155f11c7f63SJim Harris    0x00,
156f11c7f63SJim Harris    0x00,
157f11c7f63SJim Harris    0x00,
158f11c7f63SJim Harris 
159f11c7f63SJim Harris    0x00,
160f11c7f63SJim Harris    0x00,
161f11c7f63SJim Harris    0x00,
162f11c7f63SJim Harris    0x00,
163f11c7f63SJim Harris };
164f11c7f63SJim Harris 
165f11c7f63SJim Harris U8 sat_default_mode_page_08[] =
166f11c7f63SJim Harris {
167f11c7f63SJim Harris    SCSI_MODE_PAGE_CACHING,     // Byte 0 - Page Code, SPF(0), PS(0)
168f11c7f63SJim Harris    SCSI_MODE_PAGE_08_LENGTH-2, // Byte 1 - Page Length
169f11c7f63SJim Harris    0x00, // Byte 2 - IC, ABPF, CAP, DISC, SIZE, WCE(1), MF, RCD
170f11c7f63SJim Harris    0x00, // Byte 3 - Demand Read Retention Priority, Write Retention Priority
171f11c7f63SJim Harris 
172f11c7f63SJim Harris    0x00, // Byte 4 - Disable Pre-Fetch Transfer Length
173f11c7f63SJim Harris    0x00, // Byte 5
174f11c7f63SJim Harris    0x00, // Byte 6 - Minimum Pre-Fetch
175f11c7f63SJim Harris    0x00, // Byte 7
176f11c7f63SJim Harris 
177f11c7f63SJim Harris    0x00, // Byte 8 - Maximum Pre-Fetch
178f11c7f63SJim Harris    0x00, // Byte 9
179f11c7f63SJim Harris    0x00, // Byte 10 - Maximum Pre-Fetch Ceiling
180f11c7f63SJim Harris    0x00, // Byte 11
181f11c7f63SJim Harris 
182f11c7f63SJim Harris    0x00, // Byte 12 - FSW, LBCSS, DRA(0), Vendor Specific, NV_DIS
183f11c7f63SJim Harris    0x00, // Byte 13 - Number of Cache Segments
184f11c7f63SJim Harris    0x00, // Byte 14 - Cache Segment Size
185f11c7f63SJim Harris    0x00, // Byte 15
186f11c7f63SJim Harris 
187f11c7f63SJim Harris    0x00, // Byte 16 - Reserved
188f11c7f63SJim Harris    0x00, // Byte 17 - Non-Cache Segment Size
189f11c7f63SJim Harris    0x00, // Byte 18
190f11c7f63SJim Harris    0x00, // PAD
191f11c7f63SJim Harris };
192f11c7f63SJim Harris 
193f11c7f63SJim Harris U8 sat_changeable_mode_page_08[] =
194f11c7f63SJim Harris {
195f11c7f63SJim Harris    SCSI_MODE_PAGE_CACHING,
196f11c7f63SJim Harris    SCSI_MODE_PAGE_08_LENGTH-2,
197f11c7f63SJim Harris    SCSI_MODE_PAGE_CACHE_PAGE_WCE_BIT,
198f11c7f63SJim Harris    0x00,
199f11c7f63SJim Harris 
200f11c7f63SJim Harris    0x00,
201f11c7f63SJim Harris    0x00,
202f11c7f63SJim Harris    0x00,
203f11c7f63SJim Harris    0x00,
204f11c7f63SJim Harris 
205f11c7f63SJim Harris    0x00,
206f11c7f63SJim Harris    0x00,
207f11c7f63SJim Harris    0x00,
208f11c7f63SJim Harris    0x00,
209f11c7f63SJim Harris 
210f11c7f63SJim Harris    SCSI_MODE_PAGE_CACHE_PAGE_DRA_BIT,
211f11c7f63SJim Harris    0x00,
212f11c7f63SJim Harris    0x00,
213f11c7f63SJim Harris    0x00,
214f11c7f63SJim Harris 
215f11c7f63SJim Harris    0x00,
216f11c7f63SJim Harris    0x00,
217f11c7f63SJim Harris    0x00,
218f11c7f63SJim Harris    0x00, // PAD
219f11c7f63SJim Harris };
220f11c7f63SJim Harris 
221f11c7f63SJim Harris U8 sat_default_mode_page_0A[] =
222f11c7f63SJim Harris {
223f11c7f63SJim Harris    SCSI_MODE_PAGE_CONTROL,     // Byte 0 - Page Code, SPF(0), PS(0)
224f11c7f63SJim Harris    SCSI_MODE_PAGE_0A_LENGTH-2, // Byte 1 - Page Length
225f11c7f63SJim Harris    0x00, // Byte 2 - TST(0), TMF_ONLY(0), D_SENSE(0), GLTSD(0), RLEC(0)
226f11c7f63SJim Harris    0x10, // Byte 3 - Queue Algorithm(0), QErr(0)
227f11c7f63SJim Harris 
228f11c7f63SJim Harris    0x00, // Byte 4 - TAS(0), RAC(0), UA_(0), SWP(0)
229f11c7f63SJim Harris    0x00, // Byte 5 - ATO(0), AUTOLOAD(0)
230f11c7f63SJim Harris    0x00, // Byte 6
231f11c7f63SJim Harris    0x00, // Byte 7
232f11c7f63SJim Harris 
233f11c7f63SJim Harris    0xFF, // Byte 8 - Unlimited Busy timeout
234f11c7f63SJim Harris    0xFF, // Byte 9
235f11c7f63SJim Harris    0x00, // Byte 10 - do not support self time compl time xlation
236f11c7f63SJim Harris    0x00, // Byte 11
237f11c7f63SJim Harris };
238f11c7f63SJim Harris 
239f11c7f63SJim Harris U8 sat_changeable_mode_page_0A[] =
240f11c7f63SJim Harris {
241f11c7f63SJim Harris    SCSI_MODE_PAGE_CONTROL,
242f11c7f63SJim Harris    SCSI_MODE_PAGE_0A_LENGTH-2,
243f11c7f63SJim Harris    0x00,
244f11c7f63SJim Harris    0x00,
245f11c7f63SJim Harris 
246f11c7f63SJim Harris    0x00,
247f11c7f63SJim Harris    0x00,
248f11c7f63SJim Harris    0x00,
249f11c7f63SJim Harris    0x00,
250f11c7f63SJim Harris 
251f11c7f63SJim Harris    0x00,
252f11c7f63SJim Harris    0x00,
253f11c7f63SJim Harris    0x00,
254f11c7f63SJim Harris    0x00,
255f11c7f63SJim Harris };
256f11c7f63SJim Harris 
257f11c7f63SJim Harris U8 sat_default_mode_page_19[] =
258f11c7f63SJim Harris {
259f11c7f63SJim Harris    SCSI_MODE_PAGE_PROTOCOL_SPECIFIC_PORT, // Byte 0 - PS, SPF, Page Code
260f11c7f63SJim Harris    SCSI_MODE_PAGE_19_LENGTH-2,  // Byte 1 - Page Length
261f11c7f63SJim Harris    SCSI_MODE_PAGE19_SAS_ID,     // Byte 2 - Rsvd, READY_LED,  ProtoID
262f11c7f63SJim Harris    0x00, // PAD
263f11c7f63SJim Harris 
264f11c7f63SJim Harris    0xFF, // Byte 4 - IT NLT MSB, 0xFF retry forever
265f11c7f63SJim Harris    0xFF, // Byte 5 - IT NLT LSB, 0xFF retry forever
266f11c7f63SJim Harris    0x00, // Byte 6 - IRT MSB, 0x0 disable init resp timer
267f11c7f63SJim Harris    0x00, // Byte 7 - IRT LSB, 0x0 disable init resp timer
268f11c7f63SJim Harris };
269f11c7f63SJim Harris 
270f11c7f63SJim Harris U8 sat_changeable_mode_page_19[] =
271f11c7f63SJim Harris {
272f11c7f63SJim Harris    SCSI_MODE_PAGE_PROTOCOL_SPECIFIC_PORT,
273f11c7f63SJim Harris    SCSI_MODE_PAGE_19_LENGTH-2,
274f11c7f63SJim Harris    0x00,
275f11c7f63SJim Harris    0x00,
276f11c7f63SJim Harris 
277f11c7f63SJim Harris    0x00,
278f11c7f63SJim Harris    0x00,
279f11c7f63SJim Harris    0x00,
280f11c7f63SJim Harris    0x00,
281f11c7f63SJim Harris };
282f11c7f63SJim Harris 
283f11c7f63SJim Harris U8 sat_default_mode_page_1C[] =
284f11c7f63SJim Harris {
285f11c7f63SJim Harris    SCSI_MODE_PAGE_INFORMATIONAL_EXCP_CONTROL, // Byte 0 - Page Code,
286f11c7f63SJim Harris                                               // SPF(0), PS(0)
287f11c7f63SJim Harris    SCSI_MODE_PAGE_1C_LENGTH-2,   // Byte 1 - Page Length
288f11c7f63SJim Harris    SCSI_MODE_PAGE_DEXCPT_ENABLE, // Byte 2 - Perf, EBF, EWasc,
289f11c7f63SJim Harris                                  // DExcpt(1), Test, LogErr
290f11c7f63SJim Harris    0x06, // Byte 3 -- MRIE (6 == values only available upon request)
291f11c7f63SJim Harris 
292f11c7f63SJim Harris    0x00, // Byte 4 -- Interval Timer
293f11c7f63SJim Harris    0x00, // Byte 5
294f11c7f63SJim Harris    0x00, // Byte 6
295f11c7f63SJim Harris    0x00, // Byte 7
296f11c7f63SJim Harris 
297f11c7f63SJim Harris    0x00, // Byte 8 -- Report Count
298f11c7f63SJim Harris    0x00, // Byte 9
299f11c7f63SJim Harris    0x00, // Byte 10
300f11c7f63SJim Harris    0x00, // Byte 11
301f11c7f63SJim Harris };
302f11c7f63SJim Harris 
303f11c7f63SJim Harris U8 sat_changeable_mode_page_1C[] =
304f11c7f63SJim Harris {
305f11c7f63SJim Harris    SCSI_MODE_PAGE_INFORMATIONAL_EXCP_CONTROL,
306f11c7f63SJim Harris    SCSI_MODE_PAGE_1C_LENGTH-2,
307f11c7f63SJim Harris    SCSI_MODE_PAGE_DEXCPT_ENABLE,
308f11c7f63SJim Harris    0x00,
309f11c7f63SJim Harris 
310f11c7f63SJim Harris    0x00,
311f11c7f63SJim Harris    0x00,
312f11c7f63SJim Harris    0x00,
313f11c7f63SJim Harris    0x00,
314f11c7f63SJim Harris 
315f11c7f63SJim Harris    0x00,
316f11c7f63SJim Harris    0x00,
317f11c7f63SJim Harris    0x00,
318f11c7f63SJim Harris    0x00,
319f11c7f63SJim Harris };
320f11c7f63SJim Harris 
321f11c7f63SJim Harris U8 sat_supported_mode_pages[] =
322f11c7f63SJim Harris {
323f11c7f63SJim Harris    SCSI_MODE_PAGE_READ_WRITE_ERROR,
324f11c7f63SJim Harris    SCSI_MODE_PAGE_DISCONNECT_RECONNECT,
325f11c7f63SJim Harris    SCSI_MODE_PAGE_CACHING,
326f11c7f63SJim Harris    SCSI_MODE_PAGE_CONTROL,
327f11c7f63SJim Harris    SCSI_MODE_PAGE_INFORMATIONAL_EXCP_CONTROL
328f11c7f63SJim Harris };
329f11c7f63SJim Harris 
330f11c7f63SJim Harris U8 *sat_changeable_mode_pages[] =
331f11c7f63SJim Harris {
332f11c7f63SJim Harris    sat_changeable_mode_page_01,
333f11c7f63SJim Harris    sat_changeable_mode_page_02,
334f11c7f63SJim Harris    sat_changeable_mode_page_08,
335f11c7f63SJim Harris    sat_changeable_mode_page_0A,
336f11c7f63SJim Harris    sat_changeable_mode_page_1C
337f11c7f63SJim Harris };
338f11c7f63SJim Harris 
339f11c7f63SJim Harris U8 *sat_default_mode_pages[] =
340f11c7f63SJim Harris {
341f11c7f63SJim Harris    sat_default_mode_page_01,
342f11c7f63SJim Harris    sat_default_mode_page_02,
343f11c7f63SJim Harris    sat_default_mode_page_08,
344f11c7f63SJim Harris    sat_default_mode_page_0A,
345f11c7f63SJim Harris    sat_default_mode_page_1C
346f11c7f63SJim Harris };
347f11c7f63SJim Harris 
348f11c7f63SJim Harris U16 sat_mode_page_sizes[] =
349f11c7f63SJim Harris {
350f11c7f63SJim Harris    sizeof(sat_default_mode_page_01),
351f11c7f63SJim Harris    sizeof(sat_default_mode_page_02),
352f11c7f63SJim Harris    sizeof(sat_default_mode_page_08),
353f11c7f63SJim Harris    sizeof(sat_default_mode_page_0A),
354f11c7f63SJim Harris    sizeof(sat_default_mode_page_1C)
355f11c7f63SJim Harris };
356f11c7f63SJim Harris 
sati_mode_page_get_page_index(U8 page_code)357f11c7f63SJim Harris U16 sati_mode_page_get_page_index(
358f11c7f63SJim Harris    U8  page_code
359f11c7f63SJim Harris )
360f11c7f63SJim Harris {
361f11c7f63SJim Harris    U16 index;
362f11c7f63SJim Harris    for (index = 0; index < SAT_SUPPORTED_MODE_PAGES_LENGTH; index++)
363f11c7f63SJim Harris    {
364f11c7f63SJim Harris       if (sat_supported_mode_pages[index] == page_code)
365f11c7f63SJim Harris          return index;
366f11c7f63SJim Harris    }
367f11c7f63SJim Harris 
368f11c7f63SJim Harris    return SATI_MODE_PAGE_UNSUPPORTED_INDEX;
369f11c7f63SJim Harris }
370f11c7f63SJim Harris 
371f11c7f63SJim Harris #endif // defined(ENABLE_SATI_MODE_PAGES)
372f11c7f63SJim Harris 
373