mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<vmehta@atheros.com>, <naveen.singh@atheros.com>,
	<kvalo@adurom.com>, <j@w1.fi>,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	Naveen Singh <nsingh@atheros.com>,
	Vipin Mehta <Vipin.Mehta@atheros.com>
Subject: [RFC 2/4] sdhci: sanity check for triggering interrupts thread
Date: Fri, 18 Mar 2011 15:11:58 -0700	[thread overview]
Message-ID: <1300486320-23607-3-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1300486320-23607-1-git-send-email-lrodriguez@atheros.com>

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@laptop.org>
Cc: Kalle Valo <kvalo@adurom.com>
Cc: Naveen Singh <nsingh@atheros.com>
Cc: Vipin Mehta <Vipin.Mehta@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 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


  parent reply	other threads:[~2011-03-18 22:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 22:11 [RFC 0/4] sdhci: few patches for ENE 712 support Luis R. Rodriguez
2011-03-18 22:11 ` [RFC 1/4] sdhci: allow for multiple delays when sending commands Luis R. Rodriguez
2011-03-18 23:10   ` Chris Ball
2011-03-18 23:52     ` Luis R. Rodriguez
2011-03-18 22:11 ` Luis R. Rodriguez [this message]
2011-03-18 22:11 ` [RFC 3/4] sdhci: cache when the MMC bus width is 4 bits wide Luis R. Rodriguez
2011-03-18 22:12 ` [RFC 4/4] sdhci: add quick for controllers with for CIRQ issues Luis R. Rodriguez
2011-03-18 22:29 ` [RFC 0/4] sdhci: few patches for ENE 712 support Luis R. Rodriguez
2011-03-19  9:15 ` Wolfram Sang
2011-03-30  1:16   ` Luis R. Rodriguez
2011-03-30  7:47     ` Wolfram Sang
2011-08-24 11:02       ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300486320-23607-3-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=Vipin.Mehta@atheros.com \
    --cc=cjb@laptop.org \
    --cc=j@w1.fi \
    --cc=kvalo@adurom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=naveen.singh@atheros.com \
    --cc=nsingh@atheros.com \
    --cc=vmehta@atheros.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®