All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
@ 2021-04-07  3:15 ` Tian Tao
  0 siblings, 0 replies; 6+ messages in thread
From: Tian Tao @ 2021-04-07  3:15 UTC (permalink / raw)
  To: ulf.hansson; +Cc: linux-arm-kernel, linux-mmc, Tian Tao

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 because of requesting.

this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
is being merged: https://lore.kernel.org/patchwork/patch/1388765/

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/mmc/host/s3cmci.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 0ca6f6d..8d5929a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1578,17 +1578,12 @@ static int s3cmci_probe(struct platform_device *pdev)
 		goto probe_iounmap;
 	}
 
-	if (request_irq(host->irq, s3cmci_irq, 0, DRIVER_NAME, host)) {
+	if (request_irq(host->irq, s3cmci_irq, IRQF_NO_AUTOEN, DRIVER_NAME, host)) {
 		dev_err(&pdev->dev, "failed to request mci interrupt.\n");
 		ret = -ENOENT;
 		goto probe_iounmap;
 	}
 
-	/* We get spurious interrupts even when we have set the IMSK
-	 * register to ignore everything, so use disable_irq() to make
-	 * ensure we don't lock the system with un-serviceable requests. */
-
-	disable_irq(host->irq);
 	host->irq_state = false;
 
 	/* Depending on the dma state, get a DMA channel to use. */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
@ 2021-04-07  3:15 ` Tian Tao
  0 siblings, 0 replies; 6+ messages in thread
From: Tian Tao @ 2021-04-07  3:15 UTC (permalink / raw)
  To: ulf.hansson; +Cc: linux-arm-kernel, linux-mmc, Tian Tao

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 because of requesting.

this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
is being merged: https://lore.kernel.org/patchwork/patch/1388765/

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/mmc/host/s3cmci.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 0ca6f6d..8d5929a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1578,17 +1578,12 @@ static int s3cmci_probe(struct platform_device *pdev)
 		goto probe_iounmap;
 	}
 
