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

Commit 970e6a81 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: allow hosts to specify a large discard size"

parents ee805c7b 0d79ebc8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4083,6 +4083,10 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
	struct mmc_host *host = card->host;
	unsigned int max_discard, max_trim;

	if (!host->max_busy_timeout ||
			(host->caps2 & MMC_CAP2_MAX_DISCARD_SIZE))
		return UINT_MAX;

	/*
	 * Without erase_group_def set, MMC erase timeout depends on clock
	 * frequence which can change.  In that case, the best choice is