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 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
186 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
189 #ifdef EFSYS_OPT_NVRAM_SFT9001
190 # error "NVRAM_SFT9001 is obsolete and is not supported."
193 #ifdef EFSYS_OPT_NVRAM_SFX7101
194 # error "NVRAM_SFX7101 is obsolete and is not supported."
197 #ifdef EFSYS_OPT_PCIE_TUNE
198 # error "PCIE_TUNE is obsolete and is not supported."
201 #ifdef EFSYS_OPT_PHY_BIST
202 # error "PHY_BIST is obsolete (replaced by BIST)."
205 #if EFSYS_OPT_PHY_FLAGS
206 /* Support PHY flags */
207 # if !EFSYS_OPT_SIENA
208 # error "PHY_FLAGS requires SIENA"
210 #endif /* EFSYS_OPT_PHY_FLAGS */
212 #if EFSYS_OPT_PHY_LED_CONTROL
213 /* Support for PHY LED control */
214 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
215 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
216 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
218 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
220 #ifdef EFSYS_OPT_PHY_NULL
221 # error "PHY_NULL is obsolete and is not supported."
224 #ifdef EFSYS_OPT_PHY_PM8358
225 # error "PHY_PM8358 is obsolete and is not supported."
228 #ifdef EFSYS_OPT_PHY_PROPS
229 # error "PHY_PROPS is obsolete and is not supported."
232 #ifdef EFSYS_OPT_PHY_QT2022C2
233 # error "PHY_QT2022C2 is obsolete and is not supported."
236 #ifdef EFSYS_OPT_PHY_QT2025C
237 # error "PHY_QT2025C is obsolete and is not supported."
240 #ifdef EFSYS_OPT_PHY_SFT9001
241 # error "PHY_SFT9001 is obsolete and is not supported."
244 #ifdef EFSYS_OPT_PHY_SFX7101
245 # error "PHY_SFX7101 is obsolete and is not supported."
248 #if EFSYS_OPT_PHY_STATS
249 /* Support PHY statistics */
250 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
251 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
253 #endif /* EFSYS_OPT_PHY_STATS */
255 #ifdef EFSYS_OPT_PHY_TXC43128
256 # error "PHY_TXC43128 is obsolete and is not supported."
260 /* Support EVQ/RXQ/TXQ statistics */
261 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
262 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
263 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
265 #endif /* EFSYS_OPT_QSTATS */
267 #ifdef EFSYS_OPT_RX_HDR_SPLIT
268 # error "RX_HDR_SPLIT is obsolete and is not supported"
271 #if EFSYS_OPT_RX_SCALE
272 /* Support receive scaling (RSS) */
273 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
274 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
275 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
277 #endif /* EFSYS_OPT_RX_SCALE */
279 #if EFSYS_OPT_RX_SCATTER
280 /* Support receive scatter DMA */
281 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
282 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
283 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
285 #endif /* EFSYS_OPT_RX_SCATTER */
287 #ifdef EFSYS_OPT_STAT_NAME
288 # error "STAT_NAME is obsolete (replaced by NAMES)."
292 /* Support PCI Vital Product Data (VPD) */
293 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
294 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
295 # error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
297 #endif /* EFSYS_OPT_VPD */
300 # error "WOL is obsolete and is not supported"
301 #endif /* EFSYS_OPT_WOL */
303 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
304 # error "MCAST_FILTER_LIST is obsolete and is not supported"
309 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
310 EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
311 # error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
313 #endif /* EFSYS_OPT_BIST */
315 #if EFSYS_OPT_LICENSING
316 /* Support MCDI licensing API */
318 # error "LICENSING requires MCDI"
320 # if !EFSYS_HAS_UINT64
321 # error "LICENSING requires UINT64"
323 #endif /* EFSYS_OPT_LICENSING */
325 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
326 /* Support adapters with missing static config (for factory use only) */
327 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
328 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
330 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
332 #if EFSYS_OPT_RX_PACKED_STREAM
333 /* Support packed stream mode */
334 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
335 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
339 /* Support hardware assistance for tunnels */
341 # if !EFSYS_OPT_MEDFORD
342 # error "TUNNEL requires MEDFORD"
344 #endif /* EFSYS_OPT_TUNNEL */
346 #endif /* _SYS_EFX_CHECK_H */