mmc: core: Restore (almost) the busy polling for MMC_SEND_OP_COND
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 4 Mar 2022 10:56:56 +0000 (11:56 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Mar 2022 10:47:39 +0000 (11:47 +0100)
commit1760fdb6fe9f796fbdb9b4106b3e0bbacc16b55c
tree67d774297e990266de1677a78957c03cac56594e
parentf0d2f15362f02444c5d7ffd5a5eb03e4aa54b685
mmc: core: Restore (almost) the busy polling for MMC_SEND_OP_COND

Commit 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1"),
significantly decreased the polling period from ~10-12ms into just a couple
of us. The purpose was to decrease the total time spent in the busy polling
loop, but unfortunate it has lead to problems, that causes eMMC cards to
never gets out busy and thus fails to be initialized.

To fix the problem, but also to try to keep some of the new improved
behaviour, let's start by using a polling period of 1-2ms, which then
increases for each loop, according to common polling loop in
__mmc_poll_for_busy().

Reported-by: Jean Rene Dawin <jdawin@math.uni-bielefeld.de>
Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Huijin Park <huijin.park@samsung.com>
Fixes: 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Jean Rene Dawin <jdawin@math.uni-bielefeld.de>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Link: https://lore.kernel.org/r/20220304105656.149281-1-ulf.hansson@linaro.org
drivers/mmc/core/block.c
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h
drivers/mmc/core/sd.c