[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241115165717.15233-1-ilpo.jarvinen@linux.intel.com>
Date: Fri, 15 Nov 2024 18:57:17 +0200
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Stefan Wahren <wahrenst@....net>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Lukas Wunner <lukas@...ner.de>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
service drivers that are not using IRQF_ONESHOT nor compatible with it.
Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
purpose.
The IRQ handler is simple enough to not require not require other
changes.
Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
Reported-by: Stefan Wahren <wahrenst@....net>
Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
drivers/pci/pcie/bwctrl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
index ff5d12e01f9c..a6c65bbe3735 100644
--- a/drivers/pci/pcie/bwctrl.c
+++ b/drivers/pci/pcie/bwctrl.c
@@ -230,7 +230,7 @@ static void pcie_bwnotif_disable(struct pci_dev *port)
PCI_EXP_LNKCTL_LBMIE | PCI_EXP_LNKCTL_LABIE);
}
-static irqreturn_t pcie_bwnotif_irq_thread(int irq, void *context)
+static irqreturn_t pcie_bwnotif_irq(int irq, void *context)
{
struct pcie_device *srv = context;
struct pcie_bwctrl_data *data = srv->port->link_bwctrl;
@@ -302,10 +302,8 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
if (ret)
return ret;
- ret = devm_request_threaded_irq(&srv->device, srv->irq, NULL,
- pcie_bwnotif_irq_thread,
- IRQF_SHARED | IRQF_ONESHOT,
- "PCIe bwctrl", srv);
+ ret = devm_request_irq(&srv->device, srv->irq, pcie_bwnotif_irq,
+ IRQF_SHARED, "PCIe bwctrl", srv);
if (ret)
return ret;
--
2.39.5
Powered by blists - more mailing lists