PCI_VDEVICE(9)
π PCI_VDEVICE(9) β the Kernel API Manual, bestie edition π
okay so we're diving into PCI_VDEVICE(9) today, from the Kernel API Manual, and honestly? it's a little icon. let's get into it β¨
πΈ NAME πΈ
PCI_VDEVICE β a macro used to describe a specific PCI device in short form π«Ά
like, short form. it's giving "don't do too much." main character energy but make it concise π
β SYNOPSIS β
PCI_VDEVICE (vend , dev );
that's it. that's the whole vibe. two args, no drama π
π¦ ARGUMENTS π¦
vendβ the vendor name π·οΈ (yes bestie, the name, not a number)devβ the 16 bit PCI Device ID π’ (sixteen bits of pure identity, no cap)
π DESCRIPTION π
so the way that this macro WORKS: it's used to create a struct pci_device_id that matches one specific PCI device. periodt. π―
and listen β the subvendor and subdevice fields get set to PCI_ANY_ID. so it'll match any subvendor and any subdevice, iykyk. π€
the cute part? the macro allows the next field to follow as the device private data. so you get your private data slot handed to you right after, no extra steps. slay π
ngl this is the kind of macro that looks tiny and then does exactly three things. respect. π
π₯ SEE ALSO π₯
the whole group chat, fr fr β go read the kernel file ./include/linux/pci.h and then these besties:
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(9)PCI_DEVICE_DRIVER_OVERRIDE(9)PCI_DRIVER_OVERRIDE_DEVICE_VFIO(9)PCI_DEVICE_SUB(9)PCI_DEVICE_CLASS(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)
that's thirty-two entries bestie, I counted, and I'm obsessed with every single one π
π real talk though: it'svendanddev, in that order, anddevis a 16 bit PCI Device ID. don't come for me if you swap them, that's on you π
and that's the page! signing off from ./include/linux, October 2026, in the one and only PCI_VDEVICE(9) era π§ββοΈπβ¨
π¦ 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