Message ID | 20240824072135.9691-1-s-vadapalli@ti.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | PCI: dra7xx: Fix threaded IRQ handler registration | expand |
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 >
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;
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(-)