From: Yusuke Goda <yusuke.goda.sx@renesas.com>
To: ian@mnementh.co.uk, damm@opensource.se, sameo@linux.intel.com,
Paul Mundt <lethal@linux-sh.org>,
g.liakhovetski@gmx.de, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] tmio_mmc: Make ack_mmc_irqs() write-only
Date: Tue, 20 Jul 2010 16:51:51 +0900 [thread overview]
Message-ID: <4C455597.2020200@renesas.com> (raw)
This patch updates ack_mmc_irqs() to acknowledge using write instead
of read-modify-write. Without this fix the old read-modify-write
implementation may acknowledge interrupt sources by mistake. The
driver may if so lock-up waiting forever for an interrupt that will
never come. Observed with the TMIO_STAT_RXRDY bit together with CMD53
on AR6002 and BCM4318 SDIO cards in polled mode.
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
drivers/mmc/host/tmio_mmc.h | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 64f7d5d..7944604 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -82,10 +82,7 @@
#define ack_mmc_irqs(host, i) \
do { \
- u32 mask;\
- mask = sd_ctrl_read32((host), CTL_STATUS); \
- mask &= ~((i) & TMIO_MASK_IRQ); \
- sd_ctrl_write32((host), CTL_STATUS, mask); \
+ sd_ctrl_write32((host), CTL_STATUS, ~(i)); \
} while (0)
--
1.7.0
next reply other threads:[~2010-07-20 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 7:51 Yusuke Goda [this message]
2010-07-23 11:10 ` [PATCH] tmio_mmc: Make ack_mmc_irqs() write-only Magnus Damm
2010-08-20 15:12 ` Arnd Hannemann
2010-08-20 22:55 ` Magnus Damm
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=4C455597.2020200@renesas.com \
--to=yusuke.goda.sx@renesas.com \
--cc=akpm@linux-foundation.org \
--cc=damm@opensource.se \
--cc=g.liakhovetski@gmx.de \
--cc=ian@mnementh.co.uk \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=sameo@linux.intel.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