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 #if EFSYS_OPT_IMAGE_LAYOUT
212 /* Support signed image layout handling */
213 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
214 # error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"
216 #endif /* EFSYS_OPT_IMAGE_LAYOUT */
218 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
219 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
222 #ifdef EFSYS_OPT_NVRAM_SFT9001
223 # error "NVRAM_SFT9001 is obsolete and is not supported."
226 #ifdef EFSYS_OPT_NVRAM_SFX7101
227 # error "NVRAM_SFX7101 is obsolete and is not supported."
230 #ifdef EFSYS_OPT_PCIE_TUNE
231 # error "PCIE_TUNE is obsolete and is not supported."
234 #ifdef EFSYS_OPT_PHY_BIST
235 # error "PHY_BIST is obsolete (replaced by BIST)."
238 /* Support PHY flags */
239 #if EFSYS_OPT_PHY_FLAGS
240 # if !EFSYS_OPT_SIENA
241 # error "PHY_FLAGS requires SIENA"
243 #endif /* EFSYS_OPT_PHY_FLAGS */
245 /* Support for PHY LED control */
246 #if EFSYS_OPT_PHY_LED_CONTROL
247 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
248 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
249 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
251 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
253 #ifdef EFSYS_OPT_PHY_NULL
254 # error "PHY_NULL is obsolete and is not supported."
257 #ifdef EFSYS_OPT_PHY_PM8358
258 # error "PHY_PM8358 is obsolete and is not supported."
261 #ifdef EFSYS_OPT_PHY_PROPS
262 # error "PHY_PROPS is obsolete and is not supported."
265 #ifdef EFSYS_OPT_PHY_QT2022C2
266 # error "PHY_QT2022C2 is obsolete and is not supported."
269 #ifdef EFSYS_OPT_PHY_QT2025C
270 # error "PHY_QT2025C is obsolete and is not supported."
273 #ifdef EFSYS_OPT_PHY_SFT9001
274 # error "PHY_SFT9001 is obsolete and is not supported."
277 #ifdef EFSYS_OPT_PHY_SFX7101
278 # error "PHY_SFX7101 is obsolete and is not supported."
281 /* Support PHY statistics */
282 #if EFSYS_OPT_PHY_STATS
283 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
284 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
286 #endif /* EFSYS_OPT_PHY_STATS */
288 #ifdef EFSYS_OPT_PHY_TXC43128
289 # error "PHY_TXC43128 is obsolete and is not supported."
292 /* Support EVQ/RXQ/TXQ statistics */
294 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
295 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
296 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
298 #endif /* EFSYS_OPT_QSTATS */
300 #ifdef EFSYS_OPT_RX_HDR_SPLIT
301 # error "RX_HDR_SPLIT is obsolete and is not supported"
304 /* Support receive scaling (RSS) */
305 #if EFSYS_OPT_RX_SCALE
306 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
307 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
308 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
310 #endif /* EFSYS_OPT_RX_SCALE */
312 /* Support receive scatter DMA */
313 #if EFSYS_OPT_RX_SCATTER
314 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
315 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
316 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
318 #endif /* EFSYS_OPT_RX_SCATTER */
320 #ifdef EFSYS_OPT_STAT_NAME
321 # error "STAT_NAME is obsolete (replaced by NAMES)."
324 /* Support PCI Vital Product Data (VPD) */
326 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
327 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
328 # error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
330 #endif /* EFSYS_OPT_VPD */
332 /* Support Wake on LAN */
334 # error "WOL is obsolete and is not supported"
335 #endif /* EFSYS_OPT_WOL */
337 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
338 # error "MCAST_FILTER_LIST is obsolete and is not supported"
343 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
344 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
345 # error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
347 #endif /* EFSYS_OPT_BIST */
349 /* Support MCDI licensing API */
350 #if EFSYS_OPT_LICENSING
352 # error "LICENSING requires MCDI"
354 # if !EFSYS_HAS_UINT64
355 # error "LICENSING requires UINT64"
357 #endif /* EFSYS_OPT_LICENSING */
359 /* Support adapters with missing static config (for factory use only) */
360 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
361 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
362 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
364 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
366 /* Support packed stream mode */
367 #if EFSYS_OPT_RX_PACKED_STREAM
368 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
369 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
373 #if EFSYS_OPT_RX_ES_SUPER_BUFFER
374 /* Support equal stride super-buffer mode */
375 # if !(EFSYS_OPT_MEDFORD2)
376 # error "ES_SUPER_BUFFER requires MEDFORD2"
380 /* Support hardware assistance for tunnels */
382 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
383 # error "TUNNEL requires MEDFORD or MEDFORD2"
385 #endif /* EFSYS_OPT_TUNNEL */
387 #if EFSYS_OPT_FW_SUBVARIANT_AWARE
388 /* Advertise that the driver is firmware subvariant aware */
389 # if !(EFSYS_OPT_MEDFORD2)
390 # error "FW_SUBVARIANT_AWARE requires MEDFORD2"
394 #endif /* _SYS_EFX_CHECK_H */