]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Fixup support for HW busy detection for HPI commands
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 4 Feb 2020 08:54:48 +0000 (09:54 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 13:35:40 +0000 (14:35 +0100)
commit579c4c60b25dc29d7d128548a9a474d520309f0d
tree1d5840ec35378a22d19aa018da23c28e2771227b
parente7ca869cceb25c8e59c1ae87a734a1678ba7cece
mmc: core: Fixup support for HW busy detection for HPI commands

In case the host specify a max_busy_timeout, we need to validate that the
needed timeout for the HPI command conforms to that requirement. If that's
not the case, let's convert from a R1B response to a R1 response, as to
instruct the host to avoid HW busy detection.

Additionally, when R1B is used we must also inform the host about the busy
timeout for the command, so let's do that via updating cmd.busy_timeout.

Finally, when R1B is used and in case the host supports HW busy detection,
there should be no need for doing polling, so then skip that.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Baolin Wang <baolin.wang7@gmail.com>
Tested-by: Ludovic Barre <ludovic.barre@st.com>
Reviewed-by: Ludovic Barre <ludovic.barre@st.com>
Link: https://lore.kernel.org/r/20200204085449.32585-12-ulf.hansson@linaro.org
drivers/mmc/core/mmc_ops.c