diff mbox

[1/7] mmc: sdhci: avoid redundant loops in sdhci_irq for card int

Message ID 1359536388-7896-2-git-send-email-kliu5@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kevin Liu Jan. 30, 2013, 8:59 a.m. UTC
After cleared the handled irq status, sdhci_irq will check the interrupt
status again at end. And it will loop back to handle the irq if any new
interrupts happened.
But card int will keep active all the time since its status is readonly
and can't be cleared at that time. So in case card int happend, the
function will be looped with max_loops (16 times).

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Jialing Fu <jlfu@marvell.com>
---
 drivers/mmc/host/sdhci.c |    2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3bb9b88..664650b 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2431,6 +2431,8 @@  again:
 	result = IRQ_HANDLED;
 
 	intmask = sdhci_readl(host, SDHCI_INT_STATUS);
+	if (cardint)
+		intmask &= ~SDHCI_INT_CARD_INT;
 	if (intmask && --max_loops)
 		goto again;
 out: