Skip to content

Commit

Permalink
mmc: tmio_mmc: fix CMD irq handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Hannemann authored and Chris Ball committed Jan 9, 2011
1 parent 6ff56e0 commit 2bd6a93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/mmc/host/tmio_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,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);
}

Expand Down

0 comments on commit 2bd6a93

Please sign in to comment.