summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sd.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2022-03-02 11:28:33 -0500
committerRodrigo Vivi <rodrigo.vivi@intel.com>2022-03-02 11:28:33 -0500
commit230bc2bed518632602bd2cdad6ba5d2081d448b5 (patch)
treef08bf885fe7d2a81939d74e3051a8cc8185c4915 /drivers/mmc/core/sd.c
parent17003d109e6cd08d4db5f6525a1023537ce6c743 (diff)
parent38a15ad9488e21cad8f42d3befca20f91e5b2874 (diff)
downloadlinux-230bc2bed518632602bd2cdad6ba5d2081d448b5.tar.bz2
Merge drm/drm-next into drm-intel-next
To catch up with recent rounds of pull requests and get some drm-misc dependencies so we can merge linux/string_helpers related changes. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r--drivers/mmc/core/sd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 45f578793980..bd87012c220c 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -67,7 +67,7 @@ static const unsigned int sd_au_size[] = {
__res & __mask; \
})
-#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 2000
+#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 1000
#define SD_WRITE_EXTR_SINGLE_TIMEOUT_MS 1000
struct sd_busy_data {
@@ -1664,6 +1664,12 @@ static int sd_poweroff_notify(struct mmc_card *card)
goto out;
}
+ /* Find out when the command is completed. */
+ err = mmc_poll_for_busy(card, SD_WRITE_EXTR_SINGLE_TIMEOUT_MS, false,
+ MMC_BUSY_EXTR_SINGLE);
+ if (err)
+ goto out;
+
cb_data.card = card;
cb_data.reg_buf = reg_buf;
err = __mmc_poll_for_busy(card->host, SD_POWEROFF_NOTIFY_TIMEOUT_MS,