2 * Copyright (c) 2012-2016 Solarflare Communications Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
33 #ifndef _SYS_EFX_CHECK_H
34 #define _SYS_EFX_CHECK_H
39 * Check that the efsys.h header in client code has a valid combination of
40 * EFSYS_OPT_xxx options.
42 * NOTE: Keep checks for obsolete options here to ensure that they are removed
43 * from client code (and do not reappear in merges from other branches).
46 #ifdef EFSYS_OPT_FALCON
47 # error "FALCON is obsolete and is not supported."
50 /* Support NVRAM based boot config */
53 # error "BOOTCFG requires NVRAM"
55 #endif /* EFSYS_OPT_BOOTCFG */
57 /* Verify chip implements accessed registers */
58 #if EFSYS_OPT_CHECK_REG
59 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
60 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
62 #endif /* EFSYS_OPT_CHECK_REG */
64 /* Decode fatal errors */
65 #if EFSYS_OPT_DECODE_INTR_FATAL
67 # error "INTR_FATAL requires SIENA"
69 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
71 /* Support diagnostic hardware tests */
73 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
74 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
76 #endif /* EFSYS_OPT_DIAG */
78 /* Support optimized EVQ data access */
79 #if EFSYS_OPT_EV_PREFETCH
80 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
81 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
83 #endif /* EFSYS_OPT_EV_PREFETCH */
85 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
86 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
89 /* Support hardware packet filters */
91 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
92 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
94 #endif /* EFSYS_OPT_FILTER */
96 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
97 # if !EFSYS_OPT_FILTER
98 # error "HUNTINGTON or MEDFORD requires FILTER"
100 #endif /* EFSYS_OPT_HUNTINGTON */
102 /* Support hardware loopback modes */
103 #if EFSYS_OPT_LOOPBACK
104 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
105 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD"
107 #endif /* EFSYS_OPT_LOOPBACK */
109 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
110 # error "MAC_FALCON_GMAC is obsolete and is not supported."
113 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
114 # error "MAC_FALCON_XMAC is obsolete and is not supported."
117 /* Support MAC statistics */
118 #if EFSYS_OPT_MAC_STATS
119 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
120 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
122 #endif /* EFSYS_OPT_MAC_STATS */
124 /* Support management controller messages */
126 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
127 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
129 #endif /* EFSYS_OPT_MCDI */
131 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
133 # error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
137 /* Support MCDI logging */
138 #if EFSYS_OPT_MCDI_LOGGING
140 # error "MCDI_LOGGING requires MCDI"
142 #endif /* EFSYS_OPT_MCDI_LOGGING */
144 /* Support MCDI proxy authorization */
145 #if EFSYS_OPT_MCDI_PROXY_AUTH
147 # error "MCDI_PROXY_AUTH requires MCDI"
149 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
151 #ifdef EFSYS_OPT_MON_LM87
152 # error "MON_LM87 is obsolete and is not supported."
155 #ifdef EFSYS_OPT_MON_MAX6647
156 # error "MON_MAX6647 is obsolete and is not supported."
159 #ifdef EFSYS_OPT_MON_NULL
160 # error "MON_NULL is obsolete and is not supported."
163 #ifdef EFSYS_OPT_MON_SIENA
164 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
167 #ifdef EFSYS_OPT_MON_HUNTINGTON
168 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
171 /* Support monitor statistics (voltage/temperature) */
172 #if EFSYS_OPT_MON_STATS
173 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
174 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD"
176 #endif /* EFSYS_OPT_MON_STATS */
178 /* Support Monitor via mcdi */
179 #if EFSYS_OPT_MON_MCDI
180 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
181 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD"
183 #endif /* EFSYS_OPT_MON_MCDI*/
185 /* Support printable names for statistics */
187 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
188 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
189 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
191 #endif /* EFSYS_OPT_NAMES */
193 /* Support non volatile configuration */
195 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
196 # error "NVRAM requires SIENA or HUNTINGTON or MEDFORD"
198 #endif /* EFSYS_OPT_NVRAM */
200 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
201 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
204 #ifdef EFSYS_OPT_NVRAM_SFT9001
205 # error "NVRAM_SFT9001 is obsolete and is not supported."
208 #ifdef EFSYS_OPT_NVRAM_SFX7101
209 # error "NVRAM_SFX7101 is obsolete and is not supported."
212 #ifdef EFSYS_OPT_PCIE_TUNE
213 # error "PCIE_TUNE is obsolete and is not supported."
216 #ifdef EFSYS_OPT_PHY_BIST
217 # error "PHY_BIST is obsolete (replaced by BIST)."
220 /* Support PHY flags */
221 #if EFSYS_OPT_PHY_FLAGS
222 # if !EFSYS_OPT_SIENA
223 # error "PHY_FLAGS requires SIENA"
225 #endif /* EFSYS_OPT_PHY_FLAGS */
227 /* Support for PHY LED control */
228 #if EFSYS_OPT_PHY_LED_CONTROL
229 # if !EFSYS_OPT_SIENA
230 # error "PHY_LED_CONTROL requires SIENA"
232 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
234 #ifdef EFSYS_OPT_PHY_NULL
235 # error "PHY_NULL is obsolete and is not supported."
238 #ifdef EFSYS_OPT_PHY_PM8358
239 # error "PHY_PM8358 is obsolete and is not supported."
242 #ifdef EFSYS_OPT_PHY_PROPS
243 # error "PHY_PROPS is obsolete and is not supported."
246 #ifdef EFSYS_OPT_PHY_QT2022C2
247 # error "PHY_QT2022C2 is obsolete and is not supported."
250 #ifdef EFSYS_OPT_PHY_QT2025C
251 # error "PHY_QT2025C is obsolete and is not supported."
254 #ifdef EFSYS_OPT_PHY_SFT9001
255 # error "PHY_SFT9001 is obsolete and is not supported."
258 #ifdef EFSYS_OPT_PHY_SFX7101
259 # error "PHY_SFX7101 is obsolete and is not supported."
262 /* Support PHY statistics */
263 #if EFSYS_OPT_PHY_STATS
264 # if !EFSYS_OPT_SIENA
265 # error "PHY_STATS requires SIENA"
267 #endif /* EFSYS_OPT_PHY_STATS */
269 #ifdef EFSYS_OPT_PHY_TXC43128
270 # error "PHY_TXC43128 is obsolete and is not supported."
273 /* Support EVQ/RXQ/TXQ statistics */
275 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
276 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
278 #endif /* EFSYS_OPT_QSTATS */
280 #ifdef EFSYS_OPT_RX_HDR_SPLIT
281 # error "RX_HDR_SPLIT is obsolete and is not supported"
284 /* Support receive scaling (RSS) */
285 #if EFSYS_OPT_RX_SCALE
286 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
287 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
289 #endif /* EFSYS_OPT_RX_SCALE */
291 /* Support receive scatter DMA */
292 #if EFSYS_OPT_RX_SCATTER
293 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
294 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
296 #endif /* EFSYS_OPT_RX_SCATTER */
298 #ifdef EFSYS_OPT_STAT_NAME
299 # error "STAT_NAME is obsolete (replaced by NAMES)."
302 /* Support PCI Vital Product Data (VPD) */
304 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
305 # error "VPD requires SIENA or HUNTINGTON or MEDFORD"
307 #endif /* EFSYS_OPT_VPD */
309 /* Support Wake on LAN */
311 # error "WOL is obsolete and is not supported"
312 #endif /* EFSYS_OPT_WOL */
314 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
315 # error "MCAST_FILTER_LIST is obsolete and is not supported"
320 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
321 # error "BIST requires SIENA or HUNTINGTON or MEDFORD"
323 #endif /* EFSYS_OPT_BIST */
325 /* Support MCDI licensing API */
326 #if EFSYS_OPT_LICENSING
328 # error "LICENSING requires MCDI"
330 # if !EFSYS_HAS_UINT64
331 # error "LICENSING requires UINT64"
333 #endif /* EFSYS_OPT_LICENSING */
335 /* Support adapters with missing static config (for factory use only) */
336 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
337 # if !EFSYS_OPT_MEDFORD
338 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
340 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
343 #endif /* _SYS_EFX_CHECK_H */