]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI/MSI: Clarify pci_free_irq_vectors() usage for managed devices
authorShawn Lin <shawn.lin@rock-chips.com>
Wed, 11 Feb 2026 08:24:57 +0000 (16:24 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 23 Feb 2026 15:01:20 +0000 (09:01 -0600)
commit03e4905402ae60aa1d7a65770076bb2c1df8f6ac
tree1f3c04367e164a80dcff03c5995e87c072043259
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
PCI/MSI: Clarify pci_free_irq_vectors() usage for managed devices

Update pci_free_irq_vectors() documentation to clarify that drivers using
pcim_enable_device() must not call pci_free_irq_vectors().

For legacy reasons, pcim_enable_device() switches several normally
un-managed functions into managed mode. Currently, the only function
affected in this way is pcim_setup_msi_release(), which results in
automatic IRQ vector management.

This behavior is dangerous and confusing. Drivers using pcim_enable_device()
should rely on the automatic IRQ vector management and avoid calling
pci_free_irq_vectors() manually.

Suggested-by: Philipp Stanner <phasta@kernel.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
[bhelgaas: squash both updates to pci_free_irq_vectors() documentation]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/1770798299-202288-2-git-send-email-shawn.lin@rock-chips.com
Link: https://patch.msgid.link/1770798299-202288-3-git-send-email-shawn.lin@rock-chips.com
Documentation/PCI/msi-howto.rst
drivers/pci/msi/api.c