]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/MSI: Use never-managed version of pci_intx()
authorPhilipp Stanner <pstanner@redhat.com>
Mon, 9 Dec 2024 13:06:29 +0000 (14:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 20:38:48 +0000 (14:38 -0600)
commitb182cbaaa951720b142844445d34faa4d1a0766f
treebc7b7e8a4301e123e4d37c9a81dd02fb58343b2d
parentbf726979b8ab1220cd9605f66e8f64433b19a7dc
PCI/MSI: Use never-managed version of pci_intx()

pci_intx() is a hybrid function which can sometimes be managed through
devres. To remove this hybrid nature from pci_intx(), it is necessary to
port users to either an always-managed or a never-managed version.

MSI sets up its own separate devres callback implicitly in
pcim_setup_msi_release(). This callback ultimately uses pci_intx(), which
is problematic since the callback runs on driver detach.

That problem has last been described here:
https://lore.kernel.org/all/ee44ea7ac760e73edad3f20b30b4d2fff66c1a85.camel@redhat.com/

Replace the call to pci_intx() with one to the never-managed version
pci_intx_unmanaged().

Link: https://lore.kernel.org/r/20241209130632.132074-9-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
drivers/pci/msi/api.c
drivers/pci/msi/msi.c