[RFC 2/4] sdhci: sanity check for triggering interrupts thread
From: Luis R. Rodriguez
Date: Fri Mar 18 2011 - 18:12:26 EST
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 <cjb@xxxxxxxxxx>
Cc: Kalle Valo <kvalo@xxxxxxxxxx>
Cc: Naveen Singh <nsingh@xxxxxxxxxxx>
Cc: Vipin Mehta <Vipin.Mehta@xxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
---
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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/