Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932948Ab1CRWMX (ORCPT ); Fri, 18 Mar 2011 18:12:23 -0400 Received: from mail.atheros.com ([12.19.149.2]:44357 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932908Ab1CRWMN (ORCPT ); Fri, 18 Mar 2011 18:12:13 -0400 From: "Luis R. Rodriguez" To: CC: , , , , , , "Luis R. Rodriguez" , Naveen Singh , Vipin Mehta Subject: [RFC 2/4] sdhci: sanity check for triggering interrupts thread Date: Fri, 18 Mar 2011 15:11:58 -0700 Message-ID: <1300486320-23607-3-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1300486320-23607-1-git-send-email-lrodriguez@atheros.com> References: <1300486320-23607-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 39 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 Cc: Kalle Valo Cc: Naveen Singh Cc: Vipin Mehta Signed-off-by: Luis R. Rodriguez --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/