PCI_VDEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

that's thirty-two entries bestie, I counted, and I'm obsessed with every single one πŸ“


πŸ’€ real talk though: it's vend and dev, in that order, and dev is 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