mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Mar 2020 13:43:00 +0000 (14:43 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 Mar 2020 15:11:34 +0000 (16:11 +0100)
commit43cc64e5221cc6741252b64bc4531dd1eefb733d
treefe31360ba702f8af632b23dcb3fdd26be746d956
parent1292e3efb149ee21d8d33d725eeed4e6b1ade963
mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard

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>
drivers/mmc/core/core.c