net/sfc/base: import MCDI logging
[dpdk.git] / drivers / net / sfc / base / efx_check.h
1 /*
2  * Copyright (c) 2012-2016 Solarflare Communications Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  *    this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  *    this list of conditions and the following disclaimer in the documentation
12  *    and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *
26  * The views and conclusions contained in the software and documentation are
27  * those of the authors and should not be interpreted as representing official
28  * policies, either expressed or implied, of the FreeBSD Project.
29  */
30
31 #ifndef _SYS_EFX_CHECK_H
32 #define _SYS_EFX_CHECK_H
33
34 #include "efsys.h"
35
36 /*
37  * Check that the efsys.h header in client code has a valid combination of
38  * EFSYS_OPT_xxx options.
39  *
40  * NOTE: Keep checks for obsolete options here to ensure that they are removed
41  * from client code (and do not reappear in merges from other branches).
42  */
43
44 #ifdef EFSYS_OPT_FALCON
45 # error "FALCON is obsolete and is not supported."
46 #endif
47
48 #if EFSYS_OPT_CHECK_REG
49 /* Verify chip implements accessed registers */
50 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
51 #endif /* EFSYS_OPT_CHECK_REG */
52
53 #if EFSYS_OPT_DECODE_INTR_FATAL
54 /* Decode fatal errors */
55 #  error "INTR_FATAL requires SIENA"
56 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
57
58 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
59 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
60 #endif
61
62 #if EFSYS_OPT_FILTER
63 /* Support hardware packet filters */
64 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
65 #endif /* EFSYS_OPT_FILTER */
66
67 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
68 # error "MAC_FALCON_GMAC is obsolete and is not supported."
69 #endif
70
71 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
72 # error "MAC_FALCON_XMAC is obsolete and is not supported."
73 #endif
74
75 #if EFSYS_OPT_MCDI
76 /* Support management controller messages */
77 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
78 #endif /* EFSYS_OPT_MCDI */
79
80 #if EFSYS_OPT_MCDI_LOGGING
81 /* Support MCDI logging */
82 # if !EFSYS_OPT_MCDI
83 #  error "MCDI_LOGGING requires MCDI"
84 # endif
85 #endif /* EFSYS_OPT_MCDI_LOGGING */
86
87 #ifdef EFSYS_OPT_MON_LM87
88 # error "MON_LM87 is obsolete and is not supported."
89 #endif
90
91 #ifdef EFSYS_OPT_MON_MAX6647
92 # error "MON_MAX6647 is obsolete and is not supported."
93 #endif
94
95 #ifdef EFSYS_OPT_MON_NULL
96 # error "MON_NULL is obsolete and is not supported."
97 #endif
98
99 #ifdef EFSYS_OPT_MON_SIENA
100 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
101 #endif
102
103 #ifdef EFSYS_OPT_MON_HUNTINGTON
104 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
105 #endif
106
107 #if EFSYS_OPT_NAMES
108 /* Support printable names for statistics */
109 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
110         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
111 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
112 # endif
113 #endif /* EFSYS_OPT_NAMES */
114
115 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
116 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
117 #endif
118
119 #ifdef EFSYS_OPT_NVRAM_SFT9001
120 # error "NVRAM_SFT9001 is obsolete and is not supported."
121 #endif
122
123 #ifdef EFSYS_OPT_NVRAM_SFX7101
124 # error "NVRAM_SFX7101 is obsolete and is not supported."
125 #endif
126
127 #ifdef EFSYS_OPT_PCIE_TUNE
128 # error "PCIE_TUNE is obsolete and is not supported."
129 #endif
130
131 #ifdef EFSYS_OPT_PHY_BIST
132 # error "PHY_BIST is obsolete (replaced by BIST)."
133 #endif
134
135 #ifdef EFSYS_OPT_PHY_NULL
136 # error "PHY_NULL is obsolete and is not supported."
137 #endif
138
139 #ifdef EFSYS_OPT_PHY_PM8358
140 # error "PHY_PM8358 is obsolete and is not supported."
141 #endif
142
143 #ifdef EFSYS_OPT_PHY_PROPS
144 # error "PHY_PROPS is obsolete and is not supported."
145 #endif
146
147 #ifdef EFSYS_OPT_PHY_QT2022C2
148 # error "PHY_QT2022C2 is obsolete and is not supported."
149 #endif
150
151 #ifdef EFSYS_OPT_PHY_QT2025C
152 # error "PHY_QT2025C is obsolete and is not supported."
153 #endif
154
155 #ifdef EFSYS_OPT_PHY_SFT9001
156 # error "PHY_SFT9001 is obsolete and is not supported."
157 #endif
158
159 #ifdef EFSYS_OPT_PHY_SFX7101
160 # error "PHY_SFX7101 is obsolete and is not supported."
161 #endif
162
163 #ifdef EFSYS_OPT_PHY_TXC43128
164 # error "PHY_TXC43128 is obsolete and is not supported."
165 #endif
166
167 #ifdef EFSYS_OPT_RX_HDR_SPLIT
168 # error "RX_HDR_SPLIT is obsolete and is not supported"
169 #endif
170
171 #ifdef EFSYS_OPT_STAT_NAME
172 # error "STAT_NAME is obsolete (replaced by NAMES)."
173 #endif
174
175 #ifdef EFSYS_OPT_WOL
176 # error "WOL is obsolete and is not supported"
177 #endif /* EFSYS_OPT_WOL */
178
179 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
180 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
181 #endif
182
183 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
184 /* Support adapters with missing static config (for factory use only) */
185 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
186 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
187
188 #endif /* _SYS_EFX_CHECK_H */