diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2021-07-02 15:42:27 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-08-24 10:15:31 +0200 |
commit | 972d5084831dc9ae30f1a4b66cb4a19fb7ba6f09 (patch) | |
tree | b1ba1db0a79e504480990e5959f07998859a4f89 /drivers/mmc/core/mmc_ops.h | |
parent | 2b8ac062f33781edbefb482c6abebfde6b373eed (diff) | |
download | linux-972d5084831dc9ae30f1a4b66cb4a19fb7ba6f09.tar.bz2 |
mmc: core: Avoid hogging the CPU while polling for busy in the I/O err path
When mmc_blk_fix_state() sends a CMD12 to try to move the card into the
transfer state, it 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-2-ulf.hansson@linaro.org
Diffstat (limited to 'drivers/mmc/core/mmc_ops.h')
-rw-r--r-- | drivers/mmc/core/mmc_ops.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc_ops.h b/drivers/mmc/core/mmc_ops.h index 41ab4f573a31..ae25ffc2e870 100644 --- a/drivers/mmc/core/mmc_ops.h +++ b/drivers/mmc/core/mmc_ops.h @@ -15,6 +15,7 @@ enum mmc_busy_cmd { MMC_BUSY_ERASE, MMC_BUSY_HPI, MMC_BUSY_EXTR_SINGLE, + MMC_BUSY_IO, }; struct mmc_host; |