From: Chris Ball <cjb@laptop.org>
To: Arnd Hannemann <arnd@arndnet.de>
Cc: linux-mmc@vger.kernel.org, Ian Molton <ian@mnementh.co.uk>,
linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] mmc: tmio: fix CMD irq handling
Date: Wed, 05 Jan 2011 22:48:10 +0000 [thread overview]
Message-ID: <20110105224810.GB13209@void.printf.net> (raw)
In-Reply-To: <1293628874-8140-3-git-send-email-arnd@arndnet.de>
Hi Arnd,
On Wed, Dec 29, 2010 at 02:21:14PM +0100, Arnd Hannemann wrote:
> With current code card insert/eject interrupts will acknowledge outstanding
> commands. Normally this seems to be no problem, however if the hardware gets
> stuck and no interrupts for CMD_TIMEOUT or CMD_RESPEND are generated, then
> inserting and ejecting cards will falsely acknowledge outstanding commands from
> the core.
>
> This patch changes the behavior so that CMDs are only acked, if
> CMD_TIMEOUT or CMD_RESPEND is received.
>
> Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
> ---
> drivers/mmc/host/tmio_mmc.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
> index f980042..e4926c7 100644
> --- a/drivers/mmc/host/tmio_mmc.c
> +++ b/drivers/mmc/host/tmio_mmc.c
> @@ -728,8 +728,10 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid)
> */
>
> /* Command completion */
> - if (ireg & TMIO_MASK_CMD) {
> - ack_mmc_irqs(host, TMIO_MASK_CMD);
> + if (ireg & (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT)) {
> + ack_mmc_irqs(host,
> + TMIO_STAT_CMDRESPEND |
> + TMIO_STAT_CMDTIMEOUT);
> tmio_mmc_cmd_irq(host, status);
> }
>
Thanks, pushed to mmc-next for .38.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2011-01-05 22:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 13:21 [PATCH 0/2 v2] mmc: tmio: handle missing HW interrupts Arnd Hannemann
2010-12-29 13:21 ` [PATCH 1/2 " Arnd Hannemann
2011-01-05 21:22 ` Chris Ball
2011-01-05 22:31 ` Arnd Hannemann
2011-01-05 22:44 ` Chris Ball
2010-12-29 13:21 ` [PATCH 2/2 v2] mmc: tmio: fix CMD irq handling Arnd Hannemann
2011-01-05 22:48 ` Chris Ball [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=20110105224810.GB13209@void.printf.net \
--to=cjb@laptop.org \
--cc=arnd@arndnet.de \
--cc=ian@mnementh.co.uk \
--cc=linux-mmc@vger.kernel.org \
--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 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).