public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
	ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH v2 RESEND] sdhci: Ignore unexpected CARD_INT interrupts
Date: Thu, 19 Jan 2017 12:28:26 +0200	[thread overview]
Message-ID: <de8e1567-0392-6de7-9669-0f7ace327d56@intel.com> (raw)
In-Reply-To: <20170116142342.21283-1-krisman@collabora.co.uk>

On 16/01/17 16:23, Gabriel Krisman Bertazi wrote:
> One of our kernelCI boxes hanged at boot because a faulty eSDHC device
> was triggering spurious CARD_INT interrupts for SD cards, causing CMD52
> reads, which are not allowed for SD devices.  This adds a sanity check
> to the interruption path, preventing that illegal command from getting
> sent if the CARD_INT interruption should be disabled.
> 
> This quirk allows that particular machine to resume boot despite the
> faulty hardware, instead of getting hung dealing with thousands of
> mishandled interrupts.
> 
> Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
> CC: Ulf Hansson <ulf.hansson@linaro.org>
> CC: linux-mmc@vger.kernel.org

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 51cd4f0e973f..a2efa25c7f3b 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2733,7 +2733,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
>  		if (intmask & SDHCI_INT_RETUNE)
>  			mmc_retune_needed(host->mmc);
>  
> -		if (intmask & SDHCI_INT_CARD_INT) {
> +		if ((intmask & SDHCI_INT_CARD_INT) &&
> +		    (host->ier & SDHCI_INT_CARD_INT)) {
>  			sdhci_enable_sdio_irq_nolock(host, false);
>  			host->thread_isr |= SDHCI_INT_CARD_INT;
>  			result = IRQ_WAKE_THREAD;
> 


  reply	other threads:[~2017-01-19 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 14:23 [PATCH v2 RESEND] sdhci: Ignore unexpected CARD_INT interrupts Gabriel Krisman Bertazi
2017-01-19 10:28 ` Adrian Hunter [this message]
2017-01-19 20:37 ` Ulf Hansson
2017-01-27 19:20   ` Gabriel Krisman Bertazi
2017-01-30  8:19     ` Ulf Hansson
2017-01-30 12:34       ` Gabriel Krisman Bertazi
2017-01-30 12:40         ` Adrian Hunter
2017-01-30 13:40           ` Gabriel Krisman Bertazi
2017-01-31 10:35             ` Ulf Hansson

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=de8e1567-0392-6de7-9669-0f7ace327d56@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=krisman@collabora.co.uk \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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