[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/11] net/ntb: Use never-managed version of pci_intx()
- To: Damien Le Moal <dlemoal@xxxxxxxxxx>, Niklas Cassel <cassel@xxxxxxxxxx>, Basavaraj Natikar <basavaraj.natikar@xxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Benjamin Tissoires <bentiss@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Alex Dubov <oakad@xxxxxxxxx>, Sudarsana Kalluru <skalluru@xxxxxxxxxxx>, Manish Chopra <manishc@xxxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Rasesh Mody <rmody@xxxxxxxxxxx>, GR-Linux-NIC-Dev@xxxxxxxxxxx, Igor Mitsyanko <imitsyanko@xxxxxxxxxxxxx>, Sergey Matyukevich <geomatsi@xxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Sanjay R Mehta <sanju.mehta@xxxxxxx>, Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Philipp Stanner <pstanner@xxxxxxxxxx>, Mario Limonciello <mario.limonciello@xxxxxxx>, Chen Ni <nichen@xxxxxxxxxxx>, Ricky Wu <ricky_wu@xxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Breno Leitao <leitao@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Mostafa Saleh <smostafa@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Yi Liu <yi.l.liu@xxxxxxxxx>, Kunwu Chan <chentao@xxxxxxxxxx>, Ankit Agrawal <ankita@xxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Reinette Chatre <reinette.chatre@xxxxxxxxx>, Eric Auger <eric.auger@xxxxxxxxxx>, Ye Bin <yebin10@xxxxxxxxxx>
- From: Philipp Stanner <pstanner@xxxxxxxxxx>
- Date: Wed, 13 Nov 2024 13:41:52 +0100
- Cc: linux-ide@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ntb@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 13 Nov 2024 12:42:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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-Device with pci_enable_device().
Thus, they need the never-managed version.
Replace pci_intx() with pci_intx_unmanaged().
Signed-off-by: Philipp Stanner <pstanner@xxxxxxxxxx>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx> #for ntb_hw_amd.c
---
drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ++--
drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
index d687e8c2cc78..b146f170e839 100644
--- a/drivers/ntb/hw/amd/ntb_hw_amd.c
+++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
@@ -791,7 +791,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
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);
}
}
diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c
b/drivers/ntb/hw/intel/ntb_hw_gen1.c
index 079b8cd79785..9ad9d7fe227e 100644
--- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
+++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
@@ -445,7 +445,7 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,
/* 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);
--
2.47.0
|