t4_pci_id_tbl.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * This file is part of the Chelsio T4/T5 Ethernet driver for Linux.
  3. *
  4. * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved.
  5. *
  6. * This software is available to you under a choice of one of two
  7. * licenses. You may choose to be licensed under the terms of the GNU
  8. * General Public License (GPL) Version 2, available from the file
  9. * COPYING in the main directory of this source tree, or the
  10. * OpenIB.org BSD license below:
  11. *
  12. * Redistribution and use in source and binary forms, with or
  13. * without modification, are permitted provided that the following
  14. * conditions are met:
  15. *
  16. * - Redistributions of source code must retain the above
  17. * copyright notice, this list of conditions and the following
  18. * disclaimer.
  19. *
  20. * - Redistributions in binary form must reproduce the above
  21. * copyright notice, this list of conditions and the following
  22. * disclaimer in the documentation and/or other materials
  23. * provided with the distribution.
  24. *
  25. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  28. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  29. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  30. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  31. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  32. * SOFTWARE.
  33. */
  34. #ifndef __T4_PCI_ID_TBL_H__
  35. #define __T4_PCI_ID_TBL_H__
  36. /* The code can defined cpp macros for creating a PCI Device ID Table. This is
  37. * useful because it allows the PCI ID Table to be maintained in a single place.
  38. *
  39. * The macros are:
  40. *
  41. * CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
  42. * -- Used to start the definition of the PCI ID Table.
  43. *
  44. * CH_PCI_DEVICE_ID_FUNCTION
  45. * -- The PCI Function Number to use in the PCI Device ID Table. "0"
  46. * -- for drivers attaching to PF0-3, "4" for drivers attaching to PF4,
  47. * -- "8" for drivers attaching to SR-IOV Virtual Functions, etc.
  48. *
  49. * CH_PCI_DEVICE_ID_FUNCTION2 [optional]
  50. * -- If defined, create a PCI Device ID Table with both
  51. * -- CH_PCI_DEVICE_ID_FUNCTION and CH_PCI_DEVICE_ID_FUNCTION2 populated.
  52. *
  53. * CH_PCI_ID_TABLE_ENTRY(DeviceID)
  54. * -- Used for the individual PCI Device ID entries. Note that we will
  55. * -- be adding a trailing comma (",") after all of the entries (and
  56. * -- between the pairs of entries if CH_PCI_DEVICE_ID_FUNCTION2 is defined).
  57. *
  58. * CH_PCI_DEVICE_ID_TABLE_DEFINE_END
  59. * -- Used to finish the definition of the PCI ID Table. Note that we
  60. * -- will be adding a trailing semi-colon (";") here.
  61. */
  62. #ifndef CH_PCI_DEVICE_ID_FUNCTION
  63. #error CH_PCI_DEVICE_ID_FUNCTION not defined!
  64. #endif
  65. #ifndef CH_PCI_ID_TABLE_ENTRY
  66. #error CH_PCI_ID_TABLE_ENTRY not defined!
  67. #endif
  68. #ifndef CH_PCI_DEVICE_ID_TABLE_DEFINE_END
  69. #error CH_PCI_DEVICE_ID_TABLE_DEFINE_END not defined!
  70. #endif
  71. /* T4 and later ASICs use a PCI Device ID scheme of 0xVFPP where:
  72. *
  73. * V = "4" for T4; "5" for T5, etc.
  74. * F = "0" for PF 0..3; "4".."7" for PF4..7; and "8" for VFs
  75. * PP = adapter product designation
  76. *
  77. * We use this consistency in order to create the proper PCI Device IDs
  78. * for the specified CH_PCI_DEVICE_ID_FUNCTION.
  79. */
  80. #ifndef CH_PCI_DEVICE_ID_FUNCTION2
  81. #define CH_PCI_ID_TABLE_FENTRY(devid) \
  82. CH_PCI_ID_TABLE_ENTRY((devid) | \
  83. ((CH_PCI_DEVICE_ID_FUNCTION) << 8))
  84. #else
  85. #define CH_PCI_ID_TABLE_FENTRY(devid) \
  86. CH_PCI_ID_TABLE_ENTRY((devid) | \
  87. ((CH_PCI_DEVICE_ID_FUNCTION) << 8)), \
  88. CH_PCI_ID_TABLE_ENTRY((devid) | \
  89. ((CH_PCI_DEVICE_ID_FUNCTION2) << 8))
  90. #endif
  91. CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
  92. /* T4 adapters:
  93. */
  94. CH_PCI_ID_TABLE_FENTRY(0x4000), /* T440-dbg */
  95. CH_PCI_ID_TABLE_FENTRY(0x4001), /* T420-cr */
  96. CH_PCI_ID_TABLE_FENTRY(0x4002), /* T422-cr */
  97. CH_PCI_ID_TABLE_FENTRY(0x4003), /* T440-cr */
  98. CH_PCI_ID_TABLE_FENTRY(0x4004), /* T420-bch */
  99. CH_PCI_ID_TABLE_FENTRY(0x4005), /* T440-bch */
  100. CH_PCI_ID_TABLE_FENTRY(0x4006), /* T440-ch */
  101. CH_PCI_ID_TABLE_FENTRY(0x4007), /* T420-so */
  102. CH_PCI_ID_TABLE_FENTRY(0x4008), /* T420-cx */
  103. CH_PCI_ID_TABLE_FENTRY(0x4009), /* T420-bt */
  104. CH_PCI_ID_TABLE_FENTRY(0x400a), /* T404-bt */
  105. CH_PCI_ID_TABLE_FENTRY(0x400b), /* B420-sr */
  106. CH_PCI_ID_TABLE_FENTRY(0x400c), /* B404-bt */
  107. CH_PCI_ID_TABLE_FENTRY(0x400d), /* T480-cr */
  108. CH_PCI_ID_TABLE_FENTRY(0x400e), /* T440-LP-cr */
  109. CH_PCI_ID_TABLE_FENTRY(0x4080), /* Custom T480-cr */
  110. CH_PCI_ID_TABLE_FENTRY(0x4081), /* Custom T440-cr */
  111. CH_PCI_ID_TABLE_FENTRY(0x4082), /* Custom T420-cr */
  112. CH_PCI_ID_TABLE_FENTRY(0x4083), /* Custom T420-xaui */
  113. CH_PCI_ID_TABLE_FENTRY(0x4084), /* Custom T440-cr */
  114. CH_PCI_ID_TABLE_FENTRY(0x4085), /* Custom T420-cr */
  115. CH_PCI_ID_TABLE_FENTRY(0x4086), /* Custom T440-bt */
  116. CH_PCI_ID_TABLE_FENTRY(0x4087), /* Custom T440-cr */
  117. CH_PCI_ID_TABLE_FENTRY(0x4088), /* Custom T440 2-xaui, 2-xfi */
  118. /* T5 adapters:
  119. */
  120. CH_PCI_ID_TABLE_FENTRY(0x5000), /* T580-dbg */
  121. CH_PCI_ID_TABLE_FENTRY(0x5001), /* T520-cr */
  122. CH_PCI_ID_TABLE_FENTRY(0x5002), /* T522-cr */
  123. CH_PCI_ID_TABLE_FENTRY(0x5003), /* T540-cr */
  124. CH_PCI_ID_TABLE_FENTRY(0x5004), /* T520-bch */
  125. CH_PCI_ID_TABLE_FENTRY(0x5005), /* T540-bch */
  126. CH_PCI_ID_TABLE_FENTRY(0x5006), /* T540-ch */
  127. CH_PCI_ID_TABLE_FENTRY(0x5007), /* T520-so */
  128. CH_PCI_ID_TABLE_FENTRY(0x5008), /* T520-cx */
  129. CH_PCI_ID_TABLE_FENTRY(0x5009), /* T520-bt */
  130. CH_PCI_ID_TABLE_FENTRY(0x500a), /* T504-bt */
  131. CH_PCI_ID_TABLE_FENTRY(0x500b), /* B520-sr */
  132. CH_PCI_ID_TABLE_FENTRY(0x500c), /* B504-bt */
  133. CH_PCI_ID_TABLE_FENTRY(0x500d), /* T580-cr */
  134. CH_PCI_ID_TABLE_FENTRY(0x500e), /* T540-LP-cr */
  135. CH_PCI_ID_TABLE_FENTRY(0x5010), /* T580-LP-cr */
  136. CH_PCI_ID_TABLE_FENTRY(0x5011), /* T520-LL-cr */
  137. CH_PCI_ID_TABLE_FENTRY(0x5012), /* T560-cr */
  138. CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */
  139. CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */
  140. CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */
  141. CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */
  142. CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */
  143. CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */
  144. CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */
  145. CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */
  146. CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-LP-CR */
  147. CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */
  148. CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */
  149. CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */
  150. CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */
  151. CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */
  152. CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */
  153. CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
  154. CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */
  155. CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */
  156. CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom T580-LP-CR */
  157. CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */
  158. CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */
  159. CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */
  160. CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */
  161. /* T6 adapters:
  162. */
  163. CH_PCI_ID_TABLE_FENTRY(0x6001),
  164. CH_PCI_ID_TABLE_FENTRY(0x6002),
  165. CH_PCI_ID_TABLE_FENTRY(0x6003),
  166. CH_PCI_ID_TABLE_FENTRY(0x6004),
  167. CH_PCI_ID_TABLE_FENTRY(0x6005),
  168. CH_PCI_ID_TABLE_FENTRY(0x6006),
  169. CH_PCI_ID_TABLE_FENTRY(0x6007),
  170. CH_PCI_ID_TABLE_FENTRY(0x6009),
  171. CH_PCI_ID_TABLE_FENTRY(0x600d),
  172. CH_PCI_ID_TABLE_FENTRY(0x6010),
  173. CH_PCI_ID_TABLE_FENTRY(0x6011),
  174. CH_PCI_ID_TABLE_FENTRY(0x6014),
  175. CH_PCI_ID_TABLE_FENTRY(0x6015),
  176. CH_PCI_DEVICE_ID_TABLE_DEFINE_END;
  177. #endif /* __T4_PCI_ID_TBL_H__ */