pci_enable_msi(9)
π pci_enable_msi(9) π
okay so we're deep in the Kernel API Manual today bestie, and this one is literally the classic "enable MSI interrupts on your PCI device" situation β¨
πΈ NAME πΈ
pci_enable_msi β Enable MSI interrupt mode on device
Like, that's it. That's the whole job. It turns on MSI interrupt mode for a device. Slay π
β¨ SYNOPSIS β¨
int pci_enable_msi (struct pci_dev *dev );
one function, one argument, one int coming back at you π
π«Ά ARGUMENTS π«Ά
devβ the PCI device to operate on. just... the device. the one you want to mess with. no cap π¦
π₯ DESCRIPTION π₯
okay so here's the tea β β this is the legacy device driver API for enabling MSI interrupts mode on a device and allocating a single interrupt vector. both things, one call. iconic behavior honestly.
on success, the allocated vector's Linux IRQ gets saved at dev->irq, so that's where you go look for it π
and listen β the driver must invoke pci_disable_msi on cleanup. that's not optional, that's a whole commitment. you enabled it, you clean it up. periodt π
β οΈ NOTE β οΈ
bestie. hear me. the newer pci_alloc_irq_vectors / pci_free_irq_vectors API pair should, in general, be used instead. like β in general. we're just being honest with you here π
this is the legacy path! the docs themselves are telling you the newer pair is the move. no drama, just facts π
π RETURN π
0on success πerrnootherwise π
π SEE ALSO π
Kernel file ./drivers/pci/msi/api.c β and all the sibling functions, because family is everything π«Ά
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_vector(9)pci_irq_get_affinity(9)pci_free_irq_vectors(9)pci_restore_msi_state(9)pci_msi_enabled(9)
okay that's the whole page bestie, go enable those interrupts responsibly π
signing off from ./drivers/pci/msi β October 2026 edition, pci_enable_msi(9), 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