-	if (request_irq(host->irq, s3cmci_irq, 0, DRIVER_NAME, host)) {
+	if (request_irq(host->irq, s3cmci_irq, IRQF_NO_AUTOEN, DRIVER_NAME, host)) {
 		dev_err(&pdev->dev, "failed to request mci interrupt.\n");
 		ret = -ENOENT;
 		goto probe_iounmap;
 	}
 
-	/* We get spurious interrupts even when we have set the IMSK
-	 * register to ignore everything, so use disable_irq() to make
-	 * ensure we don't lock the system with un-serviceable requests. */
-
-	disable_irq(host->irq);
 	host->irq_state = false;
 
 	/* Depending on the dma state, get a DMA channel to use. */
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
  2021-04-07  3:15 ` Tian Tao
@ 2021-04-12  7:50   ` Ulf Hansson
  -1 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-04-12  7:50 UTC (permalink / raw)
  To: Tian Tao; +Cc: Linux ARM, linux-mmc

On Wed, 7 Apr 2021 at 05:15, Tian Tao <tiantao6@hisilicon.com> 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 because of requesting.
>
> this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
> is being merged: https://lore.kernel.org/patchwork/patch/1388765/
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

FYI, I will have to wait to apply the $subject patch until the above
change (which is commit cbe16f35bee6 in linux-next) is available in an
rc.

Kind regards
Uffe


> ---
>  drivers/mmc/host/s3cmci.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
> index 0ca6f6d..8d5929a 100644
> --- a/drivers/mmc/host/s3cmci.c
> +++ b/drivers/mmc/host/s3cmci.c
> @@ -1578,17 +1578,12 @@ static int s3cmci_probe(struct platform_device *pdev)
>                 goto probe_iounmap;
>         }
>
> -       if (request_irq(host->irq, s3cmci_irq, 0, DRIVER_NAME, host)) {
> +       if (request_irq(host->irq, s3cmci_irq, IRQF_NO_AUTOEN, DRIVER_NAME, host)) {
>                 dev_err(&pdev->dev, "failed to request mci interrupt.\n");
>                 ret = -ENOENT;
>                 goto probe_iounmap;
>         }
>
> -       /* We get spurious interrupts even when we have set the IMSK
> -        * register to ignore everything, so use disable_irq() to make
> -        * ensure we don't lock the system with un-serviceable requests. */
> -
> -       disable_irq(host->irq);
>         host->irq_state = false;
>
>         /* Depending on the dma state, get a DMA channel to use. */
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
@ 2021-04-12  7:50   ` Ulf Hansson
  0 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-04-12  7:50 UTC (permalink / raw)
  To: Tian Tao; +Cc: Linux ARM, linux-mmc

On Wed, 7 Apr 2021 at 05:15, Tian Tao <tiantao6@hisilicon.com> 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 because of requesting.
>
> this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
> is being merged: https://lore.kernel.org/patchwork/patch/1388765/
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

FYI, I will have to wait to apply the $subject patch until the above
change (which is commit cbe16f35bee6 in linux-next) is available in an
rc.

Kind regards
Uffe


> ---
>  drivers/mmc/host/s3cmci.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
> index 0ca6f6d..8d5929a 100644
> --- a/drivers/mmc/host/s3cmci.c
> +++ b/drivers/mmc/host/s3cmci.c
> @@ -1578,17 +1578,12 @@ static int s3cmci_probe(struct platform_device *pdev)
>                 goto probe_iounmap;
>         }
>
> -       if (request_irq(host->irq, s3cmci_irq, 0, DRIVER_NAME, host)) {
> +       if (request_irq(host->irq, s3cmci_irq, IRQF_NO_AUTOEN, DRIVER_NAME, host)) {
>                 dev_err(&pdev->dev, "failed to request mci interrupt.\n");
>                 ret = -ENOENT;
>                 goto probe_iounmap;
>         }
>
> -       /* We get spurious interrupts even when we have set the IMSK
> -        * register to ignore everything, so use disable_irq() to make
> -        * ensure we don't lock the system with un-serviceable requests. */
> -
> -       disable_irq(host->irq);
>         host->irq_state = false;
>
>         /* Depending on the dma state, get a DMA channel to use. */
> --
> 2.7.4
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
  2021-04-12  7:50   ` Ulf Hansson
@ 2021-05-11 10:56     ` Ulf Hansson
  -1 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-05-11 10:56 UTC (permalink / raw)
  To: Tian Tao; +Cc: Linux ARM, linux-mmc

On Mon, 12 Apr 2021 at 09:50, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Wed, 7 Apr 2021 at 05:15, Tian Tao <tiantao6@hisilicon.com> 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 because of requesting.
> >
> > this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
> > is being merged: https://lore.kernel.org/patchwork/patch/1388765/
> >
> > Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
>
> FYI, I will have to wait to apply the $subject patch until the above
> change (which is commit cbe16f35bee6 in linux-next) is available in an
> rc.

Applied for next, thanks!

[...]

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag
@ 2021-05-11 10:56     ` Ulf Hansson
  0 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-05-11 10:56 UTC (permalink / raw)
  To: Tian Tao; +Cc: Linux ARM, linux-mmc

On Mon, 12 Apr 2021 at 09:50, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Wed, 7 Apr 2021 at 05:15, Tian Tao <tiantao6@hisilicon.com> 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 because of requesting.
> >
> > this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
> > is being merged: https://lore.kernel.org/patchwork/patch/1388765/
> >
> > Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
>
> FYI, I will have to wait to apply the $subject patch until the above
> change (which is commit cbe16f35bee6 in linux-next) is available in an
> rc.

Applied for next, thanks!

[...]

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-11 13:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07  3:15 [PATCH] mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag Tian Tao
2021-04-07  3:15 ` Tian Tao
2021-04-12  7:50 ` Ulf Hansson
2021-04-12  7:50   ` Ulf Hansson
2021-05-11 10:56   ` Ulf Hansson
2021-05-11 10:56     ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.