Skip to content

Commit f72acbe

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
ntb: 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. 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
1 parent 57ca6af commit f72acbe

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/ntb/hw/amd/ntb_hw_amd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
791791
err_msi_enable:
792792

793793
/* Try to set up intx irq */
794-
pci_intx(pdev, 1);
794+
pci_intx_unmanaged(pdev, 1);
795795

796796
rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
797797
"ndev_irq_isr", ndev);
@@ -831,7 +831,7 @@ static void ndev_deinit_isr(struct amd_ntb_dev *ndev)
831831
if (pci_dev_msi_enabled(pdev))
832832
pci_disable_msi(pdev);
833833
else
834-
pci_intx(pdev, 0);
834+
pci_intx_unmanaged(pdev, 0);
835835
}
836836
}
837837

drivers/ntb/hw/intel/ntb_hw_gen1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,
445445

446446
/* Try to set up intx irq */
447447

448-
pci_intx(pdev, 1);
448+
pci_intx_unmanaged(pdev, 1);
449449

450450
rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
451451
"ndev_irq_isr", ndev);

0 commit comments

Comments
 (0)