Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is part of the Chelsio T4/T5 Ethernet driver for Linux.
0003  *
0004  * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved.
0005  *
0006  * This software is available to you under a choice of one of two
0007  * licenses.  You may choose to be licensed under the terms of the GNU
0008  * General Public License (GPL) Version 2, available from the file
0009  * COPYING in the main directory of this source tree, or the
0010  * OpenIB.org BSD license below:
0011  *
0012  *     Redistribution and use in source and binary forms, with or
0013  *     without modification, are permitted provided that the following
0014  *     conditions are met:
0015  *
0016  *      - Redistributions of source code must retain the above
0017  *        copyright notice, this list of conditions and the following
0018  *        disclaimer.
0019  *
0020  *      - Redistributions in binary form must reproduce the above
0021  *        copyright notice, this list of conditions and the following
0022  *        disclaimer in the documentation and/or other materials
0023  *        provided with the distribution.
0024  *
0025  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0026  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0027  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0028  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
0029  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
0030  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0031  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0032  * SOFTWARE.
0033  */
0034 #ifndef __T4_PCI_ID_TBL_H__
0035 #define __T4_PCI_ID_TBL_H__
0036 
0037 /* The code can defined cpp macros for creating a PCI Device ID Table. This is
0038  * useful because it allows the PCI ID Table to be maintained in a single place.
0039  *
0040  * The macros are:
0041  *
0042  * CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
0043  *   -- Used to start the definition of the PCI ID Table.
0044  *
0045  * CH_PCI_DEVICE_ID_FUNCTION
0046  *   -- The PCI Function Number to use in the PCI Device ID Table.  "0"
0047  *   -- for drivers attaching to PF0-3, "4" for drivers attaching to PF4,
0048  *   -- "8" for drivers attaching to SR-IOV Virtual Functions, etc.
0049  *
0050  * CH_PCI_DEVICE_ID_FUNCTION2 [optional]
0051  *   -- If defined, create a PCI Device ID Table with both
0052  *   -- CH_PCI_DEVICE_ID_FUNCTION and CH_PCI_DEVICE_ID_FUNCTION2 populated.
0053  *
0054  * CH_PCI_ID_TABLE_ENTRY(DeviceID)
0055  *   -- Used for the individual PCI Device ID entries.  Note that we will
0056  *   -- be adding a trailing comma (",") after all of the entries (and
0057  *   -- between the pairs of entries if CH_PCI_DEVICE_ID_FUNCTION2 is defined).
0058  *
0059  * CH_PCI_DEVICE_ID_TABLE_DEFINE_END
0060  *   -- Used to finish the definition of the PCI ID Table.  Note that we
0061  *   -- will be adding a trailing semi-colon (";") here.
0062  */
0063 #ifndef CH_PCI_DEVICE_ID_FUNCTION
0064 #error CH_PCI_DEVICE_ID_FUNCTION not defined!
0065 #endif
0066 #ifndef CH_PCI_ID_TABLE_ENTRY
0067 #error CH_PCI_ID_TABLE_ENTRY not defined!
0068 #endif
0069 #ifndef CH_PCI_DEVICE_ID_TABLE_DEFINE_END
0070 #error CH_PCI_DEVICE_ID_TABLE_DEFINE_END not defined!
0071 #endif
0072 
0073 /* T4 and later ASICs use a PCI Device ID scheme of 0xVFPP where:
0074  *
0075  *   V  = "4" for T4; "5" for T5, etc.
0076  *   F  = "0" for PF 0..3; "4".."7" for PF4..7; and "8" for VFs
0077  *   PP = adapter product designation
0078  *
0079  * We use this consistency in order to create the proper PCI Device IDs
0080  * for the specified CH_PCI_DEVICE_ID_FUNCTION.
0081  */
0082 #ifndef CH_PCI_DEVICE_ID_FUNCTION2
0083 #define CH_PCI_ID_TABLE_FENTRY(devid) \
0084     CH_PCI_ID_TABLE_ENTRY((devid) | \
0085                   ((CH_PCI_DEVICE_ID_FUNCTION) << 8))
0086 #else
0087 #define CH_PCI_ID_TABLE_FENTRY(devid) \
0088     CH_PCI_ID_TABLE_ENTRY((devid) | \
0089                   ((CH_PCI_DEVICE_ID_FUNCTION) << 8)), \
0090     CH_PCI_ID_TABLE_ENTRY((devid) | \
0091                   ((CH_PCI_DEVICE_ID_FUNCTION2) << 8))
0092 #endif
0093 
0094 CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
0095     /* T4 adapters:
0096      */
0097     CH_PCI_ID_TABLE_FENTRY(0x4000), /* T440-dbg */
0098     CH_PCI_ID_TABLE_FENTRY(0x4001), /* T420-cr */
0099     CH_PCI_ID_TABLE_FENTRY(0x4002), /* T422-cr */
0100     CH_PCI_ID_TABLE_FENTRY(0x4003), /* T440-cr */
0101     CH_PCI_ID_TABLE_FENTRY(0x4004), /* T420-bch */
0102     CH_PCI_ID_TABLE_FENTRY(0x4005), /* T440-bch */
0103     CH_PCI_ID_TABLE_FENTRY(0x4006), /* T440-ch */
0104     CH_PCI_ID_TABLE_FENTRY(0x4007), /* T420-so */
0105     CH_PCI_ID_TABLE_FENTRY(0x4008), /* T420-cx */
0106     CH_PCI_ID_TABLE_FENTRY(0x4009), /* T420-bt */
0107     CH_PCI_ID_TABLE_FENTRY(0x400a), /* T404-bt */
0108     CH_PCI_ID_TABLE_FENTRY(0x400b), /* B420-sr */
0109     CH_PCI_ID_TABLE_FENTRY(0x400c), /* B404-bt */
0110     CH_PCI_ID_TABLE_FENTRY(0x400d), /* T480-cr */
0111     CH_PCI_ID_TABLE_FENTRY(0x400e), /* T440-LP-cr */
0112     CH_PCI_ID_TABLE_FENTRY(0x4080), /* Custom T480-cr */
0113     CH_PCI_ID_TABLE_FENTRY(0x4081), /* Custom T440-cr */
0114     CH_PCI_ID_TABLE_FENTRY(0x4082), /* Custom T420-cr */
0115     CH_PCI_ID_TABLE_FENTRY(0x4083), /* Custom T420-xaui */
0116     CH_PCI_ID_TABLE_FENTRY(0x4084), /* Custom T440-cr */
0117     CH_PCI_ID_TABLE_FENTRY(0x4085), /* Custom T420-cr */
0118     CH_PCI_ID_TABLE_FENTRY(0x4086), /* Custom T440-bt */
0119     CH_PCI_ID_TABLE_FENTRY(0x4087), /* Custom T440-cr */
0120     CH_PCI_ID_TABLE_FENTRY(0x4088), /* Custom T440 2-xaui, 2-xfi */
0121 
0122     /* T5 adapters:
0123      */
0124     CH_PCI_ID_TABLE_FENTRY(0x5000), /* T580-dbg */
0125     CH_PCI_ID_TABLE_FENTRY(0x5001), /* T520-cr */
0126     CH_PCI_ID_TABLE_FENTRY(0x5002), /* T522-cr */
0127     CH_PCI_ID_TABLE_FENTRY(0x5003), /* T540-cr */
0128     CH_PCI_ID_TABLE_FENTRY(0x5004), /* T520-bch */
0129     CH_PCI_ID_TABLE_FENTRY(0x5005), /* T540-bch */
0130     CH_PCI_ID_TABLE_FENTRY(0x5006), /* T540-ch */
0131     CH_PCI_ID_TABLE_FENTRY(0x5007), /* T520-so */
0132     CH_PCI_ID_TABLE_FENTRY(0x5008), /* T520-cx */
0133     CH_PCI_ID_TABLE_FENTRY(0x5009), /* T520-bt */
0134     CH_PCI_ID_TABLE_FENTRY(0x500a), /* T504-bt */
0135     CH_PCI_ID_TABLE_FENTRY(0x500b), /* B520-sr */
0136     CH_PCI_ID_TABLE_FENTRY(0x500c), /* B504-bt */
0137     CH_PCI_ID_TABLE_FENTRY(0x500d), /* T580-cr */
0138     CH_PCI_ID_TABLE_FENTRY(0x500e), /* T540-LP-cr */
0139     CH_PCI_ID_TABLE_FENTRY(0x5010), /* T580-LP-cr */
0140     CH_PCI_ID_TABLE_FENTRY(0x5011), /* T520-LL-cr */
0141     CH_PCI_ID_TABLE_FENTRY(0x5012), /* T560-cr */
0142     CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */
0143     CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */
0144     CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */
0145     CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */
0146     CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */
0147     CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */
0148     CH_PCI_ID_TABLE_FENTRY(0x5019), /* T540-LP-BT */
0149     CH_PCI_ID_TABLE_FENTRY(0x501a), /* T540-SO-BT */
0150     CH_PCI_ID_TABLE_FENTRY(0x501b), /* T540-SO-CR */
0151     CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */
0152     CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */
0153     CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */
0154     CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-LP-CR */
0155     CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */
0156     CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */
0157     CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */
0158     CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */
0159     CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */
0160     CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */
0161     CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
0162     CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */
0163     CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */
0164     CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom T580-LP-CR */
0165     CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */
0166     CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */
0167     CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */
0168     CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */
0169     CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */
0170     CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */
0171     CH_PCI_ID_TABLE_FENTRY(0x509a), /* Custom T520-CR */
0172     CH_PCI_ID_TABLE_FENTRY(0x509b), /* Custom T540-CR LOM */
0173     CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR*/
0174     CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR*/
0175     CH_PCI_ID_TABLE_FENTRY(0x509e), /* Custom T520-CR */
0176     CH_PCI_ID_TABLE_FENTRY(0x509f), /* Custom T540-CR */
0177     CH_PCI_ID_TABLE_FENTRY(0x50a0), /* Custom T540-CR */
0178     CH_PCI_ID_TABLE_FENTRY(0x50a1), /* Custom T540-CR */
0179     CH_PCI_ID_TABLE_FENTRY(0x50a2), /* Custom T540-KR4 */
0180     CH_PCI_ID_TABLE_FENTRY(0x50a3), /* Custom T580-KR4 */
0181     CH_PCI_ID_TABLE_FENTRY(0x50a4), /* Custom 2x T540-CR */
0182     CH_PCI_ID_TABLE_FENTRY(0x50a5), /* Custom T522-BT */
0183     CH_PCI_ID_TABLE_FENTRY(0x50a6), /* Custom T522-BT-SO */
0184     CH_PCI_ID_TABLE_FENTRY(0x50a7), /* Custom T580-CR */
0185     CH_PCI_ID_TABLE_FENTRY(0x50a8), /* Custom T580-KR */
0186     CH_PCI_ID_TABLE_FENTRY(0x50a9), /* Custom T580-KR */
0187     CH_PCI_ID_TABLE_FENTRY(0x50aa), /* Custom T580-CR */
0188     CH_PCI_ID_TABLE_FENTRY(0x50ab), /* Custom T520-CR */
0189     CH_PCI_ID_TABLE_FENTRY(0x50ac), /* Custom T540-BT */
0190     CH_PCI_ID_TABLE_FENTRY(0x50ad), /* Custom T520-CR */
0191     CH_PCI_ID_TABLE_FENTRY(0x50ae), /* Custom T540-XL-SO */
0192     CH_PCI_ID_TABLE_FENTRY(0x50af), /* Custom T580-KR-SO */
0193     CH_PCI_ID_TABLE_FENTRY(0x50b0), /* Custom T520-CR-LOM */
0194 
0195     /* T6 adapters:
0196      */
0197     CH_PCI_ID_TABLE_FENTRY(0x6001),
0198     CH_PCI_ID_TABLE_FENTRY(0x6002),
0199     CH_PCI_ID_TABLE_FENTRY(0x6003),
0200     CH_PCI_ID_TABLE_FENTRY(0x6004),
0201     CH_PCI_ID_TABLE_FENTRY(0x6005),
0202     CH_PCI_ID_TABLE_FENTRY(0x6006),
0203     CH_PCI_ID_TABLE_FENTRY(0x6007),
0204     CH_PCI_ID_TABLE_FENTRY(0x6008),
0205     CH_PCI_ID_TABLE_FENTRY(0x6009),
0206     CH_PCI_ID_TABLE_FENTRY(0x600d),
0207     CH_PCI_ID_TABLE_FENTRY(0x6011),
0208     CH_PCI_ID_TABLE_FENTRY(0x6014),
0209     CH_PCI_ID_TABLE_FENTRY(0x6015),
0210     CH_PCI_ID_TABLE_FENTRY(0x6080),
0211     CH_PCI_ID_TABLE_FENTRY(0x6081),
0212     CH_PCI_ID_TABLE_FENTRY(0x6082), /* Custom T6225-CR SFP28 */
0213     CH_PCI_ID_TABLE_FENTRY(0x6083), /* Custom T62100-CR QSFP28 */
0214     CH_PCI_ID_TABLE_FENTRY(0x6084), /* Custom T64100-CR QSFP28 */
0215     CH_PCI_ID_TABLE_FENTRY(0x6085), /* Custom T6240-SO */
0216     CH_PCI_ID_TABLE_FENTRY(0x6086), /* Custom T6225-SO-CR */
0217     CH_PCI_ID_TABLE_FENTRY(0x6087), /* Custom T6225-CR */
0218     CH_PCI_ID_TABLE_FENTRY(0x6088), /* Custom T62100-CR */
0219     CH_PCI_ID_TABLE_FENTRY(0x6089), /* Custom T62100-KR */
0220     CH_PCI_ID_TABLE_FENTRY(0x608a), /* Custom T62100-CR */
0221     CH_PCI_ID_TABLE_FENTRY(0x608b), /* Custom T6225-CR */
0222     CH_PCI_ID_TABLE_FENTRY(0x6092), /* Custom T62100-CR-LOM */
0223 CH_PCI_DEVICE_ID_TABLE_DEFINE_END;
0224 
0225 #endif /* __T4_PCI_ID_TBL_H__ */