2 * $Id: oldproc.c,v 1.20 1998/08/23 12:12:01 mj Exp $
4 * Backward-compatible procfs interface for PCI.
6 * Copyright 1993, 1994, 1995, 1997 Drew Eckhardt, Frederic Potter,
7 * David Mosberger-Tang, Martin Mares
10 #include <linux/config.h>
11 #include <linux/types.h>
12 #include <linux/kernel.h>
13 #include <linux/pci.h>
14 #include <linux/string.h>
15 #include <linux/sched.h>
16 #include <linux/init.h>
17 #include <linux/proc_fs.h>
23 unsigned short vendor
; /* vendor id */
24 unsigned short device
; /* device id */
26 const char *name
; /* device name */
29 #define DEVICE(vid,did,name) \
30 {PCI_VENDOR_ID_##vid, PCI_DEVICE_ID_##did, (name)}
33 * Sorted in ascending order by vendor and device.
34 * Use binary search for lookup. If you add a device make sure
35 * it is sequential by both vendor and device id.
37 struct pci_dev_info dev_info
[] = {
38 DEVICE( COMPAQ
, COMPAQ_1280
, "QVision 1280/p"),
39 DEVICE( COMPAQ
, COMPAQ_SMART2P
, "Smart-2/P RAID Controller"),
40 DEVICE( COMPAQ
, COMPAQ_NETEL100
,"Netelligent 10/100"),
41 DEVICE( COMPAQ
, COMPAQ_NETEL10
, "Netelligent 10"),
42 DEVICE( COMPAQ
, COMPAQ_NETFLEX3I
,"NetFlex 3"),
43 DEVICE( COMPAQ
, COMPAQ_NETEL100D
,"Netelligent 10/100 Dual"),
44 DEVICE( COMPAQ
, COMPAQ_NETEL100PI
,"Netelligent 10/100 ProLiant"),
45 DEVICE( COMPAQ
, COMPAQ_NETEL100I
,"Netelligent 10/100 Integrated"),
46 DEVICE( COMPAQ
, COMPAQ_THUNDER
, "ThunderLAN"),
47 DEVICE( COMPAQ
, COMPAQ_NETFLEX3B
,"NetFlex 3 BNC"),
48 DEVICE( NCR
, NCR_53C810
, "53c810"),
49 DEVICE( NCR
, NCR_53C820
, "53c820"),
50 DEVICE( NCR
, NCR_53C825
, "53c825"),
51 DEVICE( NCR
, NCR_53C815
, "53c815"),
52 DEVICE( NCR
, NCR_53C860
, "53c860"),
53 DEVICE( NCR
, NCR_53C896
, "53c896"),
54 DEVICE( NCR
, NCR_53C895
, "53c895"),
55 DEVICE( NCR
, NCR_53C885
, "53c885"),
56 DEVICE( NCR
, NCR_53C875
, "53c875"),
57 DEVICE( NCR
, NCR_53C875J
, "53c875J"),
58 DEVICE( ATI
, ATI_68800
, "68800AX"),
59 DEVICE( ATI
, ATI_215CT222
, "215CT222"),
60 DEVICE( ATI
, ATI_210888CX
, "210888CX"),
61 DEVICE( ATI
, ATI_215GB
, "Mach64 GB"),
62 DEVICE( ATI
, ATI_215GD
, "Mach64 GD (Rage Pro)"),
63 DEVICE( ATI
, ATI_215GI
, "Mach64 GI (Rage Pro)"),
64 DEVICE( ATI
, ATI_215GP
, "Mach64 GP (Rage Pro)"),
65 DEVICE( ATI
, ATI_215GQ
, "Mach64 GQ (Rage Pro)"),
66 DEVICE( ATI
, ATI_215GT
, "Mach64 GT (Rage II)"),
67 DEVICE( ATI
, ATI_215GTB
, "Mach64 GT (Rage II)"),
68 DEVICE( ATI
, ATI_210888GX
, "210888GX"),
69 DEVICE( ATI
, ATI_215LG
, "Mach64 LG (Rage Pro)"),
70 DEVICE( ATI
, ATI_264LT
, "Mach64 LT"),
71 DEVICE( ATI
, ATI_264VT
, "Mach64 VT"),
72 DEVICE( VLSI
, VLSI_82C592
, "82C592-FC1"),
73 DEVICE( VLSI
, VLSI_82C593
, "82C593-FC1"),
74 DEVICE( VLSI
, VLSI_82C594
, "82C594-AFC2"),
75 DEVICE( VLSI
, VLSI_82C597
, "82C597-AFC2"),
76 DEVICE( VLSI
, VLSI_82C541
, "82C541 Lynx"),
77 DEVICE( VLSI
, VLSI_82C543
, "82C543 Lynx ISA"),
78 DEVICE( VLSI
, VLSI_82C532
, "82C532"),
79 DEVICE( VLSI
, VLSI_82C534
, "82C534"),
80 DEVICE( VLSI
, VLSI_82C535
, "82C535"),
81 DEVICE( VLSI
, VLSI_82C147
, "82C147"),
82 DEVICE( VLSI
, VLSI_VAS96011
, "VAS96011 (Golden Gate II)"),
83 DEVICE( ADL
, ADL_2301
, "2301"),
84 DEVICE( NS
, NS_87415
, "87415"),
85 DEVICE( NS
, NS_87410
, "87410"),
86 DEVICE( TSENG
, TSENG_W32P_2
, "ET4000W32P"),
87 DEVICE( TSENG
, TSENG_W32P_b
, "ET4000W32P rev B"),
88 DEVICE( TSENG
, TSENG_W32P_c
, "ET4000W32P rev C"),
89 DEVICE( TSENG
, TSENG_W32P_d
, "ET4000W32P rev D"),
90 DEVICE( TSENG
, TSENG_ET6000
, "ET6000"),
91 DEVICE( WEITEK
, WEITEK_P9000
, "P9000"),
92 DEVICE( WEITEK
, WEITEK_P9100
, "P9100"),
93 DEVICE( DEC
, DEC_BRD
, "DC21050"),
94 DEVICE( DEC
, DEC_TULIP
, "DC21040"),
95 DEVICE( DEC
, DEC_TGA
, "TGA"),
96 DEVICE( DEC
, DEC_TULIP_FAST
, "DC21140"),
97 DEVICE( DEC
, DEC_TGA2
, "TGA2"),
98 DEVICE( DEC
, DEC_FDDI
, "DEFPA"),
99 DEVICE( DEC
, DEC_TULIP_PLUS
, "DC21041"),
100 DEVICE( DEC
, DEC_21142
, "DC21142"),
101 DEVICE( DEC
, DEC_21052
, "DC21052"),
102 DEVICE( DEC
, DEC_21150
, "DC21150"),
103 DEVICE( DEC
, DEC_21152
, "DC21152"),
104 DEVICE( CIRRUS
, CIRRUS_7548
, "GD 7548"),
105 DEVICE( CIRRUS
, CIRRUS_5430
, "GD 5430"),
106 DEVICE( CIRRUS
, CIRRUS_5434_4
, "GD 5434"),
107 DEVICE( CIRRUS
, CIRRUS_5434_8
, "GD 5434"),
108 DEVICE( CIRRUS
, CIRRUS_5436
, "GD 5436"),
109 DEVICE( CIRRUS
, CIRRUS_5446
, "GD 5446"),
110 DEVICE( CIRRUS
, CIRRUS_5480
, "GD 5480"),
111 DEVICE( CIRRUS
, CIRRUS_5464
, "GD 5464"),
112 DEVICE( CIRRUS
, CIRRUS_5465
, "GD 5465"),
113 DEVICE( CIRRUS
, CIRRUS_6729
, "CL 6729"),
114 DEVICE( CIRRUS
, CIRRUS_6832
, "PD 6832"),
115 DEVICE( CIRRUS
, CIRRUS_7542
, "CL 7542"),
116 DEVICE( CIRRUS
, CIRRUS_7543
, "CL 7543"),
117 DEVICE( CIRRUS
, CIRRUS_7541
, "CL 7541"),
118 DEVICE( IBM
, IBM_FIRE_CORAL
, "Fire Coral"),
119 DEVICE( IBM
, IBM_TR
, "Token Ring"),
120 DEVICE( IBM
, IBM_82G2675
, "82G2675"),
121 DEVICE( IBM
, IBM_MCA
, "MicroChannel"),
122 DEVICE( IBM
, IBM_82351
, "82351"),
123 DEVICE( IBM
, IBM_SERVERAID
, "ServeRAID"),
124 DEVICE( IBM
, IBM_TR_WAKE
, "Wake On LAN Token Ring"),
125 DEVICE( IBM
, IBM_MPIC
, "MPIC-2 Interrupt Controller"),
126 DEVICE( IBM
, IBM_3780IDSP
, "MWave DSP"),
127 DEVICE( IBM
, IBM_MPIC_2
, "MPIC-2 ASIC Interrupt Controller"),
128 DEVICE( WD
, WD_7197
, "WD 7197"),
129 DEVICE( AMD
, AMD_LANCE
, "79C970"),
130 DEVICE( AMD
, AMD_SCSI
, "53C974"),
131 DEVICE( TRIDENT
, TRIDENT_9397
, "Cyber9397"),
132 DEVICE( TRIDENT
, TRIDENT_9420
, "TG 9420"),
133 DEVICE( TRIDENT
, TRIDENT_9440
, "TG 9440"),
134 DEVICE( TRIDENT
, TRIDENT_9660
, "TG 9660 / Cyber9385"),
135 DEVICE( TRIDENT
, TRIDENT_9750
, "Image 975"),
136 DEVICE( AI
, AI_M1435
, "M1435"),
137 DEVICE( MATROX
, MATROX_MGA_2
, "Atlas PX2085"),
138 DEVICE( MATROX
, MATROX_MIL
, "Millennium"),
139 DEVICE( MATROX
, MATROX_MYS
, "Mystique"),
140 DEVICE( MATROX
, MATROX_MIL_2
, "Millennium II"),
141 DEVICE( MATROX
, MATROX_MIL_2_AGP
,"Millennium II AGP"),
142 DEVICE( MATROX
, MATROX_MGA_IMP
, "MGA Impression"),
143 DEVICE( CT
, CT_65545
, "65545"),
144 DEVICE( CT
, CT_65548
, "65548"),
145 DEVICE( CT
, CT_65550
, "65550"),
146 DEVICE( CT
, CT_65554
, "65554"),
147 DEVICE( CT
, CT_65555
, "65555"),
148 DEVICE( MIRO
, MIRO_36050
, "ZR36050"),
149 DEVICE( NEC
, NEC_PCX2
, "PowerVR PCX2"),
150 DEVICE( FD
, FD_36C70
, "TMC-18C30"),
151 DEVICE( SI
, SI_5591_AGP
, "5591/5592 AGP"),
152 DEVICE( SI
, SI_6202
, "6202"),
153 DEVICE( SI
, SI_503
, "85C503"),
154 DEVICE( SI
, SI_ACPI
, "ACPI"),
155 DEVICE( SI
, SI_5597_VGA
, "5597/5598 VGA"),
156 DEVICE( SI
, SI_6205
, "6205"),
157 DEVICE( SI
, SI_501
, "85C501"),
158 DEVICE( SI
, SI_496
, "85C496"),
159 DEVICE( SI
, SI_601
, "85C601"),
160 DEVICE( SI
, SI_5107
, "5107"),
161 DEVICE( SI
, SI_5511
, "85C5511"),
162 DEVICE( SI
, SI_5513
, "85C5513"),
163 DEVICE( SI
, SI_5571
, "5571"),
164 DEVICE( SI
, SI_5591
, "5591/5592 Host"),
165 DEVICE( SI
, SI_5597
, "5597/5598 Host"),
166 DEVICE( SI
, SI_7001
, "7001 USB"),
167 DEVICE( HP
, HP_J2585A
, "J2585A"),
168 DEVICE( HP
, HP_J2585B
, "J2585B (Lassen)"),
169 DEVICE( PCTECH
, PCTECH_RZ1000
, "RZ1000 (buggy)"),
170 DEVICE( PCTECH
, PCTECH_RZ1001
, "RZ1001 (buggy?)"),
171 DEVICE( PCTECH
, PCTECH_SAMURAI_0
,"Samurai 0"),
172 DEVICE( PCTECH
, PCTECH_SAMURAI_1
,"Samurai 1"),
173 DEVICE( PCTECH
, PCTECH_SAMURAI_IDE
,"Samurai IDE"),
174 DEVICE( DPT
, DPT
, "SmartCache/Raid"),
175 DEVICE( OPTI
, OPTI_92C178
, "92C178"),
176 DEVICE( OPTI
, OPTI_82C557
, "82C557 Viper-M"),
177 DEVICE( OPTI
, OPTI_82C558
, "82C558 Viper-M ISA+IDE"),
178 DEVICE( OPTI
, OPTI_82C621
, "82C621"),
179 DEVICE( OPTI
, OPTI_82C700
, "82C700"),
180 DEVICE( OPTI
, OPTI_82C701
, "82C701 FireStar Plus"),
181 DEVICE( OPTI
, OPTI_82C814
, "82C814 Firebridge 1"),
182 DEVICE( OPTI
, OPTI_82C822
, "82C822"),
183 DEVICE( OPTI
, OPTI_82C825
, "82C825 Firebridge 2"),
184 DEVICE( SGS
, SGS_2000
, "STG 2000X"),
185 DEVICE( SGS
, SGS_1764
, "STG 1764X"),
186 DEVICE( BUSLOGIC
, BUSLOGIC_MULTIMASTER_NC
, "MultiMaster NC"),
187 DEVICE( BUSLOGIC
, BUSLOGIC_MULTIMASTER
, "MultiMaster"),
188 DEVICE( BUSLOGIC
, BUSLOGIC_FLASHPOINT
, "FlashPoint"),
189 DEVICE( TI
, TI_TVP4010
, "TVP4010 Permedia"),
190 DEVICE( TI
, TI_TVP4020
, "TVP4020 Permedia 2"),
191 DEVICE( TI
, TI_PCI1130
, "PCI1130"),
192 DEVICE( TI
, TI_PCI1131
, "PCI1131"),
193 DEVICE( TI
, TI_PCI1250
, "PCI1250"),
194 DEVICE( OAK
, OAK_OTI107
, "OTI107"),
195 DEVICE( WINBOND2
, WINBOND2_89C940
,"NE2000-PCI"),
196 DEVICE( MOTOROLA
, MOTOROLA_MPC105
,"MPC105 Eagle"),
197 DEVICE( MOTOROLA
, MOTOROLA_MPC106
,"MPC106 Grackle"),
198 DEVICE( MOTOROLA
, MOTOROLA_RAVEN
, "Raven"),
199 DEVICE( PROMISE
, PROMISE_20246
, "IDE UltraDMA/33"),
200 DEVICE( PROMISE
, PROMISE_5300
, "DC5030"),
201 DEVICE( N9
, N9_I128
, "Imagine 128"),
202 DEVICE( N9
, N9_I128_2
, "Imagine 128v2"),
203 DEVICE( UMC
, UMC_UM8673F
, "UM8673F"),
204 DEVICE( UMC
, UMC_UM8891A
, "UM8891A"),
205 DEVICE( UMC
, UMC_UM8886BF
, "UM8886BF"),
206 DEVICE( UMC
, UMC_UM8886A
, "UM8886A"),
207 DEVICE( UMC
, UMC_UM8881F
, "UM8881F"),
208 DEVICE( UMC
, UMC_UM8886F
, "UM8886F"),
209 DEVICE( UMC
, UMC_UM9017F
, "UM9017F"),
210 DEVICE( UMC
, UMC_UM8886N
, "UM8886N"),
211 DEVICE( UMC
, UMC_UM8891N
, "UM8891N"),
212 DEVICE( X
, X_AGX016
, "ITT AGX016"),
213 DEVICE( PICOP
, PICOP_PT86C52X
, "PT86C52x Vesuvius"),
214 DEVICE( PICOP
, PICOP_PT80C524
, "PT80C524 Nile"),
215 DEVICE( APPLE
, APPLE_BANDIT
, "Bandit"),
216 DEVICE( APPLE
, APPLE_GC
, "Grand Central"),
217 DEVICE( APPLE
, APPLE_HYDRA
, "Hydra"),
218 DEVICE( NEXGEN
, NEXGEN_82C501
, "82C501"),
219 DEVICE( QLOGIC
, QLOGIC_ISP1020
, "ISP1020"),
220 DEVICE( QLOGIC
, QLOGIC_ISP1022
, "ISP1022"),
221 DEVICE( CYRIX
, CYRIX_5510
, "5510"),
222 DEVICE( CYRIX
, CYRIX_PCI_MASTER
,"PCI Master"),
223 DEVICE( CYRIX
, CYRIX_5520
, "5520"),
224 DEVICE( CYRIX
, CYRIX_5530_LEGACY
,"5530 Kahlua Legacy"),
225 DEVICE( CYRIX
, CYRIX_5530_SMI
, "5530 Kahlua SMI"),
226 DEVICE( CYRIX
, CYRIX_5530_IDE
, "5530 Kahlua IDE"),
227 DEVICE( CYRIX
, CYRIX_5530_AUDIO
,"5530 Kahlua Audio"),
228 DEVICE( CYRIX
, CYRIX_5530_VIDEO
,"5530 Kahlua Video"),
229 DEVICE( LEADTEK
, LEADTEK_805
, "S3 805"),
230 DEVICE( CONTAQ
, CONTAQ_82C599
, "82C599"),
231 DEVICE( CONTAQ
, CONTAQ_82C693
, "82C693"),
232 DEVICE( OLICOM
, OLICOM_OC3136
, "OC-3136/3137"),
233 DEVICE( OLICOM
, OLICOM_OC2315
, "OC-2315"),
234 DEVICE( OLICOM
, OLICOM_OC2325
, "OC-2325"),
235 DEVICE( OLICOM
, OLICOM_OC2183
, "OC-2183/2185"),
236 DEVICE( OLICOM
, OLICOM_OC2326
, "OC-2326"),
237 DEVICE( OLICOM
, OLICOM_OC6151
, "OC-6151/6152"),
238 DEVICE( SUN
, SUN_EBUS
, "PCI-EBus Bridge"),
239 DEVICE( SUN
, SUN_HAPPYMEAL
, "Happy Meal Ethernet"),
240 DEVICE( SUN
, SUN_SIMBA
, "Advanced PCI Bridge"),
241 DEVICE( SUN
, SUN_PBM
, "PCI Bus Module"),
242 DEVICE( SUN
, SUN_SABRE
, "Ultra IIi PCI"),
243 DEVICE( CMD
, CMD_640
, "640 (buggy)"),
244 DEVICE( CMD
, CMD_643
, "643"),
245 DEVICE( CMD
, CMD_646
, "646"),
246 DEVICE( CMD
, CMD_670
, "670"),
247 DEVICE( VISION
, VISION_QD8500
, "QD-8500"),
248 DEVICE( VISION
, VISION_QD8580
, "QD-8580"),
249 DEVICE( BROOKTREE
, BROOKTREE_848
, "Bt848"),
250 DEVICE( BROOKTREE
, BROOKTREE_849A
, "Bt849"),
251 DEVICE( BROOKTREE
, BROOKTREE_8474
, "Bt8474"),
252 DEVICE( SIERRA
, SIERRA_STB
, "STB Horizon 64"),
253 DEVICE( ACC
, ACC_2056
, "2056"),
254 DEVICE( WINBOND
, WINBOND_83769
, "W83769F"),
255 DEVICE( WINBOND
, WINBOND_82C105
, "SL82C105"),
256 DEVICE( WINBOND
, WINBOND_83C553
, "W83C553"),
257 DEVICE( DATABOOK
, DATABOOK_87144
, "DB87144"),
258 DEVICE( PLX
, PLX_9080
, "PCI9080 I2O"),
259 DEVICE( MADGE
, MADGE_MK2
, "Smart 16/4 BM Mk2 Ringnode"),
260 DEVICE( MADGE
, MADGE_C155S
, "Collage 155 Server"),
261 DEVICE( 3COM
, 3COM_3C339
, "3C339 TokenRing"),
262 DEVICE( 3COM
, 3COM_3C590
, "3C590 10bT"),
263 DEVICE( 3COM
, 3COM_3C595TX
, "3C595 100bTX"),
264 DEVICE( 3COM
, 3COM_3C595T4
, "3C595 100bT4"),
265 DEVICE( 3COM
, 3COM_3C595MII
, "3C595 100b-MII"),
266 DEVICE( 3COM
, 3COM_3C900TPO
, "3C900 10bTPO"),
267 DEVICE( 3COM
, 3COM_3C900COMBO
,"3C900 10b Combo"),
268 DEVICE( 3COM
, 3COM_3C905TX
, "3C905 100bTX"),
269 DEVICE( 3COM
, 3COM_3C905T4
, "3C905 100bT4"),
270 DEVICE( 3COM
, 3COM_3C905B_TX
, "3C905B 100bTX"),
271 DEVICE( SMC
, SMC_EPIC100
, "9432 TX"),
272 DEVICE( AL
, AL_M1445
, "M1445"),
273 DEVICE( AL
, AL_M1449
, "M1449"),
274 DEVICE( AL
, AL_M1451
, "M1451"),
275 DEVICE( AL
, AL_M1461
, "M1461"),
276 DEVICE( AL
, AL_M1489
, "M1489"),
277 DEVICE( AL
, AL_M1511
, "M1511"),
278 DEVICE( AL
, AL_M1513
, "M1513"),
279 DEVICE( AL
, AL_M1521
, "M1521"),
280 DEVICE( AL
, AL_M1523
, "M1523"),
281 DEVICE( AL
, AL_M1531
, "M1531 Aladdin IV"),
282 DEVICE( AL
, AL_M1533
, "M1533 Aladdin IV"),
283 DEVICE( AL
, AL_M3307
, "M3307 MPEG-1 decoder"),
284 DEVICE( AL
, AL_M4803
, "M4803"),
285 DEVICE( AL
, AL_M5219
, "M5219"),
286 DEVICE( AL
, AL_M5229
, "M5229 TXpro"),
287 DEVICE( AL
, AL_M5237
, "M5237 USB"),
288 DEVICE( SURECOM
, SURECOM_NE34
, "NE-34PCI LAN"),
289 DEVICE( NEOMAGIC
, NEOMAGIC_MAGICGRAPH_NM2070
, "Magicgraph NM2070"),
290 DEVICE( NEOMAGIC
, NEOMAGIC_MAGICGRAPH_128V
, "MagicGraph 128V"),
291 DEVICE( NEOMAGIC
, NEOMAGIC_MAGICGRAPH_128ZV
, "MagicGraph 128ZV"),
292 DEVICE( NEOMAGIC
, NEOMAGIC_MAGICGRAPH_NM2160
, "MagicGraph NM2160"),
293 DEVICE( ASP
, ASP_ABP940
, "ABP940"),
294 DEVICE( ASP
, ASP_ABP940U
, "ABP940U"),
295 DEVICE( ASP
, ASP_ABP940UW
, "ABP940UW"),
296 DEVICE( MACRONIX
, MACRONIX_MX98713
,"MX98713"),
297 DEVICE( MACRONIX
, MACRONIX_MX987x5
,"MX98715 / MX98725"),
298 DEVICE( CERN
, CERN_SPSB_PMC
, "STAR/RD24 SCI-PCI (PMC)"),
299 DEVICE( CERN
, CERN_SPSB_PCI
, "STAR/RD24 SCI-PCI (PMC)"),
300 DEVICE( CERN
, CERN_HIPPI_DST
, "HIPPI destination"),
301 DEVICE( CERN
, CERN_HIPPI_SRC
, "HIPPI source"),
302 DEVICE( IMS
, IMS_8849
, "8849"),
303 DEVICE( TEKRAM2
, TEKRAM2_690c
, "DC690c"),
304 DEVICE( TUNDRA
, TUNDRA_CA91C042
,"CA91C042 Universe"),
305 DEVICE( AMCC
, AMCC_MYRINET
, "Myrinet PCI (M2-PCI-32)"),
306 DEVICE( AMCC
, AMCC_PARASTATION
,"ParaStation Interface"),
307 DEVICE( AMCC
, AMCC_S5933
, "S5933 PCI44"),
308 DEVICE( AMCC
, AMCC_S5933_HEPC3
,"S5933 Traquair HEPC3"),
309 DEVICE( INTERG
, INTERG_1680
, "IGA-1680"),
310 DEVICE( INTERG
, INTERG_1682
, "IGA-1682"),
311 DEVICE( REALTEK
, REALTEK_8029
, "8029"),
312 DEVICE( REALTEK
, REALTEK_8129
, "8129"),
313 DEVICE( REALTEK
, REALTEK_8139
, "8139"),
314 DEVICE( TRUEVISION
, TRUEVISION_T1000
,"TARGA 1000"),
315 DEVICE( INIT
, INIT_320P
, "320 P"),
316 DEVICE( INIT
, INIT_360P
, "360 P"),
317 DEVICE( VIA
, VIA_82C505
, "VT 82C505"),
318 DEVICE( VIA
, VIA_82C561
, "VT 82C561"),
319 DEVICE( VIA
, VIA_82C586_1
, "VT 82C586 Apollo IDE"),
320 DEVICE( VIA
, VIA_82C576
, "VT 82C576 3V"),
321 DEVICE( VIA
, VIA_82C585
, "VT 82C585 Apollo VP1/VPX"),
322 DEVICE( VIA
, VIA_82C586_0
, "VT 82C586 Apollo ISA"),
323 DEVICE( VIA
, VIA_82C595
, "VT 82C595 Apollo VP2"),
324 DEVICE( VIA
, VIA_82C597_0
, "VT 82C597 Apollo VP3"),
325 DEVICE( VIA
, VIA_82C926
, "VT 82C926 Amazon"),
326 DEVICE( VIA
, VIA_82C416
, "VT 82C416MV"),
327 DEVICE( VIA
, VIA_82C595_97
, "VT 82C595 Apollo VP2/97"),
328 DEVICE( VIA
, VIA_82C586_2
, "VT 82C586 Apollo USB"),
329 DEVICE( VIA
, VIA_82C586_3
, "VT 82C586B Apollo ACPI"),
330 DEVICE( VIA
, VIA_86C100A
, "VT 86C100A"),
331 DEVICE( VIA
, VIA_82C597_1
, "VT 82C597 Apollo VP3 AGP"),
332 DEVICE( VORTEX
, VORTEX_GDT60x0
, "GDT 60x0"),
333 DEVICE( VORTEX
, VORTEX_GDT6000B
,"GDT 6000b"),
334 DEVICE( VORTEX
, VORTEX_GDT6x10
, "GDT 6110/6510"),
335 DEVICE( VORTEX
, VORTEX_GDT6x20
, "GDT 6120/6520"),
336 DEVICE( VORTEX
, VORTEX_GDT6530
, "GDT 6530"),
337 DEVICE( VORTEX
, VORTEX_GDT6550
, "GDT 6550"),
338 DEVICE( VORTEX
, VORTEX_GDT6x17
, "GDT 6117/6517"),
339 DEVICE( VORTEX
, VORTEX_GDT6x27
, "GDT 6127/6527"),
340 DEVICE( VORTEX
, VORTEX_GDT6537
, "GDT 6537"),
341 DEVICE( VORTEX
, VORTEX_GDT6557
, "GDT 6557"),
342 DEVICE( VORTEX
, VORTEX_GDT6x15
, "GDT 6115/6515"),
343 DEVICE( VORTEX
, VORTEX_GDT6x25
, "GDT 6125/6525"),
344 DEVICE( VORTEX
, VORTEX_GDT6535
, "GDT 6535"),
345 DEVICE( VORTEX
, VORTEX_GDT6555
, "GDT 6555"),
346 DEVICE( VORTEX
, VORTEX_GDT6x17RP
,"GDT 6117RP/6517RP"),
347 DEVICE( VORTEX
, VORTEX_GDT6x27RP
,"GDT 6127RP/6527RP"),
348 DEVICE( VORTEX
, VORTEX_GDT6537RP
,"GDT 6537RP"),
349 DEVICE( VORTEX
, VORTEX_GDT6557RP
,"GDT 6557RP"),
350 DEVICE( VORTEX
, VORTEX_GDT6x11RP
,"GDT 6111RP/6511RP"),
351 DEVICE( VORTEX
, VORTEX_GDT6x21RP
,"GDT 6121RP/6521RP"),
352 DEVICE( VORTEX
, VORTEX_GDT6x17RP1
,"GDT 6117RP1/6517RP1"),
353 DEVICE( VORTEX
, VORTEX_GDT6x27RP1
,"GDT 6127RP1/6527RP1"),
354 DEVICE( VORTEX
, VORTEX_GDT6537RP1
,"GDT 6537RP1"),
355 DEVICE( VORTEX
, VORTEX_GDT6557RP1
,"GDT 6557RP1"),
356 DEVICE( VORTEX
, VORTEX_GDT6x11RP1
,"GDT 6111RP1/6511RP1"),
357 DEVICE( VORTEX
, VORTEX_GDT6x21RP1
,"GDT 6121RP1/6521RP1"),
358 DEVICE( VORTEX
, VORTEX_GDT6x17RP2
,"GDT 6117RP2/6517RP2"),
359 DEVICE( VORTEX
, VORTEX_GDT6x27RP2
,"GDT 6127RP2/6527RP2"),
360 DEVICE( VORTEX
, VORTEX_GDT6537RP2
,"GDT 6537RP2"),
361 DEVICE( VORTEX
, VORTEX_GDT6557RP2
,"GDT 6557RP2"),
362 DEVICE( VORTEX
, VORTEX_GDT6x11RP2
,"GDT 6111RP2/6511RP2"),
363 DEVICE( VORTEX
, VORTEX_GDT6x21RP2
,"GDT 6121RP2/6521RP2"),
364 DEVICE( EF
, EF_ATM_FPGA
, "155P-MF1 (FPGA)"),
365 DEVICE( EF
, EF_ATM_ASIC
, "155P-MF1 (ASIC)"),
366 DEVICE( FORE
, FORE_PCA200PC
, "PCA-200PC"),
367 DEVICE( FORE
, FORE_PCA200E
, "PCA-200E"),
368 DEVICE( IMAGINGTECH
, IMAGINGTECH_ICPCI
, "MVC IC-PCI"),
369 DEVICE( PHILIPS
, PHILIPS_SAA7145
,"SAA7145"),
370 DEVICE( PHILIPS
, PHILIPS_SAA7146
,"SAA7146"),
371 DEVICE( CYCLONE
, CYCLONE_SDK
, "SDK"),
372 DEVICE( ALLIANCE
, ALLIANCE_PROMOTIO
, "Promotion-6410"),
373 DEVICE( ALLIANCE
, ALLIANCE_PROVIDEO
, "Provideo"),
374 DEVICE( ALLIANCE
, ALLIANCE_AT24
, "AT24"),
375 DEVICE( ALLIANCE
, ALLIANCE_AT3D
, "AT3D"),
376 DEVICE( VMIC
, VMIC_VME
, "VMIVME-7587"),
377 DEVICE( DIGI
, DIGI_EPC
, "AccelPort EPC"),
378 DEVICE( DIGI
, DIGI_RIGHTSWITCH
, "RightSwitch SE-6"),
379 DEVICE( DIGI
, DIGI_XEM
, "AccelPort Xem"),
380 DEVICE( DIGI
, DIGI_XR
, "AccelPort Xr"),
381 DEVICE( DIGI
, DIGI_CX
, "AccelPort C/X"),
382 DEVICE( DIGI
, DIGI_XRJ
, "AccelPort Xr/J"),
383 DEVICE( DIGI
, DIGI_EPCJ
, "AccelPort EPC/J"),
384 DEVICE( DIGI
, DIGI_XR_920
, "AccelPort Xr 920"),
385 DEVICE( MUTECH
, MUTECH_MV1000
, "MV-1000"),
386 DEVICE( RENDITION
, RENDITION_VERITE
,"Verite 1000"),
387 DEVICE( RENDITION
, RENDITION_VERITE2100
,"Verite 2100"),
388 DEVICE( TOSHIBA
, TOSHIBA_601
, "Laptop"),
389 DEVICE( TOSHIBA
, TOSHIBA_TOPIC95
,"ToPIC95"),
390 DEVICE( TOSHIBA
, TOSHIBA_TOPIC97
,"ToPIC97"),
391 DEVICE( RICOH
, RICOH_RL5C466
, "RL5C466"),
392 DEVICE( ARTOP
, ARTOP_ATP850UF
, "ATP850UF"),
393 DEVICE( ZEITNET
, ZEITNET_1221
, "1221"),
394 DEVICE( ZEITNET
, ZEITNET_1225
, "1225"),
395 DEVICE( OMEGA
, OMEGA_82C092G
, "82C092G"),
396 DEVICE( LITEON
, LITEON_LNE100TX
,"LNE100TX"),
397 DEVICE( NP
, NP_PCI_FDDI
, "NP-PCI"),
398 DEVICE( ATT
, ATT_L56XMF
, "L56xMF"),
399 DEVICE( SPECIALIX
, SPECIALIX_XIO
, "XIO/SIO host"),
400 DEVICE( SPECIALIX
, SPECIALIX_RIO
, "RIO host"),
401 DEVICE( AURAVISION
, AURAVISION_VXP524
,"VXP524"),
402 DEVICE( IKON
, IKON_10115
, "10115 Greensheet"),
403 DEVICE( IKON
, IKON_10117
, "10117 Greensheet"),
404 DEVICE( ZORAN
, ZORAN_36057
, "ZR36057"),
405 DEVICE( ZORAN
, ZORAN_36120
, "ZR36120"),
406 DEVICE( KINETIC
, KINETIC_2915
, "2915 CAMAC"),
407 DEVICE( COMPEX
, COMPEX_ENET100VG4
, "Readylink ENET100-VG4"),
408 DEVICE( COMPEX
, COMPEX_RL2000
, "ReadyLink 2000"),
409 DEVICE( RP
, RP32INTF
, "RocketPort 32 Intf"),
410 DEVICE( RP
, RP8INTF
, "RocketPort 8 Intf"),
411 DEVICE( RP
, RP16INTF
, "RocketPort 16 Intf"),
412 DEVICE( RP
, RP4QUAD
, "Rocketport 4 Quad"),
413 DEVICE( RP
, RP8OCTA
, "RocketPort 8 Oct"),
414 DEVICE( RP
, RP8J
, "RocketPort 8 J"),
415 DEVICE( RP
, RPP4
, "RocketPort Plus 4 Quad"),
416 DEVICE( RP
, RPP8
, "RocketPort Plus 8 Oct"),
417 DEVICE( RP
, RP8M
, "RocketModem 8 J"),
418 DEVICE( CYCLADES
, CYCLOM_Y_Lo
, "Cyclom-Y below 1Mbyte"),
419 DEVICE( CYCLADES
, CYCLOM_Y_Hi
, "Cyclom-Y above 1Mbyte"),
420 DEVICE( CYCLADES
, CYCLOM_Z_Lo
, "Cyclom-Z below 1Mbyte"),
421 DEVICE( CYCLADES
, CYCLOM_Z_Hi
, "Cyclom-Z above 1Mbyte"),
422 DEVICE( ESSENTIAL
, ESSENTIAL_ROADRUNNER
,"Roadrunner serial HIPPI"),
423 DEVICE( O2
, O2_6832
, "6832"),
424 DEVICE( 3DFX
, 3DFX_VOODOO
, "Voodoo"),
425 DEVICE( 3DFX
, 3DFX_VOODOO2
, "Voodoo2"),
426 DEVICE( SIGMADES
, SIGMADES_6425
, "REALmagic64/GX"),
427 DEVICE( STALLION
, STALLION_ECHPCI832
,"EasyConnection 8/32"),
428 DEVICE( STALLION
, STALLION_ECHPCI864
,"EasyConnection 8/64"),
429 DEVICE( STALLION
, STALLION_EIOPCI
,"EasyIO"),
430 DEVICE( OPTIBASE
, OPTIBASE_FORGE
, "MPEG Forge"),
431 DEVICE( OPTIBASE
, OPTIBASE_FUSION
,"MPEG Fusion"),
432 DEVICE( OPTIBASE
, OPTIBASE_VPLEX
, "VideoPlex"),
433 DEVICE( OPTIBASE
, OPTIBASE_VPLEXCC
,"VideoPlex CC"),
434 DEVICE( OPTIBASE
, OPTIBASE_VQUEST
,"VideoQuest"),
435 DEVICE( SATSAGEM
, SATSAGEM_PCR2101
,"PCR2101 DVB receiver"),
436 DEVICE( SATSAGEM
, SATSAGEM_TELSATTURBO
,"Telsat Turbo DVB"),
437 DEVICE( HUGHES
, HUGHES_DIRECPC
, "DirecPC"),
438 DEVICE( ENSONIQ
, ENSONIQ_AUDIOPCI
,"AudioPCI"),
439 DEVICE( ALTEON
, ALTEON_ACENIC
,"AceNIC"),
440 DEVICE( PICTUREL
, PICTUREL_PCIVST
,"PCIVST"),
441 DEVICE( NVIDIA_SGS
, NVIDIA_SGS_RIVA128
, "Riva 128"),
442 DEVICE( CBOARDS
, CBOARDS_DAS1602_16
,"DAS1602/16"),
443 DEVICE( SYMPHONY
, SYMPHONY_101
, "82C101"),
444 DEVICE( TEKRAM
, TEKRAM_DC290
, "DC-290"),
445 DEVICE( 3DLABS
, 3DLABS_300SX
, "GLINT 300SX"),
446 DEVICE( 3DLABS
, 3DLABS_500TX
, "GLINT 500TX"),
447 DEVICE( 3DLABS
, 3DLABS_DELTA
, "GLINT Delta"),
448 DEVICE( 3DLABS
, 3DLABS_PERMEDIA
,"PERMEDIA"),
449 DEVICE( 3DLABS
, 3DLABS_MX
, "GLINT MX"),
450 DEVICE( AVANCE
, AVANCE_ALG2064
, "ALG2064i"),
451 DEVICE( AVANCE
, AVANCE_2302
, "ALG-2302"),
452 DEVICE( NETVIN
, NETVIN_NV5000SC
,"NV5000"),
453 DEVICE( S3
, S3_PLATO_PXS
, "PLATO/PX (system)"),
454 DEVICE( S3
, S3_ViRGE
, "ViRGE"),
455 DEVICE( S3
, S3_TRIO
, "Trio32/Trio64"),
456 DEVICE( S3
, S3_AURORA64VP
, "Aurora64V+"),
457 DEVICE( S3
, S3_TRIO64UVP
, "Trio64UV+"),
458 DEVICE( S3
, S3_ViRGE_VX
, "ViRGE/VX"),
459 DEVICE( S3
, S3_868
, "Vision 868"),
460 DEVICE( S3
, S3_928
, "Vision 928-P"),
461 DEVICE( S3
, S3_864_1
, "Vision 864-P"),
462 DEVICE( S3
, S3_864_2
, "Vision 864-P"),
463 DEVICE( S3
, S3_964_1
, "Vision 964-P"),
464 DEVICE( S3
, S3_964_2
, "Vision 964-P"),
465 DEVICE( S3
, S3_968
, "Vision 968"),
466 DEVICE( S3
, S3_TRIO64V2
, "Trio64V2/DX or /GX"),
467 DEVICE( S3
, S3_PLATO_PXG
, "PLATO/PX (graphics)"),
468 DEVICE( S3
, S3_ViRGE_DXGX
, "ViRGE/DX or /GX"),
469 DEVICE( S3
, S3_ViRGE_GX2
, "ViRGE/GX2"),
470 DEVICE( S3
, S3_ViRGE_MX
, "ViRGE/MX"),
471 DEVICE( S3
, S3_ViRGE_MXP
, "ViRGE/MX+"),
472 DEVICE( S3
, S3_ViRGE_MXPMV
, "ViRGE/MX+MV"),
473 DEVICE( S3
, S3_SONICVIBES
, "SonicVibes"),
474 DEVICE( INTEL
, INTEL_82375
, "82375EB"),
475 DEVICE( INTEL
, INTEL_82424
, "82424ZX Saturn"),
476 DEVICE( INTEL
, INTEL_82378
, "82378IB"),
477 DEVICE( INTEL
, INTEL_82430
, "82430ZX Aries"),
478 DEVICE( INTEL
, INTEL_82434
, "82434LX Mercury/Neptune"),
479 DEVICE( INTEL
, INTEL_82092AA_0
,"82092AA PCMCIA bridge"),
480 DEVICE( INTEL
, INTEL_82092AA_1
,"82092AA EIDE"),
481 DEVICE( INTEL
, INTEL_7116
, "SAA7116"),
482 DEVICE( INTEL
, INTEL_82596
, "82596"),
483 DEVICE( INTEL
, INTEL_82865
, "82865"),
484 DEVICE( INTEL
, INTEL_82557
, "82557"),
485 DEVICE( INTEL
, INTEL_82437
, "82437"),
486 DEVICE( INTEL
, INTEL_82371FB_0
,"82371FB PIIX ISA"),
487 DEVICE( INTEL
, INTEL_82371FB_1
,"82371FB PIIX IDE"),
488 DEVICE( INTEL
, INTEL_82371MX
, "430MX - 82371MX MPIIX"),
489 DEVICE( INTEL
, INTEL_82437MX
, "430MX - 82437MX MTSC"),
490 DEVICE( INTEL
, INTEL_82441
, "82441FX Natoma"),
491 DEVICE( INTEL
, INTEL_82380FB
, "82380FB Mobile"),
492 DEVICE( INTEL
, INTEL_82439
, "82439HX Triton II"),
493 DEVICE( INTEL
, INTEL_82371SB_0
,"82371SB PIIX3 ISA"),
494 DEVICE( INTEL
, INTEL_82371SB_1
,"82371SB PIIX3 IDE"),
495 DEVICE( INTEL
, INTEL_82371SB_2
,"82371SB PIIX3 USB"),
496 DEVICE( INTEL
, INTEL_82437VX
, "82437VX Triton II"),
497 DEVICE( INTEL
, INTEL_82439TX
, "82439TX"),
498 DEVICE( INTEL
, INTEL_82371AB_0
,"82371AB PIIX4 ISA"),
499 DEVICE( INTEL
, INTEL_82371AB
, "82371AB PIIX4 IDE"),
500 DEVICE( INTEL
, INTEL_82371AB_2
,"82371AB PIIX4 USB"),
501 DEVICE( INTEL
, INTEL_82371AB_3
,"82371AB PIIX4 ACPI"),
502 DEVICE( INTEL
, INTEL_82443LX_0
,"440LX - 82443LX PAC Host"),
503 DEVICE( INTEL
, INTEL_82443LX_1
,"440LX - 82443LX PAC AGP"),
504 DEVICE( INTEL
, INTEL_82443BX_0
,"440BX - 82443BX Host"),
505 DEVICE( INTEL
, INTEL_82443BX_1
,"440BX - 82443BX AGP"),
506 DEVICE( INTEL
, INTEL_82443BX_2
,"440BX - 82443BX Host (no AGP)"),
507 DEVICE( INTEL
, INTEL_P6
, "Orion P6"),
508 DEVICE( INTEL
, INTEL_82450GX
, "82450GX Orion P6"),
509 DEVICE( KTI
, KTI_ET32P2
, "ET32P2"),
510 DEVICE( ADAPTEC
, ADAPTEC_7810
, "AIC-7810 RAID"),
511 DEVICE( ADAPTEC
, ADAPTEC_7850
, "AIC-7850"),
512 DEVICE( ADAPTEC
, ADAPTEC_7855
, "AIC-7855"),
513 DEVICE( ADAPTEC
, ADAPTEC_5800
, "AIC-5800"),
514 DEVICE( ADAPTEC
, ADAPTEC_7860
, "AIC-7860"),
515 DEVICE( ADAPTEC
, ADAPTEC_7861
, "AIC-7861"),
516 DEVICE( ADAPTEC
, ADAPTEC_7870
, "AIC-7870"),
517 DEVICE( ADAPTEC
, ADAPTEC_7871
, "AIC-7871"),
518 DEVICE( ADAPTEC
, ADAPTEC_7872
, "AIC-7872"),
519 DEVICE( ADAPTEC
, ADAPTEC_7873
, "AIC-7873"),
520 DEVICE( ADAPTEC
, ADAPTEC_7874
, "AIC-7874"),
521 DEVICE( ADAPTEC
, ADAPTEC_7895
, "AIC-7895U"),
522 DEVICE( ADAPTEC
, ADAPTEC_7880
, "AIC-7880U"),
523 DEVICE( ADAPTEC
, ADAPTEC_7881
, "AIC-7881U"),
524 DEVICE( ADAPTEC
, ADAPTEC_7882
, "AIC-7882U"),
525 DEVICE( ADAPTEC
, ADAPTEC_7883
, "AIC-7883U"),
526 DEVICE( ADAPTEC
, ADAPTEC_7884
, "AIC-7884U"),
527 DEVICE( ADAPTEC
, ADAPTEC_1030
, "ABA-1030 DVB receiver"),
528 DEVICE( ATRONICS
, ATRONICS_2015
, "IDE-2015PL"),
529 DEVICE( TIGERJET
, TIGERJET_300
, "Tiger300 ISDN"),
530 DEVICE( ARK
, ARK_STING
, "Stingray"),
531 DEVICE( ARK
, ARK_STINGARK
, "Stingray ARK 2000PV"),
532 DEVICE( ARK
, ARK_2000MT
, "2000MT")
537 * device_info[] is sorted so we can use binary search
539 static struct pci_dev_info
*pci_lookup_dev(unsigned int vendor
, unsigned int dev
)
542 max
= sizeof(dev_info
)/sizeof(dev_info
[0]) - 1;
546 int i
= (min
+ max
) >> 1;
549 order
= dev_info
[i
].vendor
- (long) vendor
;
551 order
= dev_info
[i
].device
- (long) dev
;
569 return & dev_info
[ i
];
573 static const char *pci_strclass (unsigned int class)
575 switch (class >> 8) {
576 case PCI_CLASS_NOT_DEFINED
: return "Non-VGA device";
577 case PCI_CLASS_NOT_DEFINED_VGA
: return "VGA compatible device";
579 case PCI_CLASS_STORAGE_SCSI
: return "SCSI storage controller";
580 case PCI_CLASS_STORAGE_IDE
: return "IDE interface";
581 case PCI_CLASS_STORAGE_FLOPPY
: return "Floppy disk controller";
582 case PCI_CLASS_STORAGE_IPI
: return "IPI bus controller";
583 case PCI_CLASS_STORAGE_RAID
: return "RAID bus controller";
584 case PCI_CLASS_STORAGE_OTHER
: return "Unknown mass storage controller";
586 case PCI_CLASS_NETWORK_ETHERNET
: return "Ethernet controller";
587 case PCI_CLASS_NETWORK_TOKEN_RING
: return "Token ring network controller";
588 case PCI_CLASS_NETWORK_FDDI
: return "FDDI network controller";
589 case PCI_CLASS_NETWORK_ATM
: return "ATM network controller";
590 case PCI_CLASS_NETWORK_OTHER
: return "Network controller";
592 case PCI_CLASS_DISPLAY_VGA
: return "VGA compatible controller";
593 case PCI_CLASS_DISPLAY_XGA
: return "XGA compatible controller";
594 case PCI_CLASS_DISPLAY_OTHER
: return "Display controller";
596 case PCI_CLASS_MULTIMEDIA_VIDEO
: return "Multimedia video controller";
597 case PCI_CLASS_MULTIMEDIA_AUDIO
: return "Multimedia audio controller";
598 case PCI_CLASS_MULTIMEDIA_OTHER
: return "Multimedia controller";
600 case PCI_CLASS_MEMORY_RAM
: return "RAM memory";
601 case PCI_CLASS_MEMORY_FLASH
: return "FLASH memory";
602 case PCI_CLASS_MEMORY_OTHER
: return "Memory";
604 case PCI_CLASS_BRIDGE_HOST
: return "Host bridge";
605 case PCI_CLASS_BRIDGE_ISA
: return "ISA bridge";
606 case PCI_CLASS_BRIDGE_EISA
: return "EISA bridge";
607 case PCI_CLASS_BRIDGE_MC
: return "MicroChannel bridge";
608 case PCI_CLASS_BRIDGE_PCI
: return "PCI bridge";
609 case PCI_CLASS_BRIDGE_PCMCIA
: return "PCMCIA bridge";
610 case PCI_CLASS_BRIDGE_NUBUS
: return "NuBus bridge";
611 case PCI_CLASS_BRIDGE_CARDBUS
: return "CardBus bridge";
612 case PCI_CLASS_BRIDGE_OTHER
: return "Bridge";
614 case PCI_CLASS_COMMUNICATION_SERIAL
: return "Serial controller";
615 case PCI_CLASS_COMMUNICATION_PARALLEL
: return "Parallel controller";
616 case PCI_CLASS_COMMUNICATION_OTHER
: return "Communication controller";
618 case PCI_CLASS_SYSTEM_PIC
: return "PIC";
619 case PCI_CLASS_SYSTEM_DMA
: return "DMA controller";
620 case PCI_CLASS_SYSTEM_TIMER
: return "Timer";
621 case PCI_CLASS_SYSTEM_RTC
: return "RTC";
622 case PCI_CLASS_SYSTEM_OTHER
: return "System peripheral";
624 case PCI_CLASS_INPUT_KEYBOARD
: return "Keyboard controller";
625 case PCI_CLASS_INPUT_PEN
: return "Digitizer Pen";
626 case PCI_CLASS_INPUT_MOUSE
: return "Mouse controller";
627 case PCI_CLASS_INPUT_OTHER
: return "Input device controller";
629 case PCI_CLASS_DOCKING_GENERIC
: return "Generic Docking Station";
630 case PCI_CLASS_DOCKING_OTHER
: return "Docking Station";
632 case PCI_CLASS_PROCESSOR_386
: return "386";
633 case PCI_CLASS_PROCESSOR_486
: return "486";
634 case PCI_CLASS_PROCESSOR_PENTIUM
: return "Pentium";
635 case PCI_CLASS_PROCESSOR_ALPHA
: return "Alpha";
636 case PCI_CLASS_PROCESSOR_POWERPC
: return "Power PC";
637 case PCI_CLASS_PROCESSOR_CO
: return "Co-processor";
639 case PCI_CLASS_SERIAL_FIREWIRE
: return "FireWire (IEEE 1394)";
640 case PCI_CLASS_SERIAL_ACCESS
: return "ACCESS Bus";
641 case PCI_CLASS_SERIAL_SSA
: return "SSA";
642 case PCI_CLASS_SERIAL_USB
: return "USB Controller";
643 case PCI_CLASS_SERIAL_FIBER
: return "Fiber Channel";
645 default: return "Unknown class";
650 static const char *pci_strvendor(unsigned int vendor
)
653 case PCI_VENDOR_ID_COMPAQ
: return "Compaq";
654 case PCI_VENDOR_ID_NCR
: return "NCR";
655 case PCI_VENDOR_ID_ATI
: return "ATI";
656 case PCI_VENDOR_ID_VLSI
: return "VLSI";
657 case PCI_VENDOR_ID_ADL
: return "Avance Logic";
658 case PCI_VENDOR_ID_NS
: return "NS";
659 case PCI_VENDOR_ID_TSENG
: return "Tseng'Lab";
660 case PCI_VENDOR_ID_WEITEK
: return "Weitek";
661 case PCI_VENDOR_ID_DEC
: return "DEC";
662 case PCI_VENDOR_ID_CIRRUS
: return "Cirrus Logic";
663 case PCI_VENDOR_ID_IBM
: return "IBM";
664 case PCI_VENDOR_ID_WD
: return "Western Digital";
665 case PCI_VENDOR_ID_AMD
: return "AMD";
666 case PCI_VENDOR_ID_TRIDENT
: return "Trident";
667 case PCI_VENDOR_ID_AI
: return "Acer Incorporated";
668 case PCI_VENDOR_ID_MATROX
: return "Matrox";
669 case PCI_VENDOR_ID_CT
: return "Chips & Technologies";
670 case PCI_VENDOR_ID_MIRO
: return "Miro";
671 case PCI_VENDOR_ID_NEC
: return "NEC";
672 case PCI_VENDOR_ID_FD
: return "Future Domain";
673 case PCI_VENDOR_ID_SI
: return "Silicon Integrated Systems";
674 case PCI_VENDOR_ID_HP
: return "Hewlett Packard";
675 case PCI_VENDOR_ID_PCTECH
: return "PCTECH";
676 case PCI_VENDOR_ID_DPT
: return "DPT";
677 case PCI_VENDOR_ID_OPTI
: return "OPTi";
678 case PCI_VENDOR_ID_SGS
: return "SGS Thomson";
679 case PCI_VENDOR_ID_BUSLOGIC
: return "BusLogic";
680 case PCI_VENDOR_ID_TI
: return "Texas Instruments";
681 case PCI_VENDOR_ID_OAK
: return "OAK";
682 case PCI_VENDOR_ID_WINBOND2
: return "Winbond";
683 case PCI_VENDOR_ID_MOTOROLA
: return "Motorola";
684 case PCI_VENDOR_ID_PROMISE
: return "Promise Technology";
685 case PCI_VENDOR_ID_N9
: return "Number Nine";
686 case PCI_VENDOR_ID_UMC
: return "UMC";
687 case PCI_VENDOR_ID_X
: return "X TECHNOLOGY";
688 case PCI_VENDOR_ID_PICOP
: return "PicoPower";
689 case PCI_VENDOR_ID_APPLE
: return "Apple";
690 case PCI_VENDOR_ID_NEXGEN
: return "Nexgen";
691 case PCI_VENDOR_ID_QLOGIC
: return "Q Logic";
692 case PCI_VENDOR_ID_CYRIX
: return "Cyrix";
693 case PCI_VENDOR_ID_LEADTEK
: return "Leadtek Research";
694 case PCI_VENDOR_ID_CONTAQ
: return "Contaq";
695 case PCI_VENDOR_ID_FOREX
: return "Forex";
696 case PCI_VENDOR_ID_OLICOM
: return "Olicom";
697 case PCI_VENDOR_ID_SUN
: return "Sun Microsystems";
698 case PCI_VENDOR_ID_CMD
: return "CMD";
699 case PCI_VENDOR_ID_VISION
: return "Vision";
700 case PCI_VENDOR_ID_BROOKTREE
: return "Brooktree";
701 case PCI_VENDOR_ID_SIERRA
: return "Sierra";
702 case PCI_VENDOR_ID_ACC
: return "ACC MICROELECTRONICS";
703 case PCI_VENDOR_ID_WINBOND
: return "Winbond";
704 case PCI_VENDOR_ID_DATABOOK
: return "Databook";
705 case PCI_VENDOR_ID_PLX
: return "PLX";
706 case PCI_VENDOR_ID_MADGE
: return "Madge Networks";
707 case PCI_VENDOR_ID_3COM
: return "3Com";
708 case PCI_VENDOR_ID_SMC
: return "SMC";
709 case PCI_VENDOR_ID_AL
: return "Acer Labs";
710 case PCI_VENDOR_ID_MITSUBISHI
: return "Mitsubishi";
711 case PCI_VENDOR_ID_SURECOM
: return "Surecom";
712 case PCI_VENDOR_ID_NEOMAGIC
: return "Neomagic";
713 case PCI_VENDOR_ID_ASP
: return "Advanced System Products";
714 case PCI_VENDOR_ID_MACRONIX
: return "Macronix";
715 case PCI_VENDOR_ID_CERN
: return "CERN";
716 case PCI_VENDOR_ID_NVIDIA
: return "NVidia";
717 case PCI_VENDOR_ID_IMS
: return "IMS";
718 case PCI_VENDOR_ID_TEKRAM2
: return "Tekram";
719 case PCI_VENDOR_ID_TUNDRA
: return "Tundra";
720 case PCI_VENDOR_ID_AMCC
: return "AMCC";
721 case PCI_VENDOR_ID_INTERG
: return "Intergraphics";
722 case PCI_VENDOR_ID_REALTEK
: return "Realtek";
723 case PCI_VENDOR_ID_TRUEVISION
: return "Truevision";
724 case PCI_VENDOR_ID_INIT
: return "Initio Corp";
725 case PCI_VENDOR_ID_VIA
: return "VIA Technologies";
726 case PCI_VENDOR_ID_VORTEX
: return "VORTEX";
727 case PCI_VENDOR_ID_EF
: return "Efficient Networks";
728 case PCI_VENDOR_ID_FORE
: return "Fore Systems";
729 case PCI_VENDOR_ID_IMAGINGTECH
: return "Imaging Technology";
730 case PCI_VENDOR_ID_PHILIPS
: return "Philips";
731 case PCI_VENDOR_ID_CYCLONE
: return "Cyclone";
732 case PCI_VENDOR_ID_ALLIANCE
: return "Alliance";
733 case PCI_VENDOR_ID_VMIC
: return "VMIC";
734 case PCI_VENDOR_ID_DIGI
: return "Digi Intl.";
735 case PCI_VENDOR_ID_MUTECH
: return "Mutech";
736 case PCI_VENDOR_ID_RENDITION
: return "Rendition";
737 case PCI_VENDOR_ID_TOSHIBA
: return "Toshiba";
738 case PCI_VENDOR_ID_RICOH
: return "Ricoh";
739 case PCI_VENDOR_ID_ARTOP
: return "Artop Electronics";
740 case PCI_VENDOR_ID_ZEITNET
: return "ZeitNet";
741 case PCI_VENDOR_ID_OMEGA
: return "Omega Micro";
742 case PCI_VENDOR_ID_LITEON
: return "LiteOn";
743 case PCI_VENDOR_ID_NP
: return "Network Peripherals";
744 case PCI_VENDOR_ID_ATT
: return "Lucent (ex-AT&T) Microelectronics";
745 case PCI_VENDOR_ID_SPECIALIX
: return "Specialix";
746 case PCI_VENDOR_ID_AURAVISION
: return "Auravision";
747 case PCI_VENDOR_ID_IKON
: return "Ikon";
748 case PCI_VENDOR_ID_ZORAN
: return "Zoran";
749 case PCI_VENDOR_ID_KINETIC
: return "Kinetic";
750 case PCI_VENDOR_ID_COMPEX
: return "Compex";
751 case PCI_VENDOR_ID_RP
: return "Comtrol";
752 case PCI_VENDOR_ID_CYCLADES
: return "Cyclades";
753 case PCI_VENDOR_ID_ESSENTIAL
: return "Essential Communications";
754 case PCI_VENDOR_ID_O2
: return "O2 Micro";
755 case PCI_VENDOR_ID_3DFX
: return "3Dfx";
756 case PCI_VENDOR_ID_SIGMADES
: return "Sigma Designs";
757 case PCI_VENDOR_ID_CCUBE
: return "C-Cube";
758 case PCI_VENDOR_ID_DIPIX
: return "Dipix";
759 case PCI_VENDOR_ID_STALLION
: return "Stallion Technologies";
760 case PCI_VENDOR_ID_OPTIBASE
: return "Optibase";
761 case PCI_VENDOR_ID_SATSAGEM
: return "SatSagem";
762 case PCI_VENDOR_ID_HUGHES
: return "Hughes";
763 case PCI_VENDOR_ID_ENSONIQ
: return "Ensoniq";
764 case PCI_VENDOR_ID_ALTEON
: return "Alteon";
765 case PCI_VENDOR_ID_PICTUREL
: return "Picture Elements";
766 case PCI_VENDOR_ID_NVIDIA_SGS
: return "NVidia/SGS Thomson";
767 case PCI_VENDOR_ID_CBOARDS
: return "ComputerBoards";
768 case PCI_VENDOR_ID_SYMPHONY
: return "Symphony";
769 case PCI_VENDOR_ID_TEKRAM
: return "Tekram";
770 case PCI_VENDOR_ID_3DLABS
: return "3Dlabs";
771 case PCI_VENDOR_ID_AVANCE
: return "Avance";
772 case PCI_VENDOR_ID_NETVIN
: return "NetVin";
773 case PCI_VENDOR_ID_S3
: return "S3 Inc.";
774 case PCI_VENDOR_ID_INTEL
: return "Intel";
775 case PCI_VENDOR_ID_KTI
: return "KTI";
776 case PCI_VENDOR_ID_ADAPTEC
: return "Adaptec";
777 case PCI_VENDOR_ID_ATRONICS
: return "Atronics";
778 case PCI_VENDOR_ID_TIGERJET
: return "TigerJet";
779 case PCI_VENDOR_ID_ARK
: return "ARK Logic";
780 default: return "Unknown vendor";
785 static const char *pci_strdev(unsigned int vendor
, unsigned int device
)
787 struct pci_dev_info
*info
;
789 info
= pci_lookup_dev(vendor
, device
);
790 return info
? info
->name
: "Unknown device";
795 * Convert some of the configuration space registers of the device at
796 * address (bus,devfn) into a string (possibly several lines each).
797 * The configuration string is stored starting at buf[len]. If the
798 * string would exceed the size of the buffer (SIZE), 0 is returned.
800 static int sprint_dev_config(struct pci_dev
*dev
, char *buf
, int size
)
803 unsigned int class_rev
, bus
, devfn
;
804 unsigned short vendor
, device
, status
;
805 unsigned char bist
, latency
, min_gnt
, max_lat
;
809 bus
= dev
->bus
->number
;
812 pcibios_read_config_dword(bus
, devfn
, PCI_CLASS_REVISION
, &class_rev
);
813 pcibios_read_config_word (bus
, devfn
, PCI_VENDOR_ID
, &vendor
);
814 pcibios_read_config_word (bus
, devfn
, PCI_DEVICE_ID
, &device
);
815 pcibios_read_config_word (bus
, devfn
, PCI_STATUS
, &status
);
816 pcibios_read_config_byte (bus
, devfn
, PCI_BIST
, &bist
);
817 pcibios_read_config_byte (bus
, devfn
, PCI_LATENCY_TIMER
, &latency
);
818 pcibios_read_config_byte (bus
, devfn
, PCI_MIN_GNT
, &min_gnt
);
819 pcibios_read_config_byte (bus
, devfn
, PCI_MAX_LAT
, &max_lat
);
820 if (len
+ 80 > size
) {
823 len
+= sprintf(buf
+ len
, " Bus %2d, device %3d, function %2d:\n",
824 bus
, PCI_SLOT(devfn
), PCI_FUNC(devfn
));
826 if (len
+ 80 > size
) {
829 len
+= sprintf(buf
+ len
, " %s: %s %s (rev %d).\n ",
830 pci_strclass(class_rev
>> 8), pci_strvendor(vendor
),
831 pci_strdev(vendor
, device
), class_rev
& 0xff);
833 if (!pci_lookup_dev(vendor
, device
)) {
834 len
+= sprintf(buf
+ len
,
835 "Vendor id=%x. Device id=%x.\n ",
839 str
= 0; /* to keep gcc shut... */
840 switch (status
& PCI_STATUS_DEVSEL_MASK
) {
841 case PCI_STATUS_DEVSEL_FAST
: str
= "Fast devsel. "; break;
842 case PCI_STATUS_DEVSEL_MEDIUM
: str
= "Medium devsel. "; break;
843 case PCI_STATUS_DEVSEL_SLOW
: str
= "Slow devsel. "; break;
845 if (len
+ strlen(str
) > size
) {
848 len
+= sprintf(buf
+ len
, str
);
850 if (status
& PCI_STATUS_FAST_BACK
) {
851 # define fast_b2b_capable "Fast back-to-back capable. "
852 if (len
+ strlen(fast_b2b_capable
) > size
) {
855 len
+= sprintf(buf
+ len
, fast_b2b_capable
);
856 # undef fast_b2b_capable
859 if (bist
& PCI_BIST_CAPABLE
) {
860 # define BIST_capable "BIST capable. "
861 if (len
+ strlen(BIST_capable
) > size
) {
864 len
+= sprintf(buf
+ len
, BIST_capable
);
869 if (len
+ 40 > size
) {
872 len
+= sprintf(buf
+ len
, "IRQ %x. ", dev
->irq
);
876 if (len
+ 80 > size
) {
879 len
+= sprintf(buf
+ len
, "Master Capable. ");
881 len
+= sprintf(buf
+ len
, "Latency=%d. ", latency
);
883 len
+= sprintf(buf
+ len
, "No bursts. ");
885 len
+= sprintf(buf
+ len
, "Min Gnt=%d.", min_gnt
);
887 len
+= sprintf(buf
+ len
, "Max Lat=%d.", max_lat
);
890 for (reg
= 0; reg
< 6; reg
++) {
891 if (len
+ 40 > size
) {
894 base
= dev
->base_address
[reg
];
898 if (base
& PCI_BASE_ADDRESS_SPACE_IO
) {
899 len
+= sprintf(buf
+ len
,
900 "\n I/O at 0x%lx [0x%lx].",
901 base
& PCI_BASE_ADDRESS_IO_MASK
,
902 dev
->base_address
[reg
]);
904 const char *pref
, *type
= "unknown";
906 if (base
& PCI_BASE_ADDRESS_MEM_PREFETCH
) {
911 switch (base
& PCI_BASE_ADDRESS_MEM_TYPE_MASK
) {
912 case PCI_BASE_ADDRESS_MEM_TYPE_32
:
913 type
= "32 bit"; break;
914 case PCI_BASE_ADDRESS_MEM_TYPE_1M
:
915 type
= "20 bit"; break;
916 case PCI_BASE_ADDRESS_MEM_TYPE_64
:
917 type
= "64 bit"; break;
919 len
+= sprintf(buf
+ len
,
920 "\n %srefetchable %s memory at "
921 "0x%lx [0x%lx].", pref
, type
,
922 base
& PCI_BASE_ADDRESS_MEM_MASK
,
923 dev
->base_address
[reg
]);
927 len
+= sprintf(buf
+ len
, "\n");
933 * Return list of PCI devices as a character string for /proc/pci.
934 * BUF is a buffer that is PAGE_SIZE bytes long.
936 int get_pci_list(char *buf
)
938 int nprinted
, len
, size
;
940 static int complained
= 0;
941 # define MSG "\nwarning: page-size limit reached!\n"
945 printk(KERN_INFO
"%s uses obsolete /proc/pci interface\n",
949 /* reserve same for truncation warning message: */
950 size
= PAGE_SIZE
- (strlen(MSG
) + 1);
951 len
= sprintf(buf
, "PCI devices found:\n");
953 for (dev
= pci_devices
; dev
; dev
= dev
->next
) {
954 nprinted
= sprint_dev_config(dev
, buf
+ len
, size
- len
);
956 return len
+ sprintf(buf
+ len
, MSG
);
963 static struct proc_dir_entry proc_old_pci
= {
965 S_IFREG
| S_IRUGO
, 1, 0, 0,
966 0, &proc_array_inode_operations
969 __initfunc(void proc_old_pci_init(void))
971 proc_register(&proc_root
, &proc_old_pci
);
974 #endif /* CONFIG_PROC_FS */