LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Brad Harper <bjharper@gmail.com>
To: Jerome Brunet <jbrunet@baylibre.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: meson-gx: fix irq ack
Date: Tue, 28 May 2019 17:27:16 +1000	[thread overview]
Message-ID: <4786e031-b070-f4b0-c7ba-1ffe1a2eab2d@gmail.com> (raw)
In-Reply-To: <20190523145950.7030-1-jbrunet@baylibre.com>

On 24/05/2019 12:59 am, Jerome Brunet wrote:
> While cleaning the ISR of the meson-gx and acking only raised irqs,
> the ack of the irq was moved at the very last stage of the function.
> 
> This was stable during the initial tests but it triggered issues with
> hs200, under specific loads (like booting android). Acking the irqs
> after calling the mmc_request_done() causes the problem.
> 
> Moving the ack back to the original place solves the issue. Since the
> irq is edge triggered, it does not hurt to ack irq even earlier, so
> let's do it early in the ISR.
> 
> Fixes: 9c5fdb07a28d ("mmc: meson-gx: ack only raised irq")
> Tested-by: Neil Armstrong <narmstrong@baylibre.com>
> Tested-by: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>   drivers/mmc/host/meson-gx-mmc.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 6ef465304052..cb3f6811d69a 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -873,6 +873,9 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
>   	if (WARN_ON(!host) || WARN_ON(!host->cmd))
>   		return IRQ_NONE;
>   
> +	/* ack all raised interrupts */
> +	writel(status, host->regs + SD_EMMC_STATUS);
> +
>   	cmd = host->cmd;
>   	data = cmd->data;
>   	cmd->error = 0;
> @@ -919,9 +922,6 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
>   	if (ret == IRQ_HANDLED)
>   		meson_mmc_request_done(host->mmc, cmd->mrq);
>   
> -	/* ack all raised interrupts */
> -	writel(status, host->regs + SD_EMMC_STATUS);
> -
>   	return ret;
>   }
>   
> 
This patch resolves issues I was having with hung tasks waiting for emmc 
& sd cards on the odroid N2.

Tested-by: Brad Harper <bjharper@gmail.com>

  parent reply	other threads:[~2019-05-28  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 14:59 Jerome Brunet
2019-05-23 15:47 ` Kevin Hilman
2019-05-28  7:27 ` Brad Harper [this message]
2019-05-28  8:53 ` 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=4786e031-b070-f4b0-c7ba-1ffe1a2eab2d@gmail.com \
    --to=bjharper@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=ulf.hansson@linaro.org \
    --subject='Re: [PATCH] mmc: meson-gx: fix irq ack' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).