* [PATCH] PCI: dra7xx: Fix threaded IRQ handler registration
@ 2024-08-24 7:21 Siddharth Vadapalli
2024-08-24 8:03 ` Siddharth Vadapalli
0 siblings, 1 reply; 2+ messages in thread
From: Siddharth Vadapalli @ 2024-08-24 7:21 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, robh, vigneshr, kishon,
manivannan.sadhasivam
Cc: linux-omap, linux-pci, linux-kernel, linux-arm-kernel, stable,
u-kumar1, srk, s-vadapalli
Commit da87d35a6e51 ("PCI: dra7xx: Use threaded IRQ handler for
"dra7xx-pcie-main" IRQ") switched from devm_request_irq() to
devm_request_threaded_irq(). In this process, the "handler" and the
"thread_fn" parameters were erroneously interchanged, with "NULL" being
passed as the "handler" and "dra7xx_pcie_irq_handler()" being registered
as the function to be called in a threaded interrupt context.
Fix this by interchanging the "handler" and "thread_fn" parameters.
While at it, correct the indentation.
Fixes: da87d35a6e51 ("PCI: dra7xx: Use threaded IRQ handler for "dra7xx-pcie-main" IRQ")
Cc: <stable@vger.kernel.org>
Reported-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
Hello,
This patch is based on commit
d2bafcf224f3 Merge tag 'cgroup-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
of Mainline Linux.
Regards,
Siddharth.
drivers/pci/controller/dwc/pci-dra7xx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index 4fe3b0cb72ec..4c64ac27af40 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -849,8 +849,9 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
}
dra7xx->mode = mode;
- ret = devm_request_threaded_irq(dev, irq, NULL, dra7xx_pcie_irq_handler,
- IRQF_SHARED, "dra7xx-pcie-main", dra7xx);
+ ret = devm_request_threaded_irq(dev, irq, dra7xx_pcie_irq_handler, NULL,
+ IRQF_SHARED, "dra7xx-pcie-main",
+ dra7xx);
if (ret) {
dev_err(dev, "failed to request irq\n");
goto err_gpio;
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: dra7xx: Fix threaded IRQ handler registration
2024-08-24 7:21 [PATCH] PCI: dra7xx: Fix threaded IRQ handler registration Siddharth Vadapalli
@ 2024-08-24 8:03 ` Siddharth Vadapalli
0 siblings, 0 replies; 2+ messages in thread
From: Siddharth Vadapalli @ 2024-08-24 8:03 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, robh, vigneshr, kishon,
manivannan.sadhasivam
Cc: linux-omap, linux-pci, linux-kernel, linux-arm-kernel, stable,
u-kumar1, srk, s-vadapalli
On Sat, Aug 24, 2024 at 12:51:35PM +0530, Siddharth Vadapalli wrote:
Kindly ignore this patch. Sorry for the noise. I was debugging an issue
and this patch fixed it. But the cause of the issue is probably a race
condition.
Regards,
Siddharth.
> Commit da87d35a6e51 ("PCI: dra7xx: Use threaded IRQ handler for
> "dra7xx-pcie-main" IRQ") switched from devm_request_irq() to
> devm_request_threaded_irq(). In this process, the "handler" and the
> "thread_fn" parameters were erroneously interchanged, with "NULL" being
> passed as the "handler" and "dra7xx_pcie_irq_handler()" being registered
> as the function to be called in a threaded interrupt context.
>
> Fix this by interchanging the "handler" and "thread_fn" parameters.
> While at it, correct the indentation.
>
> Fixes: da87d35a6e51 ("PCI: dra7xx: Use threaded IRQ handler for "dra7xx-pcie-main" IRQ")
> Cc: <stable@vger.kernel.org>
> Reported-by: Udit Kumar <u-kumar1@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
>
> Hello,
>
> This patch is based on commit
> d2bafcf224f3 Merge tag 'cgroup-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
> of Mainline Linux.
>
> Regards,
> Siddharth.
>
> drivers/pci/controller/dwc/pci-dra7xx.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
> index 4fe3b0cb72ec..4c64ac27af40 100644
> --- a/drivers/pci/controller/dwc/pci-dra7xx.c
> +++ b/drivers/pci/controller/dwc/pci-dra7xx.c
> @@ -849,8 +849,9 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
> }
> dra7xx->mode = mode;
>
> - ret = devm_request_threaded_irq(dev, irq, NULL, dra7xx_pcie_irq_handler,
> - IRQF_SHARED, "dra7xx-pcie-main", dra7xx);
> + ret = devm_request_threaded_irq(dev, irq, dra7xx_pcie_irq_handler, NULL,
> + IRQF_SHARED, "dra7xx-pcie-main",
> + dra7xx);
> if (ret) {
> dev_err(dev, "failed to request irq\n");
> goto err_gpio;
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-24 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-24 7:21 [PATCH] PCI: dra7xx: Fix threaded IRQ handler registration Siddharth Vadapalli
2024-08-24 8:03 ` Siddharth Vadapalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox