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
123 /* Support MCDI proxy authorization */
125 # error "MCDI_PROXY_AUTH requires MCDI"
127 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
129 #ifdef EFSYS_OPT_MON_LM87
130 # error "MON_LM87 is obsolete and is not supported."
133 #ifdef EFSYS_OPT_MON_MAX6647
134 # error "MON_MAX6647 is obsolete and is not supported."
137 #ifdef EFSYS_OPT_MON_NULL
138 # error "MON_NULL is obsolete and is not supported."
141 #ifdef EFSYS_OPT_MON_SIENA
142 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
145 #ifdef EFSYS_OPT_MON_HUNTINGTON
146 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
149 #if EFSYS_OPT_MON_STATS
150 /* Support monitor statistics (voltage/temperature) */
151 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
152 # error "MON_STATS requires EF10 arch or SIENA"
154 #endif /* EFSYS_OPT_MON_STATS */
156 #if EFSYS_OPT_MON_MCDI
157 /* Support Monitor via mcdi */
158 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
159 # error "MON_MCDI requires EF10 arch or SIENA"
161 #endif /* EFSYS_OPT_MON_MCDI*/
164 /* Support printable names for statistics */
165 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
166 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
167 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
169 #endif /* EFSYS_OPT_NAMES */
172 /* Support non volatile configuration */
173 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
174 # error "NVRAM requires EF10 arch or SIENA"
176 #endif /* EFSYS_OPT_NVRAM */
178 #if EFSYS_OPT_IMAGE_LAYOUT
179 /* Support signed image layout handling */
180 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
181 # error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"
183 #endif /* EFSYS_OPT_IMAGE_LAYOUT */
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 !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
215 # error "PHY_LED_CONTROL requires EF10 arch or SIENA"
217 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
219 #ifdef EFSYS_OPT_PHY_NULL
220 # error "PHY_NULL is obsolete and is not supported."
223 #ifdef EFSYS_OPT_PHY_PM8358
224 # error "PHY_PM8358 is obsolete and is not supported."
227 #ifdef EFSYS_OPT_PHY_PROPS
228 # error "PHY_PROPS is obsolete and is not supported."
231 #ifdef EFSYS_OPT_PHY_QT2022C2
232 # error "PHY_QT2022C2 is obsolete and is not supported."
235 #ifdef EFSYS_OPT_PHY_QT2025C
236 # error "PHY_QT2025C is obsolete and is not supported."
239 #ifdef EFSYS_OPT_PHY_SFT9001
240 # error "PHY_SFT9001 is obsolete and is not supported."
243 #ifdef EFSYS_OPT_PHY_SFX7101
244 # error "PHY_SFX7101 is obsolete and is not supported."
247 #if EFSYS_OPT_PHY_STATS
248 /* Support PHY statistics */
249 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
250 # error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
252 #endif /* EFSYS_OPT_PHY_STATS */
254 #ifdef EFSYS_OPT_PHY_TXC43128
255 # error "PHY_TXC43128 is obsolete and is not supported."
259 /* Support EVQ/RXQ/TXQ statistics */
260 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
261 # error "QSTATS requires EF10 arch or SIENA"
263 #endif /* EFSYS_OPT_QSTATS */
265 #ifdef EFSYS_OPT_RX_HDR_SPLIT
266 # error "RX_HDR_SPLIT is obsolete and is not supported"
269 #if EFSYS_OPT_RX_SCALE
270 /* Support receive scaling (RSS) */
271 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
272 # error "RX_SCALE requires EF10 arch or SIENA"
274 #endif /* EFSYS_OPT_RX_SCALE */
276 #if EFSYS_OPT_RX_SCATTER
277 /* Support receive scatter DMA */
278 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
279 # error "RX_SCATTER requires EF10 arch or SIENA"
281 #endif /* EFSYS_OPT_RX_SCATTER */
283 #ifdef EFSYS_OPT_STAT_NAME
284 # error "STAT_NAME is obsolete (replaced by NAMES)."
288 /* Support PCI Vital Product Data (VPD) */
289 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
290 # error "VPD requires EF10 arch or SIENA"
292 #endif /* EFSYS_OPT_VPD */
295 # error "WOL is obsolete and is not supported"
296 #endif /* EFSYS_OPT_WOL */
298 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
299 # error "MCAST_FILTER_LIST is obsolete and is not supported"
304 # if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA)
305 # error "BIST requires EF10 arch or SIENA"
307 #endif /* EFSYS_OPT_BIST */
309 #if EFSYS_OPT_LICENSING
310 /* Support MCDI licensing API */
312 # error "LICENSING requires MCDI"
314 # if !EFSYS_HAS_UINT64
315 # error "LICENSING requires UINT64"
317 #endif /* EFSYS_OPT_LICENSING */
319 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
320 /* Support adapters with missing static config (for factory use only) */
321 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
322 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
324 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
326 #if EFSYS_OPT_RX_PACKED_STREAM
327 /* Support packed stream mode */
328 # if !EFX_OPTS_EF10()
329 # error "PACKED_STREAM requires EF10 arch"
333 #if EFSYS_OPT_RX_ES_SUPER_BUFFER
334 /* Support equal stride super-buffer mode */
335 # if !(EFSYS_OPT_MEDFORD2)
336 # error "ES_SUPER_BUFFER requires MEDFORD2"
340 /* Support hardware assistance for tunnels */
342 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
343 # error "TUNNEL requires MEDFORD or MEDFORD2"
345 #endif /* EFSYS_OPT_TUNNEL */
347 #if EFSYS_OPT_FW_SUBVARIANT_AWARE
348 /* Advertise that the driver is firmware subvariant aware */
349 # if !(EFSYS_OPT_MEDFORD2)
350 # error "FW_SUBVARIANT_AWARE requires MEDFORD2"
354 #endif /* _SYS_EFX_CHECK_H */