mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdhci_irq
authorAlexey Neyman <stilor@att.net>
Wed, 6 Nov 2013 03:40:36 +0000 (19:40 -0800)
committerChris Ball <cjb@laptop.org>
Fri, 8 Nov 2013 19:14:09 +0000 (14:14 -0500)
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>
drivers/mmc/host/sdhci.c

index 6785fb1dc5c621efd2bf4c7579d6841a7a4b5340..bd8a0982aec33ec99b95b97fbcbdd65dee642770 100644 (file)
@@ -2501,6 +2501,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:
This page took 0.025851 seconds and 5 git commands to generate.