Instead of just assuming an interrupt is pending and
processing it, ensure we have interrupts enabled first
prior to calling our IRQ thread processor.

Cc: Chris Ball <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: Naveen Singh <[email protected]>
Cc: Vipin Mehta <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
 drivers/mmc/host/sdhci.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c95dfc2..7074870 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1616,8 +1616,11 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
 
        intmask &= ~SDHCI_INT_BUS_POWER;
 
-       if (intmask & SDHCI_INT_CARD_INT)
-               cardint = 1;
+       if (intmask & SDHCI_INT_CARD_INT) {
+               if (readl(host->ioaddr + SDHCI_INT_ENABLE) & SDHCI_INT_CARD_INT)
+                       cardint = 1;
+       }
+
 
        intmask &= ~SDHCI_INT_CARD_INT;
 
-- 
1.7.4.15.g7811d

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to