mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
spi: spi-fsl-lpspi: Use IRQF_NO_AUTOEN flag in request_irq()
[ Upstream commit 003c7e01916c5e2af95add9b0cbda2e6163873e8 ]
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: 9728fb3ce1 ("spi: lpspi: disable lpspi module irq in DMA mode")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240906022828.891812-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
99b60d5a73
commit
3d89ff55ff
@@ -870,7 +870,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
|||||||
goto out_controller_put;
|
goto out_controller_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, 0,
|
ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, IRQF_NO_AUTOEN,
|
||||||
dev_name(&pdev->dev), fsl_lpspi);
|
dev_name(&pdev->dev), fsl_lpspi);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "can't get irq%d: %d\n", irq, ret);
|
dev_err(&pdev->dev, "can't get irq%d: %d\n", irq, ret);
|
||||||
@@ -907,14 +907,10 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
|||||||
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
|
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
|
||||||
if (ret == -EPROBE_DEFER)
|
if (ret == -EPROBE_DEFER)
|
||||||
goto out_pm_get;
|
goto out_pm_get;
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
|
dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
|
||||||
else
|
enable_irq(irq);
|
||||||
/*
|
}
|
||||||
* disable LPSPI module IRQ when enable DMA mode successfully,
|
|
||||||
* to prevent the unexpected LPSPI module IRQ events.
|
|
||||||
*/
|
|
||||||
disable_irq(irq);
|
|
||||||
|
|
||||||
ret = devm_spi_register_controller(&pdev->dev, controller);
|
ret = devm_spi_register_controller(&pdev->dev, controller);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user