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 /* Check family options for EF10 architecture controllers. */
21 #define EFX_OPTS_EF10() \
22 (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
24 #ifdef EFSYS_OPT_FALCON
25 # error "FALCON is obsolete and is not supported."
29 /* Support NVRAM based boot config */
31 # error "BOOTCFG requires NVRAM"
33 #endif /* EFSYS_OPT_BOOTCFG */
35 #if EFSYS_OPT_CHECK_REG
36 /* Verify chip implements accessed registers */
37 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
38 # error "CHECK_REG requires EF10 arch or SIENA"
40 #endif /* EFSYS_OPT_CHECK_REG */
42 #if EFSYS_OPT_DECODE_INTR_FATAL
43 /* Decode fatal errors */
45 # error "INTR_FATAL requires SIENA"
47 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
50 /* Support diagnostic hardware tests */
51 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
52 # error "DIAG requires EF10 arch or SIENA"
54 #endif /* EFSYS_OPT_DIAG */
56 #if EFSYS_OPT_EV_PREFETCH
57 /* Support optimized EVQ data access */
58 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
59 # error "EV_PREFETCH requires EF10 arch or SIENA"
61 #endif /* EFSYS_OPT_EV_PREFETCH */
63 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
64 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
68 /* Support hardware packet filters */
69 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
70 # error "FILTER requires EF10 arch or SIENA"
72 #endif /* EFSYS_OPT_FILTER */
75 # if !EFSYS_OPT_FILTER
76 # error "EF10 arch requires FILTER"
78 #endif /* EFX_OPTS_EF10() */
80 #if EFSYS_OPT_LOOPBACK
81 /* Support hardware loopback modes */
82 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
83 # error "LOOPBACK requires EF10 arch or SIENA"
85 #endif /* EFSYS_OPT_LOOPBACK */
87 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
88 # error "MAC_FALCON_GMAC is obsolete and is not supported."
91 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
92 # error "MAC_FALCON_XMAC is obsolete and is not supported."
95 #if EFSYS_OPT_MAC_STATS
96 /* Support MAC statistics */
97 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
98 # error "MAC_STATS requires EF10 arch or SIENA"
100 #endif /* EFSYS_OPT_MAC_STATS */
103 /* Support management controller messages */
104 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
105 # error "MCDI requires EF10 arch or SIENA"
107 #endif /* EFSYS_OPT_MCDI */
109 #if (EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
111 # error "EF10 arch or SIENA requires MCDI"
115 #if EFSYS_OPT_MCDI_LOGGING
116 /* Support MCDI logging */
118 # error "MCDI_LOGGING requires MCDI"
120 #endif /* EFSYS_OPT_MCDI_LOGGING */
122 #if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER
123 /* Support MCDI proxy authorization (server) */
124 # if !EFSYS_OPT_MCDI_PROXY_AUTH
125 # error "MCDI_PROXY_AUTH_SERVER requires MCDI_PROXY_AUTH"
127 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
129 #if EFSYS_OPT_MCDI_PROXY_AUTH
130 /* Support MCDI proxy authorization (client) */
132 # error "MCDI_PROXY_AUTH requires MCDI"
134 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
136 #ifdef EFSYS_OPT_MON_LM87
137 # error "MON_LM87 is obsolete and is not supported."
140 #ifdef EFSYS_OPT_MON_MAX6647
141 # error "MON_MAX6647 is obsolete and is not supported."
144 #ifdef EFSYS_OPT_MON_NULL
145 # error "MON_NULL is obsolete and is not supported."
148 #ifdef EFSYS_OPT_MON_SIENA
149 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
152 #ifdef EFSYS_OPT_MON_HUNTINGTON
153 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
156 #if EFSYS_OPT_MON_STATS
157 /* Support monitor statistics (voltage/temperature) */
158 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
159 # error "MON_STATS requires EF10 arch or SIENA"
161 #endif /* EFSYS_OPT_MON_STATS */
163 #if EFSYS_OPT_MON_MCDI
164 /* Support Monitor via mcdi */
165 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
166 # error "MON_MCDI requires EF10 arch or SIENA"
168 #endif /* EFSYS_OPT_MON_MCDI*/
171 /* Support printable names for statistics */
172 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
173 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
174 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
176 #endif /* EFSYS_OPT_NAMES */
179 /* Support non volatile configuration */
180 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
181 # error "NVRAM requires EF10 arch or SIENA"
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 !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
222 # error "PHY_LED_CONTROL requires EF10 arch or SIENA"
224 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
226 #ifdef EFSYS_OPT_PHY_NULL
227 # error "PHY_NULL is obsolete and is not supported."
230 #ifdef EFSYS_OPT_PHY_PM8358
231 # error "PHY_PM8358 is obsolete and is not supported."
234 #ifdef EFSYS_OPT_PHY_PROPS
235 # error "PHY_PROPS is obsolete and is not supported."
238 #ifdef EFSYS_OPT_PHY_QT2022C2
239 # error "PHY_QT2022C2 is obsolete and is not supported."
242 #ifdef EFSYS_OPT_PHY_QT2025C
243 # error "PHY_QT2025C is obsolete and is not supported."
246 #ifdef EFSYS_OPT_PHY_SFT9001
247 # error "PHY_SFT9001 is obsolete and is not supported."
250 #ifdef EFSYS_OPT_PHY_SFX7101
251 # error "PHY_SFX7101 is obsolete and is not supported."
254 #if EFSYS_OPT_PHY_STATS
255 /* Support PHY statistics */
256 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
257 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
259 #endif /* EFSYS_OPT_PHY_STATS */
261 #ifdef EFSYS_OPT_PHY_TXC43128
262 # error "PHY_TXC43128 is obsolete and is not supported."
266 /* Support EVQ/RXQ/TXQ statistics */
267 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
268 # error "QSTATS requires EF10 arch or SIENA"
270 #endif /* EFSYS_OPT_QSTATS */
272 #ifdef EFSYS_OPT_RX_HDR_SPLIT
273 # error "RX_HDR_SPLIT is obsolete and is not supported"
276 #if EFSYS_OPT_RX_SCALE
277 /* Support receive scaling (RSS) */
278 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
279 # error "RX_SCALE requires EF10 arch or SIENA"
281 #endif /* EFSYS_OPT_RX_SCALE */
283 #if EFSYS_OPT_RX_SCATTER
284 /* Support receive scatter DMA */
285 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
286 # error "RX_SCATTER requires EF10 arch or SIENA"
288 #endif /* EFSYS_OPT_RX_SCATTER */
290 #ifdef EFSYS_OPT_STAT_NAME
291 # error "STAT_NAME is obsolete (replaced by NAMES)."
295 /* Support PCI Vital Product Data (VPD) */
296 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
297 # error "VPD requires EF10 arch or SIENA"
299 #endif /* EFSYS_OPT_VPD */
302 # error "WOL is obsolete and is not supported"
303 #endif /* EFSYS_OPT_WOL */
305 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
306 # error "MCAST_FILTER_LIST is obsolete and is not supported"
311 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
312 # error "BIST requires EF10 arch or SIENA"
314 #endif /* EFSYS_OPT_BIST */
316 #if EFSYS_OPT_LICENSING
317 /* Support MCDI licensing API */
319 # error "LICENSING requires MCDI"
321 # if !EFSYS_HAS_UINT64
322 # error "LICENSING requires UINT64"
324 #endif /* EFSYS_OPT_LICENSING */
326 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
327 /* Support adapters with missing static config (for factory use only) */
328 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
329 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
331 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
333 #if EFSYS_OPT_RX_PACKED_STREAM
334 /* Support packed stream mode */
335 # if !EFX_OPTS_EF10()
336 # error "PACKED_STREAM requires EF10 arch"
340 #if EFSYS_OPT_RX_ES_SUPER_BUFFER
341 /* Support equal stride super-buffer mode */
342 # if !(EFSYS_OPT_MEDFORD2)
343 # error "ES_SUPER_BUFFER requires MEDFORD2"
347 /* Support hardware assistance for tunnels */
349 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
350 # error "TUNNEL requires MEDFORD or MEDFORD2"
352 #endif /* EFSYS_OPT_TUNNEL */
354 #if EFSYS_OPT_FW_SUBVARIANT_AWARE
355 /* Advertise that the driver is firmware subvariant aware */
356 # if !(EFSYS_OPT_MEDFORD2)
357 # error "FW_SUBVARIANT_AWARE requires MEDFORD2"
362 /* Support enterprise virtual bridging */
363 # if !(EFX_OPTS_EF10())
364 # error "EVB requires EF10 arch"
366 #endif /* EFSYS_OPT_EVB */
368 #endif /* _SYS_EFX_CHECK_H */