2 * This file is part of the Chelsio T4/T5/T6 Ethernet driver.
4 * Copyright (C) 2003-2017 Chelsio Communications. All rights reserved.
6 * This program is distributed in the hope that it will be useful, but WITHOUT
7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8 * FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
9 * release for licensing terms and conditions.
11 #ifndef __T4_PCI_ID_TBL_H__
12 #define __T4_PCI_ID_TBL_H__
15 * The Os-Dependent code can defined cpp macros for creating a PCI Device ID
16 * Table. This is useful because it allows the PCI ID Table to be maintained
17 * in a single place and all supporting OSes to get new PCI Device IDs
22 * CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
23 * -- Used to start the definition of the PCI ID Table.
25 * CH_PCI_DEVICE_ID_FUNCTION
26 * -- The PCI Function Number to use in the PCI Device ID Table. "0"
27 * -- for drivers attaching to PF0-3, "4" for drivers attaching to PF4,
28 * -- "8" for drivers attaching to SR-IOV Virtual Functions, etc.
30 * CH_PCI_DEVICE_ID_FUNCTION2 [optional]
31 * -- If defined, create a PCI Device ID Table with both
32 * -- CH_PCI_DEVICE_ID_FUNCTION and CH_PCI_DEVICE_ID_FUNCTION2 populated.
34 * CH_PCI_ID_TABLE_ENTRY(DeviceID)
35 * -- Used for the individual PCI Device ID entries. Note that we will
36 * -- be adding a trailing comma (",") after all of the entries (and
37 * -- between the pairs of entries if CH_PCI_DEVICE_ID_FUNCTION2 is defined).
39 * CH_PCI_DEVICE_ID_TABLE_DEFINE_END
40 * -- Used to finish the definition of the PCI ID Table. Note that we
41 * -- will be adding a trailing semi-colon (";") here.
43 * CH_PCI_DEVICE_ID_BYPASS_SUPPORTED [optional]
44 * -- If defined, indicates that the OS Driver has support for Bypass
49 * Some sanity checks ...
51 #ifndef CH_PCI_DEVICE_ID_FUNCTION
52 #error CH_PCI_DEVICE_ID_FUNCTION not defined!
54 #ifndef CH_PCI_ID_TABLE_ENTRY
55 #error CH_PCI_ID_TABLE_ENTRY not defined!
57 #ifndef CH_PCI_DEVICE_ID_TABLE_DEFINE_END
58 #error CH_PCI_DEVICE_ID_TABLE_DEFINE_END not defined!
62 * T4 and later ASICs use a PCI Device ID scheme of 0xVFPP where:
64 * V = "4" for T4; "5" for T5, etc.
65 * F = "0" for PF 0..3; "4".."7" for PF4..7; and "8" for VFs
66 * PP = adapter product designation
68 * We use this consistency in order to create the proper PCI Device IDs
69 * for the specified CH_PCI_DEVICE_ID_FUNCTION.
71 #ifndef CH_PCI_DEVICE_ID_FUNCTION2
72 #define CH_PCI_ID_TABLE_FENTRY(__DeviceID) \
73 CH_PCI_ID_TABLE_ENTRY((__DeviceID) | \
74 ((CH_PCI_DEVICE_ID_FUNCTION) << 8))
76 #define CH_PCI_ID_TABLE_FENTRY(__DeviceID) \
77 CH_PCI_ID_TABLE_ENTRY((__DeviceID) | \
78 ((CH_PCI_DEVICE_ID_FUNCTION) << 8)), \
79 CH_PCI_ID_TABLE_ENTRY((__DeviceID) | \
80 ((CH_PCI_DEVICE_ID_FUNCTION2) << 8))
83 /* Note : The comments against each entry are used by the scripts in the vmware drivers
84 * to correctly generate the pciid xml file, do not change the format currently used.
87 CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
91 * Unfortunately the FPGA PCI Device IDs don't follow the ASIC PCI
92 * Device ID numbering convetions for the Physical Functions.
94 #if CH_PCI_DEVICE_ID_FUNCTION != 8
95 CH_PCI_ID_TABLE_ENTRY(0xa000), /* PE10K FPGA */
96 CH_PCI_ID_TABLE_ENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */
97 CH_PCI_ID_TABLE_ENTRY(0xb001), /* PF0 T5 PE10K FPGA */
98 CH_PCI_ID_TABLE_ENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */
100 CH_PCI_ID_TABLE_FENTRY(0xa000), /* PE10K FPGA */
101 CH_PCI_ID_TABLE_FENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */
102 CH_PCI_ID_TABLE_FENTRY(0xb001), /* PF0 T5 PE10K FPGA */
103 CH_PCI_ID_TABLE_FENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */
104 CH_PCI_ID_TABLE_FENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */
108 * These FPGAs seem to be used only by the csiostor driver
110 #if ((CH_PCI_DEVICE_ID_FUNCTION == 5) || (CH_PCI_DEVICE_ID_FUNCTION == 6))
111 CH_PCI_ID_TABLE_ENTRY(0xa001), /* PF1 PE10K FPGA FCOE */
112 CH_PCI_ID_TABLE_ENTRY(0xa002), /* PE10K FPGA iSCSI */
113 CH_PCI_ID_TABLE_ENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */
119 CH_PCI_ID_TABLE_FENTRY(0x4000), /* T440-dbg */
120 CH_PCI_ID_TABLE_FENTRY(0x4001), /* T420-cr */
121 CH_PCI_ID_TABLE_FENTRY(0x4002), /* T422-cr */
122 CH_PCI_ID_TABLE_FENTRY(0x4003), /* T440-cr */
123 CH_PCI_ID_TABLE_FENTRY(0x4004), /* T420-bch */
124 CH_PCI_ID_TABLE_FENTRY(0x4005), /* T440-bch */
125 CH_PCI_ID_TABLE_FENTRY(0x4006), /* T440-ch */
126 CH_PCI_ID_TABLE_FENTRY(0x4007), /* T420-so */
127 CH_PCI_ID_TABLE_FENTRY(0x4008), /* T420-cx */
128 CH_PCI_ID_TABLE_FENTRY(0x4009), /* T420-bt */
129 CH_PCI_ID_TABLE_FENTRY(0x400a), /* T404-bt */
130 #ifdef CH_PCI_DEVICE_ID_BYPASS_SUPPORTED
131 CH_PCI_ID_TABLE_FENTRY(0x400b), /* B420-sr */
132 CH_PCI_ID_TABLE_FENTRY(0x400c), /* B404-bt */
134 CH_PCI_ID_TABLE_FENTRY(0x400d), /* T480-cr */
135 CH_PCI_ID_TABLE_FENTRY(0x400e), /* T440-LP-cr */
136 CH_PCI_ID_TABLE_FENTRY(0x4080), /* Custom T480-cr */
137 CH_PCI_ID_TABLE_FENTRY(0x4081), /* Custom T440-cr */
138 CH_PCI_ID_TABLE_FENTRY(0x4082), /* Custom T420-cr */
139 CH_PCI_ID_TABLE_FENTRY(0x4083), /* Custom T420-xaui */
140 CH_PCI_ID_TABLE_FENTRY(0x4084), /* Custom T440-cr */
141 CH_PCI_ID_TABLE_FENTRY(0x4085), /* Custom T420-cr */
142 CH_PCI_ID_TABLE_FENTRY(0x4086), /* Custom T440-bt */
143 CH_PCI_ID_TABLE_FENTRY(0x4087), /* Custom T440-cr */
144 CH_PCI_ID_TABLE_FENTRY(0x4088), /* Custom T440 2-xaui, 2-xfi */
149 CH_PCI_ID_TABLE_FENTRY(0x5000), /* T580-dbg */
150 CH_PCI_ID_TABLE_FENTRY(0x5001), /* T520-cr */
151 CH_PCI_ID_TABLE_FENTRY(0x5002), /* T522-cr */
152 CH_PCI_ID_TABLE_FENTRY(0x5003), /* T540-cr */
153 CH_PCI_ID_TABLE_FENTRY(0x5004), /* T520-bch */
154 CH_PCI_ID_TABLE_FENTRY(0x5005), /* T540-bch */
155 CH_PCI_ID_TABLE_FENTRY(0x5006), /* T540-ch */
156 CH_PCI_ID_TABLE_FENTRY(0x5007), /* T520-so */
157 CH_PCI_ID_TABLE_FENTRY(0x5008), /* T520-cx */
158 CH_PCI_ID_TABLE_FENTRY(0x5009), /* T520-bt */
159 CH_PCI_ID_TABLE_FENTRY(0x500a), /* T504-bt */
160 #ifdef CH_PCI_DEVICE_ID_BYPASS_SUPPORTED
161 CH_PCI_ID_TABLE_FENTRY(0x500b), /* B520-sr */
162 CH_PCI_ID_TABLE_FENTRY(0x500c), /* B504-bt */
164 CH_PCI_ID_TABLE_FENTRY(0x500d), /* T580-cr */
165 CH_PCI_ID_TABLE_FENTRY(0x500e), /* T540-LP-cr */
166 CH_PCI_ID_TABLE_FENTRY(0x5010), /* T580-LP-cr */
167 CH_PCI_ID_TABLE_FENTRY(0x5011), /* T520-LL-cr */
168 CH_PCI_ID_TABLE_FENTRY(0x5012), /* T560-cr */
169 CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */
170 CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */
171 CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */
172 CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */
173 CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */
174 CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */
175 CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */
176 CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */
177 CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */
178 CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-CR */
179 CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */
180 CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */
181 CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */
182 CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */
183 CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */
184 CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */
185 CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
186 CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */
187 CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */
188 CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom SECA */
189 CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */
190 CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */
191 CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */
192 CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */
193 CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */
194 CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */
195 CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */
196 CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */
197 CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */
198 CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */
201 CH_PCI_ID_TABLE_FENTRY(0x6000),
202 CH_PCI_ID_TABLE_FENTRY(0x6001),
203 CH_PCI_ID_TABLE_FENTRY(0x6002),
204 CH_PCI_ID_TABLE_FENTRY(0x6003),
205 CH_PCI_ID_TABLE_FENTRY(0x6004),
206 CH_PCI_ID_TABLE_FENTRY(0x6005),
207 CH_PCI_ID_TABLE_FENTRY(0x6006),
208 CH_PCI_ID_TABLE_FENTRY(0x6007),
209 CH_PCI_ID_TABLE_FENTRY(0x6008),
210 CH_PCI_ID_TABLE_FENTRY(0x6009),
211 CH_PCI_ID_TABLE_FENTRY(0x600d),
212 CH_PCI_ID_TABLE_FENTRY(0x6010),
213 CH_PCI_ID_TABLE_FENTRY(0x6011),
214 CH_PCI_ID_TABLE_FENTRY(0x6014),
215 CH_PCI_ID_TABLE_FENTRY(0x6015),
216 CH_PCI_DEVICE_ID_TABLE_DEFINE_END;
218 #endif /* __T4_PCI_ID_TBL_H__ */