Skip to content

Commit

Permalink
mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdh…
Browse files Browse the repository at this point in the history
…ci_irq

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>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Alexey Neyman authored and Chris Ball committed Nov 8, 2013
1 parent 4d22378 commit 0a8fd09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,14 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
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:
Expand Down

0 comments on commit 0a8fd09

Please sign in to comment.