pci_find_nex...t_capability(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

pci_find_next_ext_capability β€” bestie, this is the one that finds an extended capability for you ✨ (and like, this whole page lives in the Kernel API Manual, so you know it's legit πŸ‘‘)


πŸŽ€ SYNOPSIS

u16 pci_find_next_ext_capability (struct pci_dev *dev , u16 start , int cap );

πŸ¦‹ ARGUMENTS

  • dev β€” the PCI device you're querying, like, the actual thing you wanna snoop on πŸ”
  • start β€” the address where you start looking. Pass 0 if you wanna begin at the very beginning of the list, periodt 🏁
  • cap β€” the capability code you're hunting for, iykyk

🌸 DESCRIPTION

Okay so here's the tea: this returns the address of the next matching extended capability structure inside the device's PCI configuration space πŸ’– β€” or 0 if the device just... doesn't support it 😭 (rude of it, honestly).

The important part? Some capabilities can occur several times β€” the vendor-specific capability is the classic example β€” and this function is literally the way you go find them all 🫢. So you call it, get an address, and then come back for more. It's giving "one more thing" main character energy πŸ‘‘


🌈 SEE ALSO

This one's got friends, and there are a lot of them β€” like, an iconic amount. All from the Kernel file ./drivers/pci/pci.c:


And that's the whole vibe πŸ’œ β€” this cutie came out of ./drivers/pci and it's dated October 2026, so go forth and find those capabilities, bestie. Slay πŸŽ€βœ¨

πŸ“¦ where this page comes from