PCI_DEVICE(9)
π PCI_DEVICE(9) β the kernel API manual, bestie edition π
Okay so we're cracking open PCI_DEVICE from the kernel API manual (that's the 9 in PCI_DEVICE(9), iykyk β section 9 is kernel routines) and honestly? It's a little guy with a big job. Let's get into it β¨
πΈ NAME πΈ
PCI_DEVICE β it's a macro, and its whole personality is describing one very specific PCI device. That's it. That's the job. Slay π«Ά
β¨ SYNOPSIS β¨
PCI_DEVICE (vend , dev );
That's the whole vibe check. Two args, parentheses, semicolon, done π
π¦ ARGUMENTS π¦
vendβ the 16 bit PCI Vendor ID π·οΈ (yes, 16 bit, keep it cute and keep it small)devβ the 16 bit PCI Device ID π (also 16 bit, matching energy)
π DESCRIPTION π
So here's the tea, bestie: this macro builds you a struct pci_device_id that matches one specific device. Like, one. Not a family, not a class, not "whatever shows up" β that exact device and nobody else. Main character energy fr fr π
The way it works: the subvendor and subdevice fields get set to PCI_ANY_ID. So it's picky about vendor + device, and completely unbothered about subvendor + subdevice. Iconic behaviour honestly π
Heads up: the 16 bit-ness of bothvendanddevis the whole point β these are ID fields, not full addresses. Don't come at them with 32 bits π
π₯ SEE ALSO π₯
Everything below lives in the kernel file ./include/linux/pci.h β one big PCI friend group and you should absolutely go meet all of them π«Ά
enum pci_interrupt_pin(9)pci_channel_state_t(9)pci_is_bridge(9)pci_is_vga(9)pci_is_display(9)struct pci_driver(9)PCI_DEVICE_DRIVER_OVERRIDE(9)PCI_DRIVER_OVERRIDE_DEVICE_VFIO(9)PCI_DEVICE_SUB(9)PCI_DEVICE_CLASS(9)PCI_VDEVICE(9)PCI_VDEVICE_SUB(9)PCI_DEVICE_DATA(9)pcie_capability_clear_and_set_word(9)pci_bus_for_each_resource(9)module_pci_driver(9)builtin_pci_driver(9)pci_irq_type(9)pci_irqd_intx_xlate(9)pci_resource_is_io(9)pci_resource_is_mem(9)pci_pcie_cap(9)pci_is_pcie(9)pcie_caps_reg(9)pci_pcie_type(9)pcie_find_root_port(9)pci_vpd_alloc(9)pci_vpd_find_id_string(9)pci_vpd_find_ro_info_keyword(9)pci_vpd_check_csum(9)pci_ari_enabled(9)pci_is_thunderbolt_attached(9)
Okay that's the whole page, you ate that π This one came from ./include/linux, dated October 2026, and it's PCI_DEVICE(9) signing off β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms