Merge "mmc: increase BKOPS polling duration before suspend"
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index de10f84..cb1b1aa 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -531,8 +531,12 @@
msleep(BKOPS_COMPLETION_POLLING_INTERVAL_MS);
} while (time_before(jiffies, timeout_jiffies));
- pr_err("%s: %s: exit polling due to timeout\n",
+ pr_err("%s: %s: exit polling due to timeout, stop bkops\n",
mmc_hostname(card->host), __func__);
+ err = mmc_stop_bkops(card);
+ if (err)
+ pr_err("%s: %s: mmc_stop_bkops failed, err=%d\n",
+ mmc_hostname(card->host), __func__, err);
return;
out:
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 32347b8..a2405cf 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -282,7 +282,7 @@
#define MMC_IDLE_BKOPS_TIME_MS 200
struct work_struct poll_for_completion;
/* Polling timeout and interval for waiting on non-blocking BKOPs completion */
-#define BKOPS_COMPLETION_POLLING_TIMEOUT_MS 10000 /* in ms */
+#define BKOPS_COMPLETION_POLLING_TIMEOUT_MS (4 * 60 * 1000) /* in ms */
#define BKOPS_COMPLETION_POLLING_INTERVAL_MS 1000 /* in ms */
bool cancel_delayed_work;
bool started_delayed_bkops;