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 || \
60 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
61 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
63 #endif /* EFSYS_OPT_CHECK_REG */
65 /* Decode fatal errors */
66 #if EFSYS_OPT_DECODE_INTR_FATAL
68 # error "INTR_FATAL requires SIENA"
70 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
72 /* Support diagnostic hardware tests */
74 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
75 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
76 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
78 #endif /* EFSYS_OPT_DIAG */
80 /* Support optimized EVQ data access */
81 #if EFSYS_OPT_EV_PREFETCH
82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
83 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
84 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
86 #endif /* EFSYS_OPT_EV_PREFETCH */
88 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
89 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
92 /* Support hardware packet filters */
94 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
95 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
96 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
98 #endif /* EFSYS_OPT_FILTER */
100 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
101 # if !EFSYS_OPT_FILTER
102 # error "HUNTINGTON or MEDFORD or MEDFORD2 requires FILTER"
104 #endif /* EFSYS_OPT_HUNTINGTON */
106 /* Support hardware loopback modes */
107 #if EFSYS_OPT_LOOPBACK
108 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
109 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
110 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
112 #endif /* EFSYS_OPT_LOOPBACK */
114 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
115 # error "MAC_FALCON_GMAC is obsolete and is not supported."
118 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
119 # error "MAC_FALCON_XMAC is obsolete and is not supported."
122 /* Support MAC statistics */
123 #if EFSYS_OPT_MAC_STATS
124 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
125 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
126 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
128 #endif /* EFSYS_OPT_MAC_STATS */
130 /* Support management controller messages */
132 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
133 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
134 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
136 #endif /* EFSYS_OPT_MCDI */
138 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
139 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
141 # error "SIENA or HUNTINGTON or MEDFORD or MEDFORD2 requires MCDI"
145 /* Support MCDI logging */
146 #if EFSYS_OPT_MCDI_LOGGING
148 # error "MCDI_LOGGING requires MCDI"
150 #endif /* EFSYS_OPT_MCDI_LOGGING */
152 /* Support MCDI proxy authorization */
153 #if EFSYS_OPT_MCDI_PROXY_AUTH
155 # error "MCDI_PROXY_AUTH requires MCDI"
157 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
159 #ifdef EFSYS_OPT_MON_LM87
160 # error "MON_LM87 is obsolete and is not supported."
163 #ifdef EFSYS_OPT_MON_MAX6647
164 # error "MON_MAX6647 is obsolete and is not supported."
167 #ifdef EFSYS_OPT_MON_NULL
168 # error "MON_NULL is obsolete and is not supported."
171 #ifdef EFSYS_OPT_MON_SIENA
172 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
175 #ifdef EFSYS_OPT_MON_HUNTINGTON
176 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
179 /* Support monitor statistics (voltage/temperature) */
180 #if EFSYS_OPT_MON_STATS
181 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
182 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
183 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
185 #endif /* EFSYS_OPT_MON_STATS */
187 /* Support Monitor via mcdi */
188 #if EFSYS_OPT_MON_MCDI
189 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
190 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
191 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
193 #endif /* EFSYS_OPT_MON_MCDI*/
195 /* Support printable names for statistics */
197 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
198 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
199 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
201 #endif /* EFSYS_OPT_NAMES */
203 /* Support non volatile configuration */
205 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
206 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
207 # error "NVRAM requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
209 #endif /* EFSYS_OPT_NVRAM */
211 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
212 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
215 #ifdef EFSYS_OPT_NVRAM_SFT9001
216 # error "NVRAM_SFT9001 is obsolete and is not supported."
219 #ifdef EFSYS_OPT_NVRAM_SFX7101
220 # error "NVRAM_SFX7101 is obsolete and is not supported."
223 #ifdef EFSYS_OPT_PCIE_TUNE
224 # error "PCIE_TUNE is obsolete and is not supported."
227 #ifdef EFSYS_OPT_PHY_BIST
228 # error "PHY_BIST is obsolete (replaced by BIST)."
231 /* Support PHY flags */
232 #if EFSYS_OPT_PHY_FLAGS
233 # if !EFSYS_OPT_SIENA
234 # error "PHY_FLAGS requires SIENA"
236 #endif /* EFSYS_OPT_PHY_FLAGS */
238 /* Support for PHY LED control */
239 #if EFSYS_OPT_PHY_LED_CONTROL
240 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
241 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
242 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
244 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
246 #ifdef EFSYS_OPT_PHY_NULL
247 # error "PHY_NULL is obsolete and is not supported."
250 #ifdef EFSYS_OPT_PHY_PM8358
251 # error "PHY_PM8358 is obsolete and is not supported."
254 #ifdef EFSYS_OPT_PHY_PROPS
255 # error "PHY_PROPS is obsolete and is not supported."
258 #ifdef EFSYS_OPT_PHY_QT2022C2
259 # error "PHY_QT2022C2 is obsolete and is not supported."
262 #ifdef EFSYS_OPT_PHY_QT2025C
263 # error "PHY_QT2025C is obsolete and is not supported."
266 #ifdef EFSYS_OPT_PHY_SFT9001
267 # error "PHY_SFT9001 is obsolete and is not supported."
270 #ifdef EFSYS_OPT_PHY_SFX7101
271 # error "PHY_SFX7101 is obsolete and is not supported."
274 /* Support PHY statistics */
275 #if EFSYS_OPT_PHY_STATS
276 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
277 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
279 #endif /* EFSYS_OPT_PHY_STATS */
281 #ifdef EFSYS_OPT_PHY_TXC43128
282 # error "PHY_TXC43128 is obsolete and is not supported."
285 /* Support EVQ/RXQ/TXQ statistics */
287 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
288 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
289 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
291 #endif /* EFSYS_OPT_QSTATS */
293 #ifdef EFSYS_OPT_RX_HDR_SPLIT
294 # error "RX_HDR_SPLIT is obsolete and is not supported"
297 /* Support receive scaling (RSS) */
298 #if EFSYS_OPT_RX_SCALE
299 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
300 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
301 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
303 #endif /* EFSYS_OPT_RX_SCALE */
305 /* Support receive scatter DMA */
306 #if EFSYS_OPT_RX_SCATTER
307 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
308 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
309 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
311 #endif /* EFSYS_OPT_RX_SCATTER */
313 #ifdef EFSYS_OPT_STAT_NAME
314 # error "STAT_NAME is obsolete (replaced by NAMES)."
317 /* Support PCI Vital Product Data (VPD) */
319 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
320 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
321 # error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
323 #endif /* EFSYS_OPT_VPD */
325 /* Support Wake on LAN */
327 # error "WOL is obsolete and is not supported"
328 #endif /* EFSYS_OPT_WOL */
330 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
331 # error "MCAST_FILTER_LIST is obsolete and is not supported"
336 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
337 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
338 # error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
340 #endif /* EFSYS_OPT_BIST */
342 /* Support MCDI licensing API */
343 #if EFSYS_OPT_LICENSING
345 # error "LICENSING requires MCDI"
347 # if !EFSYS_HAS_UINT64
348 # error "LICENSING requires UINT64"
350 #endif /* EFSYS_OPT_LICENSING */
352 /* Support adapters with missing static config (for factory use only) */
353 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
354 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
355 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
357 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
359 /* Support packed stream mode */
360 #if EFSYS_OPT_RX_PACKED_STREAM
361 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
362 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
366 /* Support hardware assistance for tunnels */
368 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
369 # error "TUNNEL requires MEDFORD or MEDFORD2"
371 #endif /* EFSYS_OPT_TUNNEL */
373 #endif /* _SYS_EFX_CHECK_H */