diff options
author | Arnd Hannemann <arnd@arndnet.de> | 2010-12-29 08:21:14 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-01-08 23:52:32 -0500 |
commit | 2bd6a935555b06622fa7f47a9c411b8a7812e4dc (patch) | |
tree | aa96bbf4376b9b40d52946b7e41d58082cc3c183 /drivers/mmc | |
parent | 6ff56e0d8e02df023440ea65774cf1d15e669ece (diff) |
mmc: tmio_mmc: fix CMD irq handling
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>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | 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 689a3692242e..e3c6ef208391 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c | |||
@@ -727,8 +727,10 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid) | |||
727 | */ | 727 | */ |
728 | 728 | ||
729 | /* Command completion */ | 729 | /* Command completion */ |
730 | if (ireg & TMIO_MASK_CMD) { | 730 | if (ireg & (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT)) { |
731 | ack_mmc_irqs(host, TMIO_MASK_CMD); | 731 | ack_mmc_irqs(host, |
732 | TMIO_STAT_CMDRESPEND | | ||
733 | TMIO_STAT_CMDTIMEOUT); | ||
732 | tmio_mmc_cmd_irq(host, status); | 734 | tmio_mmc_cmd_irq(host, status); |
733 | } | 735 | } |
734 | 736 | ||