Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e8551eb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: use cache flush timeout as cache disable timeout"

parents 5fcb8055 ac28baee
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -59,8 +59,7 @@ static void mmc_clk_scaling(struct mmc_host *host, bool from_wq);
#define MMC_BKOPS_MAX_TIMEOUT	(30 * 1000) /* max time to wait in ms */

/* Flushing a large amount of cached data may take a long time. */
#define MMC_FLUSH_REQ_TIMEOUT_MS 90000 /* msec */
#define MMC_CACHE_DISBALE_TIMEOUT_MS 180000 /* msec */
#define MMC_FLUSH_REQ_TIMEOUT_MS 180000 /* msec */

static struct workqueue_struct *workqueue;
static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
@@ -3632,7 +3631,7 @@ int mmc_cache_ctrl(struct mmc_host *host, u8 enable)

		if (card->ext_csd.cache_ctrl ^ enable) {
			if (!enable)
				timeout = MMC_CACHE_DISBALE_TIMEOUT_MS;
				timeout = MMC_FLUSH_REQ_TIMEOUT_MS;

			err = mmc_switch_ignore_timeout(card,
					EXT_CSD_CMD_SET_NORMAL,