mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning
authorFaiz Abbas <faiz_abbas@ti.com>
Thu, 11 Apr 2019 08:59:37 +0000 (14:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2020 10:55:57 +0000 (11:55 +0100)
commit3f909e15839c1c9edaa02d061f1198fb24de32ff
tree640ac8c51c6a4ae2b2a4f01851cb34fe94005378
parentdfb827019bcc6d549cf9265185eacf67c391b42d
mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning

[ Upstream commit 5c41ea6d52003b5bc77c2a82fd5ca7d480237d89 ]

commit 5b0d62108b46 ("mmc: sdhci-omap: Add platform specific reset
callback") skips data resets during tuning operation. Because of this,
a data error or data finish interrupt might still arrive after a command
error has been handled and the mrq ended. This ends up with a "mmc0: Got
data interrupt 0x00000002 even though no data operation was in progress"
error message.

Fix this by adding a platform specific callback for sdhci_irq. Mark the
mrq as a failure but wait for a data interrupt instead of calling
finish_mrq().

Fixes: 5b0d62108b46 ("mmc: sdhci-omap: Add platform specific reset
callback")
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-omap.c