Re: [PATCH] spi: spi-fsl-lpspi: Use IRQF_NO_AUTOEN flag in request_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 06, 2024 at 10:28:28AM +0800, Jinjie Ruan wrote:
> 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.

> @@ -948,14 +948,10 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
>  	ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
>  	if (ret == -EPROBE_DEFER)
>  		goto out_pm_get;
> -	if (ret < 0)
> +	if (ret < 0) {
>  		dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
> -	else
> -		/*
> -		 * disable LPSPI module IRQ when enable DMA mode successfully,
> -		 * to prevent the unexpected LPSPI module IRQ events.
> -		 */
> -		disable_irq(irq);
> +		enable_irq(irq);
> +	}

This now enabled the interrupt in the case where we previously would've
disabled it - I would have expected the condition on the if statement to
be reversed?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux