1// SPDX-License-Identifier: GPL-3.0-or-later
2
3// #pragma once is not used here because this file is included multiple times in the same compilation unit
4
5// PCI Class Codes
6// _X(CLASS, SUBCLASS, PROGIF, NAME)
7// do note that the values are in hex, not decimal, although the '0x' prefix is not present
8
9#ifndef _X
10#error "pci_classes.h must be included with _X defined"
11#endif
12
13_X(0x00, 0x00, 0x00, "Unclassified device")
14_X(0x00, 0x01, 0x00, "VGA compatible device")
15_X(0x01, 0x00, 0x00, "SCSI bus controller")
16_X(0x01, 0x01, 0x00, "IDE Controller, ISA Compatibility mode")
17_X(0x01, 0x01, 0x05, "IDE Controller, PCI native mode")
18_X(0x01, 0x01, 0x0a, "IDE Controller, ISA Compatibility mode, supports both channels switched to PCI native mode")
19_X(0x01, 0x01, 0x0f, "IDE Controller, PCI native mode controller, supports both channels switched to ISA compatibility mode")
20_X(0x01, 0x01, 0x80, "IDE Controller, ISA Compatibility mode-only controller, supports bus mastering")
21_X(0x01, 0x01, 0x85, "IDE Controller, PCI native mode-only controller, supports bus mastering")
22_X(0x01, 0x01, 0x8a, "IDE Controller, ISA Compatibility mode controller, supports both channels switched to PCI native mode, supports bus mastering")
23_X(0x01, 0x01, 0x8f, "IDE Controller, PCI native mode controller, supports both channels switched to ISA compatibility mode, supports bus mastering ")
24_X(0x01, 0x02, 0x00, "Floppy disk controller")
25_X(0x01, 0x03, 0x00, "IPI bus controller")
26_X(0x01, 0x04, 0x00, "RAID bus controller")
27_X(0x01, 0x05, 0x20, "ATA controller")
28_X(0x01, 0x06, 0x00, "SATA controller")
29_X(0x01, 0x07, 0x00, "Serial Attached SCSI controller")
30_X(0x01, 0x08, 0x00, "NVMHCI controller")
31_X(0x01, 0x08, 0x01, "NVM Express controller")
32_X(0x01, 0x80, 0x00, "Other mass storage controller")
33_X(0x02, 0x00, 0x00, "Ethernet controller")
34_X(0x02, 0x07, 0x00, "InfiniBand controller")
35_X(0x02, 0x80, 0x00, "Other network controller")
36_X(0x03, 0x00, 0x00, "VGA compatible controller")
37_X(0x03, 0x00, 0x01, "8514 controller")
38_X(0x03, 0x01, 0x00, "XGA controller")
39_X(0x03, 0x02, 0x00, "3D controller")
40_X(0x03, 0x80, 0x00, "Other display controller")
41_X(0x04, 0x00, 0x00, "Multimedia video controller")
42_X(0x04, 0x01, 0x00, "Multimedia audio controller")
43_X(0x04, 0x02, 0x00, "Computer telephony device")
44_X(0x04, 0x03, 0x00, "Audio device")
45_X(0x04, 0x80, 0x00, "Other multimedia controller")
46_X(0x05, 0x00, 0x00, "RAM memory")
47_X(0x05, 0x01, 0x00, "FLASH memory")
48_X(0x05, 0x80, 0x00, "Other memory controller")
49_X(0x06, 0x00, 0x00, "Host bridge")
50_X(0x06, 0x01, 0x00, "ISA bridge")
51_X(0x06, 0x02, 0x00, "EISA bridge")
52_X(0x06, 0x03, 0x00, "MCA bridge")
53_X(0x06, 0x04, 0x00, "PCI-to-PCI bridge")
54_X(0x06, 0x04, 0x01, "PCI-to-PCI bridge (subtractive decoding)")
55_X(0x06, 0x05, 0x00, "PCMCIA bridge")
56_X(0x06, 0x06, 0x00, "NuBus bridge")
57_X(0x06, 0x07, 0x00, "CardBus bridge")
58_X(0x06, 0x08, 0x00, "RACEway bridge")
59_X(0x06, 0x09, 0x40, "Semi-transparent PCI-to-PCI bridge, primary side")
60_X(0x06, 0x09, 0x80, "Semi-transparent PCI-to-PCI bridge, secondary side")
61_X(0x06, 0x0a, 0x00, "InfiniBand to PCI host bridge")
62_X(0x06, 0x80, 0x00, "Other bridge device")
63_X(0x07, 0x00, 0x00, "Serial controller")
64_X(0x07, 0x01, 0x00, "Parallel controller")
65_X(0x07, 0x05, 0x00, "Smart Card Controller")
66_X(0x07, 0x80, 0x00, "Other communication controller")
67_X(0x08, 0x00, 0x00, "Generic 8259 PIC")
68_X(0x08, 0x00, 0x01, "ISA PIC")
69_X(0x08, 0x00, 0x02, "EISA PIC")
70_X(0x08, 0x00, 0x10, "I/O APIC")
71_X(0x08, 0x00, 0x20, "I/O(x) APIC")
72_X(0x08, 0x01, 0x00, "Generic 8237 DMA controller")
73_X(0x08, 0x01, 0x01, "ISA DMA controller")
74_X(0x08, 0x01, 0x02, "EISA DMA controller")
75_X(0x08, 0x02, 0x00, "Generic 8254 system timer")
76_X(0x08, 0x02, 0x01, "ISA system timer")
77_X(0x08, 0x02, 0x02, "EISA system timer")
78_X(0x08, 0x02, 0x03, "HPET")
79_X(0x08, 0x03, 0x00, "Generic RTC controller")
80_X(0x08, 0x03, 0x01, "ISA RTC controller")
81_X(0x08, 0x04, 0x00, "Generic PCI Hot-plug controller")
82_X(0x08, 0x05, 0x00, "SD Host controller")
83_X(0x08, 0x06, 0x00, "IOMMU")
84_X(0x08, 0x80, 0x00, "Other system peripheral")
85_X(0x09, 0x00, 0x00, "Keyboard controller")
86_X(0x09, 0x01, 0x00, "Digitizer Pen")
87_X(0x09, 0x02, 0x00, "Mouse controller")
88_X(0x09, 0x03, 0x00, "Scanner controller")
89_X(0x09, 0x04, 0x00, "Gameport controller")
90_X(0x09, 0x80, 0x00, "Other input controller")
91_X(0x0a, 0x00, 0x00, "Generic Docking Station")
92_X(0x0a, 0x80, 0x00, "Other type of docking station")
93_X(0x0b, 0x00, 0x00, "CPU - 386")
94_X(0x0b, 0x01, 0x00, "CPU - 486")
95_X(0x0b, 0x02, 0x00, "CPU - Pentium")
96_X(0x0b, 0x10, 0x00, "Alpha")
97_X(0x0b, 0x20, 0x00, "PowerPC")
98_X(0x0b, 0x30, 0x00, "MIPS")
99_X(0x0b, 0x40, 0x00, "Co-processor")
100_X(0x0b, 0x80, 0x00, "Other processor")
101_X(0x0c, 0x00, 0x00, "FireWire (IEEE 1394)")
102_X(0x0c, 0x03, 0x00, "USB controller (UHCI)")
103_X(0x0c, 0x03, 0x10, "USB controller (OHCI)")
104_X(0x0c, 0x03, 0x20, "USB controller (EHCI)")
105_X(0x0c, 0x03, 0x30, "USB controller (XHCI)")
106_X(0x0c, 0x03, 0x80, "USB controller (Unspecified)")
107_X(0x0c, 0x03, 0xfe, "USB device")
108_X(0x0c, 0x04, 0x00, "Fibre controller")
109_X(0x0c, 0x05, 0x00, "SMBus")
110_X(0x0c, 0x06, 0x00, "InfiniBand")
111_X(0x0c, 0x07, 0x00, "IPMI SMIC interface")
112_X(0x0c, 0x07, 0x01, "IPMI Kybd controller style interface")
113_X(0x0c, 0x07, 0x02, "IPMI Block transfer interface")
114_X(0x0c, 0x08, 0x00, "SERCOS interface standard (IEC 61491)")
115_X(0x0c, 0x09, 0x40, "CANbus")
116_X(0x0c, 0x80, 0x00, "Other system peripheral")
117_X(0x0d, 0x00, 0x00, "iRDA compatible controller")
118_X(0x0d, 0x01, 0x00, "Consumer IR controller")
119_X(0x0d, 0x10, 0x00, "RF controller")
120_X(0x0d, 0x11, 0x00, "Bluetooth controller")
121_X(0x0d, 0x12, 0x00, "Broadband controller")
122_X(0x0d, 0x20, 0x00, "Ethernet (802.11a)")
123_X(0x0d, 0x21, 0x00, "Ethernet (802.11b)")
124_X(0x0d, 0x80, 0x00, "Other network controller")
125