]> git.itanic.dy.fi Git - linux-stable/commit
mmc: mmci: Prevent polling for busy detection in IRQ context
authorLudovic Barre <ludovic.barre@st.com>
Fri, 26 Apr 2019 07:46:35 +0000 (09:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:52:57 +0000 (11:52 +0200)
commitdb8ca7fdb8b840f78f70d208671f6af06684b26a
treea4b5825e0774a6747c7fb809a94143bcb633ee42
parentf2ab446fe90f463fedabf06b194b1e5b8b31d736
mmc: mmci: Prevent polling for busy detection in IRQ context

[ Upstream commit 8520ce1e17799b220ff421d4f39438c9c572ade3 ]

The IRQ handler, mmci_irq(), loops until all status bits have been cleared.
However, the status bit signaling busy in variant->busy_detect_flag, may be
set even if busy detection isn't monitored for the current request.

This may be the case for the CMD11 when switching the I/O voltage, which
leads to that mmci_irq() busy loops in IRQ context. Fix this problem, by
clearing the status bit for busy, before continuing to validate the
condition for the loop. This is safe, because the busy status detection has
already been taken care of by mmci_cmd_irq().

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mmci.c