diff options
author | Masaharu Hayakawa <[email protected]> | 2020-11-17 14:13:37 +0100 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2020-11-23 14:22:14 +0100 |
commit | 40e49564e189a81094fccac830818d6c89dde376 (patch) | |
tree | 48a82b901e1dcf259f5f654b046bb5abcc8e09e5 | |
parent | 854a22997ad5d6c9860a2d695c40cd4004151d5b (diff) |
mmc: tmio: Fix command error processing
If some errors are detected at the same time as the access end
interrupt, the access end interrupt was not cleared. Especially with
DMA, because then the access end interrupt was never enabled and, thus,
never cleared. Clear the interrupt register always when a command error
occurs.
Signed-off-by: Masaharu Hayakawa <[email protected]>
[saito: rebase to v5.4]
Signed-off-by: Takeshi Saito <[email protected]>
[wsa: rebase and extension of the commit message]
Signed-off-by: Wolfram Sang <[email protected]>
Reviewed-by: Niklas Söderlund <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r-- | drivers/mmc/host/tmio_mmc_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index cb4149fd12e0..7f4a28125010 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -796,8 +796,10 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host) spin_unlock_irqrestore(&host->lock, flags); - if (mrq->cmd->error || (mrq->data && mrq->data->error)) + if (mrq->cmd->error || (mrq->data && mrq->data->error)) { + tmio_mmc_ack_mmc_irqs(host, TMIO_MASK_IRQ); /* Clear all */ tmio_mmc_abort_dma(host); + } /* Error means retune, but executed command was still successful */ if (host->check_retune && host->check_retune(host)) |