mmc: core: Avoid hogging the CPU while polling for busy after I/O writes
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 2 Jul 2021 13:42:29 +0000 (15:42 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Aug 2021 08:15:32 +0000 (10:15 +0200)
commit6966e6094c6d594044ef1b740dd827e05881331c
tree4a9ba8bc0ecd16dac8a1198d1a491b61adcd888d
parent468108155b0f89cc08189cc33f9bacfe9da8a125
mmc: core: Avoid hogging the CPU while polling for busy after I/O writes

When mmc_blk_card_busy() calls card_busy_detect() to poll for the card's
state with CMD13, this is done without any delays in between the commands
being sent.

Rather than fixing card_busy_detect() in this regards, let's instead
convert into using the common __mmc_poll_for_busy(), which also helps us to
avoid open-coding.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://lore.kernel.org/r/20210702134229.357717-4-ulf.hansson@linaro.org
drivers/mmc/core/block.c
drivers/mmc/core/mmc_ops.c