pci_irq_vector(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_irq_vector β€” like, the Kernel API Manual page, bestie

Ok so welcome to pci_irq_vector(9), a tiny little function page that's honestly kind of iconic once you get what it does πŸ‘‘

🌸 NAME

pci_irq_vector β€” bestie, it gets you the Linux IRQ number of a device interrupt vector. That's it. That's the whole vibe ✨


πŸŽ€ SYNOPSIS

int pci_irq_vector (struct pci_dev *dev , unsigned int nr );

πŸ’– ARGUMENTS

  • dev β€” the PCI device we're operating on. The main character of this call, fr fr 🫢
  • nr β€” the device-relative interrupt vector index, and it's 0-based (so like, zero is the first one, we don't do that 1-indexed nonsense here). Heads up though: this little number has different meanings depending on which interrupt mode you're in πŸ‘€ which is exactly what the next section is about:

✨ DESCRIPTION

So <italic>nr</italic> lowkey means different things per mode, and here's the whole rundown:

  • MSI-X β€” it's the index in the MSI-X vector table πŸ“‹
  • MSI β€” it's the index of the enabled MSI vectors βœ…
  • INTx β€” it must be 0. No notes, no wiggle room, it's just gotta be zero πŸ’€

πŸ”₯ RETURN

You get the Linux IRQ number back, or -EINVAL if nr is out of range 😭 That's the whole deal.

πŸ¦‹ SEE ALSO

Kernel file ./drivers/pci/msi/api.c, plus the whole friend group:

pci_enable_msi(9), pci_disable_msi(9), pci_msix_vec_count(9), pci_enable_msix_range(9), pci_msix_can_alloc_dyn(9), pci_msix_alloc_irq_at(9), pci_msix_free_irq(9), pci_disable_msix(9), pci_alloc_irq_vectors(9), pci_alloc_irq_vectors_affinity(9), pci_irq_get_affinity(9), pci_free_irq_vectors(9), pci_restore_msi_state(9), pci_msi_enabled(9)


Bye bestie!! 🧚 This page lives in ./drivers/pci/msi , it's dated October 2026, and it's brought to you by the Kernel API Manual πŸ’œ slay πŸŽ€βœ¨

πŸ“¦ where this page comes from