1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2012-2018 Solarflare Communications Inc.
7 #ifndef _SYS_EFX_CHECK_H
8 #define _SYS_EFX_CHECK_H
13 * Check that the efsys.h header in client code has a valid combination of
14 * EFSYS_OPT_xxx options.
16 * NOTE: Keep checks for obsolete options here to ensure that they are removed
17 * from client code (and do not reappear in merges from other branches).
20 #ifdef EFSYS_OPT_FALCON
21 # error "FALCON is obsolete and is not supported."
25 /* Support NVRAM based boot config */
27 # error "BOOTCFG requires NVRAM"
29 #endif /* EFSYS_OPT_BOOTCFG */
31 #if EFSYS_OPT_CHECK_REG
32 /* Verify chip implements accessed registers */
33 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
34 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
35 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
37 #endif /* EFSYS_OPT_CHECK_REG */
39 #if EFSYS_OPT_DECODE_INTR_FATAL
40 /* Decode fatal errors */
42 # error "INTR_FATAL requires SIENA"
44 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
47 /* Support diagnostic hardware tests */
48 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
49 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
50 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
52 #endif /* EFSYS_OPT_DIAG */
54 #if EFSYS_OPT_EV_PREFETCH
55 /* Support optimized EVQ data access */
56 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
57 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
58 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
60 #endif /* EFSYS_OPT_EV_PREFETCH */
62 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
63 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
67 /* Support hardware packet filters */
68 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
69 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
70 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
72 #endif /* EFSYS_OPT_FILTER */
74 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
75 # if !EFSYS_OPT_FILTER
76 # error "HUNTINGTON or MEDFORD or MEDFORD2 requires FILTER"
78 #endif /* EFSYS_OPT_HUNTINGTON */
80 #if EFSYS_OPT_LOOPBACK
81 /* Support hardware loopback modes */
82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
83 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
84 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
86 #endif /* EFSYS_OPT_LOOPBACK */
88 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
89 # error "MAC_FALCON_GMAC is obsolete and is not supported."
92 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
93 # error "MAC_FALCON_XMAC is obsolete and is not supported."
96 #if EFSYS_OPT_MAC_STATS
97 /* Support MAC statistics */
98 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
99 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
100 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
102 #endif /* EFSYS_OPT_MAC_STATS */
105 /* Support management controller messages */
106 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
107 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
108 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
110 #endif /* EFSYS_OPT_MCDI */
112 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
113 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
115 # error "SIENA or HUNTINGTON or MEDFORD or MEDFORD2 requires MCDI"
119 #if EFSYS_OPT_MCDI_LOGGING
120 /* Support MCDI logging */
122 # error "MCDI_LOGGING requires MCDI"
124 #endif /* EFSYS_OPT_MCDI_LOGGING */
126 #if EFSYS_OPT_MCDI_PROXY_AUTH
127 /* Support MCDI proxy authorization */
129 # error "MCDI_PROXY_AUTH requires MCDI"
131 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
133 #ifdef EFSYS_OPT_MON_LM87
134 # error "MON_LM87 is obsolete and is not supported."
137 #ifdef EFSYS_OPT_MON_MAX6647
138 # error "MON_MAX6647 is obsolete and is not supported."
141 #ifdef EFSYS_OPT_MON_NULL
142 # error "MON_NULL is obsolete and is not supported."
145 #ifdef EFSYS_OPT_MON_SIENA
146 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
149 #ifdef EFSYS_OPT_MON_HUNTINGTON
150 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
153 #if EFSYS_OPT_MON_STATS
154 /* Support monitor statistics (voltage/temperature) */
155 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
156 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
157 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
159 #endif /* EFSYS_OPT_MON_STATS */
161 #if EFSYS_OPT_MON_MCDI
162 /* Support Monitor via mcdi */
163 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
164 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
165 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
167 #endif /* EFSYS_OPT_MON_MCDI*/
170 /* Support printable names for statistics */
171 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
172 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
173 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
175 #endif /* EFSYS_OPT_NAMES */
178 /* Support non volatile configuration */
179 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
180 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
181 # error "NVRAM requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
183 #endif /* EFSYS_OPT_NVRAM */
185 #if EFSYS_OPT_IMAGE_LAYOUT
186 /* Support signed image layout handling */
187 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
188 # error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"
190 #endif /* EFSYS_OPT_IMAGE_LAYOUT */
192 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
193 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
196 #ifdef EFSYS_OPT_NVRAM_SFT9001
197 # error "NVRAM_SFT9001 is obsolete and is not supported."
200 #ifdef EFSYS_OPT_NVRAM_SFX7101
201 # error "NVRAM_SFX7101 is obsolete and is not supported."
204 #ifdef EFSYS_OPT_PCIE_TUNE
205 # error "PCIE_TUNE is obsolete and is not supported."
208 #ifdef EFSYS_OPT_PHY_BIST
209 # error "PHY_BIST is obsolete (replaced by BIST)."
212 #if EFSYS_OPT_PHY_FLAGS
213 /* Support PHY flags */
214 # if !EFSYS_OPT_SIENA
215 # error "PHY_FLAGS requires SIENA"
217 #endif /* EFSYS_OPT_PHY_FLAGS */
219 #if EFSYS_OPT_PHY_LED_CONTROL
220 /* Support for PHY LED control */
221 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
222 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
223 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
225 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
227 #ifdef EFSYS_OPT_PHY_NULL
228 # error "PHY_NULL is obsolete and is not supported."
231 #ifdef EFSYS_OPT_PHY_PM8358
232 # error "PHY_PM8358 is obsolete and is not supported."
235 #ifdef EFSYS_OPT_PHY_PROPS
236 # error "PHY_PROPS is obsolete and is not supported."
239 #ifdef EFSYS_OPT_PHY_QT2022C2
240 # error "PHY_QT2022C2 is obsolete and is not supported."
243 #ifdef EFSYS_OPT_PHY_QT2025C
244 # error "PHY_QT2025C is obsolete and is not supported."
247 #ifdef EFSYS_OPT_PHY_SFT9001
248 # error "PHY_SFT9001 is obsolete and is not supported."
251 #ifdef EFSYS_OPT_PHY_SFX7101
252 # error "PHY_SFX7101 is obsolete and is not supported."
255 #if EFSYS_OPT_PHY_STATS
256 /* Support PHY statistics */
257 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
258 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
260 #endif /* EFSYS_OPT_PHY_STATS */
262 #ifdef EFSYS_OPT_PHY_TXC43128
263 # error "PHY_TXC43128 is obsolete and is not supported."
267 /* Support EVQ/RXQ/TXQ statistics */
268 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
269 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
270 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
272 #endif /* EFSYS_OPT_QSTATS */
274 #ifdef EFSYS_OPT_RX_HDR_SPLIT
275 # error "RX_HDR_SPLIT is obsolete and is not supported"
278 #if EFSYS_OPT_RX_SCALE
279 /* Support receive scaling (RSS) */
280 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
281 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
282 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
284 #endif /* EFSYS_OPT_RX_SCALE */
286 #if EFSYS_OPT_RX_SCATTER
287 /* Support receive scatter DMA */
288 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
289 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
290 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
292 #endif /* EFSYS_OPT_RX_SCATTER */
294 #ifdef EFSYS_OPT_STAT_NAME
295 # error "STAT_NAME is obsolete (replaced by NAMES)."
299 /* Support PCI Vital Product Data (VPD) */
300 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
301 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
302 # error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
304 #endif /* EFSYS_OPT_VPD */
307 # error "WOL is obsolete and is not supported"
308 #endif /* EFSYS_OPT_WOL */
310 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
311 # error "MCAST_FILTER_LIST is obsolete and is not supported"
316 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
317 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
318 # error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
320 #endif /* EFSYS_OPT_BIST */
322 #if EFSYS_OPT_LICENSING
323 /* Support MCDI licensing API */
325 # error "LICENSING requires MCDI"
327 # if !EFSYS_HAS_UINT64
328 # error "LICENSING requires UINT64"
330 #endif /* EFSYS_OPT_LICENSING */
332 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
333 /* Support adapters with missing static config (for factory use only) */
334 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
335 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
337 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
339 #if EFSYS_OPT_RX_PACKED_STREAM
340 /* Support packed stream mode */
341 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
342 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
346 #if EFSYS_OPT_RX_ES_SUPER_BUFFER
347 /* Support equal stride super-buffer mode */
348 # if !(EFSYS_OPT_MEDFORD2)
349 # error "ES_SUPER_BUFFER requires MEDFORD2"
353 /* Support hardware assistance for tunnels */
355 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
356 # error "TUNNEL requires MEDFORD or MEDFORD2"
358 #endif /* EFSYS_OPT_TUNNEL */
360 #if EFSYS_OPT_FW_SUBVARIANT_AWARE
361 /* Advertise that the driver is firmware subvariant aware */
362 # if !(EFSYS_OPT_MEDFORD2)
363 # error "FW_SUBVARIANT_AWARE requires MEDFORD2"
367 #endif /* _SYS_EFX_CHECK_H */