]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ntb: Use never-managed version of pci_intx()
authorPhilipp Stanner <pstanner@redhat.com>
Mon, 9 Dec 2024 13:06:26 +0000 (14:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 20:38:48 +0000 (14:38 -0600)
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.

hw/amd and how/intel enable their PCI devices with pci_enable_device().
Thus, they need the never-managed version.

Replace pci_intx() with pci_intx_unmanaged().

Link: https://lore.kernel.org/r/20241209130632.132074-6-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> # ntb_hw_amd.c
Acked-by: Dave Jiang <dave.jiang@intel.com> # ntb_hw_gen1.c
drivers/ntb/hw/amd/ntb_hw_amd.c
drivers/ntb/hw/intel/ntb_hw_gen1.c

index d687e8c2cc78dcd65d26c20c1e2f69ec85c6a37a..b146f170e8397624d1057b90b2a6cec85b6cfec1 100644 (file)
@@ -791,7 +791,7 @@ err_msi_request:
 err_msi_enable:
 
        /* Try to set up intx irq */
-       pci_intx(pdev, 1);
+       pci_intx_unmanaged(pdev, 1);
 
        rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
                         "ndev_irq_isr", ndev);
@@ -831,7 +831,7 @@ static void ndev_deinit_isr(struct amd_ntb_dev *ndev)
                if (pci_dev_msi_enabled(pdev))
                        pci_disable_msi(pdev);
                else
-                       pci_intx(pdev, 0);
+                       pci_intx_unmanaged(pdev, 0);
        }
 }
 
index 079b8cd79785731e85ff0added66b132e4cd0f27..9ad9d7fe227eb6d77bb1189879413e212934da17 100644 (file)
@@ -445,7 +445,7 @@ err_msi_enable:
 
        /* Try to set up intx irq */
 
-       pci_intx(pdev, 1);
+       pci_intx_unmanaged(pdev, 1);
 
        rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
                         "ndev_irq_isr", ndev);