lkml.org 
[lkml]   [2013]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdhci_irq()
Date
[yet another patch ping]

On Tuesday, November 05, 2013 07:40:36 PM Alexey Neyman wrote:
> Ignore Card Interrupt bit in the interrupt status if we already know that
> mmc_signal_sdio_irq() is going to be called at the end of sdhci_irq(). This
> avoids a needless loop in sdhci_irq() repeatedly reading interrupt status
> and doing nothing.
>
> Signed-off-by: Alexey Neyman <stilor@att.net>
> Acked-by: Dong Aisheng <b29396@freescale.com>
> ---
> drivers/mmc/host/sdhci.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 7a7fb4f..a83cd1b 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2491,6 +2491,14 @@ again:
> result = IRQ_HANDLED;
>
> intmask = sdhci_readl(host, SDHCI_INT_STATUS);
> +
> + /*
> + * If we know we'll call the driver to signal SDIO IRQ, disregard
> + * further indications of Card Interrupt in the status to avoid a
> + * needless loop.
> + */
> + if (cardint)
> + intmask &= ~SDHCI_INT_CARD_INT;
> if (intmask && --max_loops)
> goto again;
> out:



\
 
 \ /
  Last update: 2013-11-18 21:21    [W:0.064 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site