]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 18:07:35 +0000 (19:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:27 +0000 (11:01 +0200)
commit82cd791e73385193e32e3a19212a6d7d955e7c16
treeb7097057895ee6f570db023e0a3c19f4f9f1522d
parent763faa425ad33800326c83062c40f8db6eb2ee6c
mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard

[ Upstream commit 1f8149f50882776a12248f4bd9b64bd9bec01421 ]

The busy timeout that is computed for each erase/trim/discard operation,
can become quite long and may thus exceed the host->max_busy_timeout. If
that becomes the case, mmc_do_erase() converts from using an R1B response
to an R1 response, as to prevent the host from doing HW busy detection.

However, it has turned out that some hosts requires an R1B response no
matter what, so let's respect that via checking MMC_CAP_NEED_RSP_BUSY. Note
that, if the R1B gets enforced, the host becomes fully responsible of
managing the needed busy timeout, in one way or the other.

Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Cc: <stable@vger.kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Tested-by: Faiz Abbas <faiz_abbas@ti.com>
Tested-By: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/core/core.c