mmc: core: Avoid hogging the CPU while polling for busy for mmc ioctls
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 2 Jul 2021 13:42:28 +0000 (15:42 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Aug 2021 08:15:31 +0000 (10:15 +0200)
commit468108155b0f89cc08189cc33f9bacfe9da8a125
tree4767c6ee222375f87704ec26d7f463ee03eac914
parent972d5084831dc9ae30f1a4b66cb4a19fb7ba6f09
mmc: core: Avoid hogging the CPU while polling for busy for mmc ioctls

When __mmc_blk_ioctl_cmd() calls card_busy_detect() to verify that the
card's states moves back into transfer state, the polling with CMD13 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-3-ulf.hansson@linaro.org
drivers/mmc/core/block.c