linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] tmio_mmc: fix CMD irq handling
  2010-09-23 13:33 [PATCH 1/2] tmio_mmc: handle missing HW interrupts Arnd Hannemann
@ 2010-09-23 13:33 ` Arnd Hannemann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Hannemann @ 2010-09-23 13:33 UTC (permalink / raw)
  To: linux-mmc; +Cc: Ian Molton, linux-sh, Arnd Hannemann

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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index cb66af5..75a0aca 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -430,8 +430,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);
 		}
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] tmio_mmc: fix CMD irq handling
       [not found] ` <AANLkTi=B=pcxVTMSxk2Orftp8zH7o8jebL1hbQ52dyzH@mail.gmail.com>
@ 2010-09-24  8:13   ` Arnd Hannemann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Hannemann @ 2010-09-24  8:13 UTC (permalink / raw)
  To: Ian Molton; +Cc: linux-mmc@vger.kernel.org, linux-sh

Added MLs into CC

Am 23.09.2010 21:28, schrieb Ian Molton:
> This looks good - what testing has it had ?

Tested with the SDHI hardware block in sh7372 (on AP4EVB).
Both with PIO and DMA. Tested with MMC and SD cards.

Regards
Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-24  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4C9B5BF4.3070109@arndnet.de>
     [not found] ` <AANLkTi=B=pcxVTMSxk2Orftp8zH7o8jebL1hbQ52dyzH@mail.gmail.com>
2010-09-24  8:13   ` [PATCH 2/2] tmio_mmc: fix CMD irq handling Arnd Hannemann
2010-09-23 13:33 [PATCH 1/2] tmio_mmc: handle missing HW interrupts Arnd Hannemann
2010-09-23 13:33 ` [PATCH 2/2] tmio_mmc: fix CMD irq handling Arnd Hannemann

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).