From: Nguyen Viet Dung <nv-dung@jinso.co.jp>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] mmc: mmcif: don't clear masked interrupts
Date: Wed, 15 May 2013 08:39:40 +0000 [thread overview]
Message-ID: <519349CC.3050606@jinso.co.jp> (raw)
In-Reply-To: <Pine.LNX.4.64.1305150746480.10596@axis700.grange>
On 05/15/2013 02:50 PM, Guennadi Liakhovetski wrote:
> Masking events on MMCIF means, an occurrence of the masked event won't raise
> an interrupt, but the event bit will still be set in the interrupt status
> register. If simultaneously a different event occurs, that was enabled, both
> flags will be set. However, only the unmasked event bit should be cleared in
> the status register in such a case. Clearing also the masked bit can lead to
> lost interrupts, which indeed can be observed on the armadillo800eva r8a7740
> board with an eMMC chip. The problem has been introduced by the recent "mmc:
> sh_mmcif: simplify IRQ processing" patch. Fix the problem by only clearing
> enabled interrupts.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
tested-by: Nguyen Viet Dung<nv-dung@jinso.co.jp>
Best regards
Nguyen Viet Dung
> ---
>
> Chris, please, push this fix to 3.10, thanks.
>
> drivers/mmc/host/sh_mmcif.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index ba76a53..06caaae 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -1244,7 +1244,8 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
> u32 state;
>
> state = sh_mmcif_readl(host->addr, MMCIF_CE_INT);
> - sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~state);
> + sh_mmcif_writel(host->addr, MMCIF_CE_INT,
> + ~(state & sh_mmcif_readl(host->addr, MMCIF_CE_INT_MASK)));
> sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, state & MASK_CLEAN);
>
> if (state & ~MASK_CLEAN)
prev parent reply other threads:[~2013-05-15 8:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 5:50 [PATCH] mmc: mmcif: don't clear masked interrupts Guennadi Liakhovetski
2013-05-15 5:50 ` Guennadi Liakhovetski
2013-05-15 6:40 ` Guennadi Liakhovetski
2013-05-15 6:40 ` Guennadi Liakhovetski
2013-05-15 8:39 ` Nguyen Viet Dung
2013-05-15 8:39 ` Nguyen Viet Dung
2013-05-16 6:38 ` Kuninori Morimoto
2013-05-16 6:38 ` Kuninori Morimoto
2013-06-06 7:39 ` Guennadi Liakhovetski
2013-06-06 7:39 ` Guennadi Liakhovetski
2013-06-06 11:42 ` Chris Ball
2013-06-06 11:42 ` Chris Ball
2013-05-15 8:39 ` Nguyen Viet Dung [this message]
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=519349CC.3050606@jinso.co.jp \
--to=nv-dung@jinso.co.jp \
--cc=linux-sh@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.