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 || EFSYS_OPT_MEDFORD)
34 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
36 #endif /* EFSYS_OPT_CHECK_REG */
38 #if EFSYS_OPT_DECODE_INTR_FATAL
39 /* Decode fatal errors */
41 # error "INTR_FATAL requires SIENA"
43 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
46 /* Support diagnostic hardware tests */
47 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
48 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
50 #endif /* EFSYS_OPT_DIAG */
52 #if EFSYS_OPT_EV_PREFETCH
53 /* Support optimized EVQ data access */
54 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
55 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
57 #endif /* EFSYS_OPT_EV_PREFETCH */
59 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
60 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
64 /* Support hardware packet filters */
65 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
66 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
68 #endif /* EFSYS_OPT_FILTER */
70 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
71 # if !EFSYS_OPT_FILTER
72 # error "HUNTINGTON or MEDFORD requires FILTER"
74 #endif /* EFSYS_OPT_HUNTINGTON */
76 #if EFSYS_OPT_LOOPBACK
77 /* Support hardware loopback modes */
78 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
79 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD"
81 #endif /* EFSYS_OPT_LOOPBACK */
83 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
84 # error "MAC_FALCON_GMAC is obsolete and is not supported."
87 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
88 # error "MAC_FALCON_XMAC is obsolete and is not supported."
91 #if EFSYS_OPT_MAC_STATS
92 /* Support MAC statistics */
93 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
94 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
96 #endif /* EFSYS_OPT_MAC_STATS */
99 /* Support management controller messages */
100 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
101 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
103 #endif /* EFSYS_OPT_MCDI */
105 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
107 # error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
111 #if EFSYS_OPT_MCDI_LOGGING
112 /* Support MCDI logging */
114 # error "MCDI_LOGGING requires MCDI"
116 #endif /* EFSYS_OPT_MCDI_LOGGING */
118 #if EFSYS_OPT_MCDI_PROXY_AUTH
119 /* Support MCDI proxy authorization */
121 # error "MCDI_PROXY_AUTH requires MCDI"
123 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
125 #ifdef EFSYS_OPT_MON_LM87
126 # error "MON_LM87 is obsolete and is not supported."
129 #ifdef EFSYS_OPT_MON_MAX6647
130 # error "MON_MAX6647 is obsolete and is not supported."
133 #ifdef EFSYS_OPT_MON_NULL
134 # error "MON_NULL is obsolete and is not supported."
137 #ifdef EFSYS_OPT_MON_SIENA
138 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
141 #ifdef EFSYS_OPT_MON_HUNTINGTON
142 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
145 #if EFSYS_OPT_MON_STATS
146 /* Support monitor statistics (voltage/temperature) */
147 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
148 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD"
150 #endif /* EFSYS_OPT_MON_STATS */
152 #if EFSYS_OPT_MON_MCDI
153 /* Support Monitor via mcdi */
154 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
155 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD"
157 #endif /* EFSYS_OPT_MON_MCDI*/
160 /* Support printable names for statistics */
161 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
162 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
163 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
165 #endif /* EFSYS_OPT_NAMES */
168 /* Support non volatile configuration */
169 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
170 # error "NVRAM requires SIENA or HUNTINGTON or MEDFORD"
172 #endif /* EFSYS_OPT_NVRAM */
174 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
175 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
178 #ifdef EFSYS_OPT_NVRAM_SFT9001
179 # error "NVRAM_SFT9001 is obsolete and is not supported."
182 #ifdef EFSYS_OPT_NVRAM_SFX7101
183 # error "NVRAM_SFX7101 is obsolete and is not supported."
186 #ifdef EFSYS_OPT_PCIE_TUNE
187 # error "PCIE_TUNE is obsolete and is not supported."
190 #ifdef EFSYS_OPT_PHY_BIST
191 # error "PHY_BIST is obsolete (replaced by BIST)."
194 #if EFSYS_OPT_PHY_FLAGS
195 /* Support PHY flags */
196 # if !EFSYS_OPT_SIENA
197 # error "PHY_FLAGS requires SIENA"
199 #endif /* EFSYS_OPT_PHY_FLAGS */
201 #if EFSYS_OPT_PHY_LED_CONTROL
202 /* Support for PHY LED control */
203 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
204 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD"
206 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
208 #ifdef EFSYS_OPT_PHY_NULL
209 # error "PHY_NULL is obsolete and is not supported."
212 #ifdef EFSYS_OPT_PHY_PM8358
213 # error "PHY_PM8358 is obsolete and is not supported."
216 #ifdef EFSYS_OPT_PHY_PROPS
217 # error "PHY_PROPS is obsolete and is not supported."
220 #ifdef EFSYS_OPT_PHY_QT2022C2
221 # error "PHY_QT2022C2 is obsolete and is not supported."
224 #ifdef EFSYS_OPT_PHY_QT2025C
225 # error "PHY_QT2025C is obsolete and is not supported."
228 #ifdef EFSYS_OPT_PHY_SFT9001
229 # error "PHY_SFT9001 is obsolete and is not supported."
232 #ifdef EFSYS_OPT_PHY_SFX7101
233 # error "PHY_SFX7101 is obsolete and is not supported."
236 #if EFSYS_OPT_PHY_STATS
237 /* Support PHY statistics */
238 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
239 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
241 #endif /* EFSYS_OPT_PHY_STATS */
243 #ifdef EFSYS_OPT_PHY_TXC43128
244 # error "PHY_TXC43128 is obsolete and is not supported."
248 /* Support EVQ/RXQ/TXQ statistics */
249 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
250 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
252 #endif /* EFSYS_OPT_QSTATS */
254 #ifdef EFSYS_OPT_RX_HDR_SPLIT
255 # error "RX_HDR_SPLIT is obsolete and is not supported"
258 #if EFSYS_OPT_RX_SCALE
259 /* Support receive scaling (RSS) */
260 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
261 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
263 #endif /* EFSYS_OPT_RX_SCALE */
265 #if EFSYS_OPT_RX_SCATTER
266 /* Support receive scatter DMA */
267 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
268 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
270 #endif /* EFSYS_OPT_RX_SCATTER */
272 #ifdef EFSYS_OPT_STAT_NAME
273 # error "STAT_NAME is obsolete (replaced by NAMES)."
277 /* Support PCI Vital Product Data (VPD) */
278 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
279 # error "VPD requires SIENA or HUNTINGTON or MEDFORD"
281 #endif /* EFSYS_OPT_VPD */
284 # error "WOL is obsolete and is not supported"
285 #endif /* EFSYS_OPT_WOL */
287 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
288 # error "MCAST_FILTER_LIST is obsolete and is not supported"
293 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
294 # error "BIST requires SIENA or HUNTINGTON or MEDFORD"
296 #endif /* EFSYS_OPT_BIST */
298 #if EFSYS_OPT_LICENSING
299 /* Support MCDI licensing API */
301 # error "LICENSING requires MCDI"
303 # if !EFSYS_HAS_UINT64
304 # error "LICENSING requires UINT64"
306 #endif /* EFSYS_OPT_LICENSING */
308 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
309 /* Support adapters with missing static config (for factory use only) */
310 # if !EFSYS_OPT_MEDFORD
311 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
313 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
315 #if EFSYS_OPT_RX_PACKED_STREAM
316 /* Support packed stream mode */
317 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
318 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD"
322 /* Support hardware assistance for tunnels */
324 # if !EFSYS_OPT_MEDFORD
325 # error "TUNNEL requires MEDFORD"
327 #endif /* EFSYS_OPT_TUNNEL */
329 #endif /* _SYS_EFX_CHECK_H */