linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mmc: core: Add SD Discard support
@ 2019-02-26 15:10 Avri Altman
  2019-02-26 15:10 ` [PATCH v3 1/2] mmc: core: Add discard support to sd Avri Altman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Avri Altman @ 2019-02-26 15:10 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc
  Cc: Wolfram Sang, Adrian Hunter, Jaehoon Chung, Shawn Lin,
	Avi Shchislowski, Alex Lemberg, linux-kernel, Avri Altman

SD spec v5.1 adds discard support. The flows and commands matches those
in eMMC, Which leaves to set the appropriate discard arg in CMD38 if
DISCARD_SUPPORT (b313) is set in the SD_STATUS register.

We set this arg on card init: not in mmc_init_erase as one might expect
but arbitrarily once the card indicated its discard support.  This is
because unlike erase, it doesn't really involve any logic, and we want
to avoid the unnecessary complication.

V2->v3:
The first 2 patches in the series got accepted.
Elaborate the changelog of some of the differences between discard and
erase. Clean some inconsistency in arg checking in mmc_erase().
Add a patch to set the timeout for sd discard.

V1->v2:
In the first patch, assign the discard arg for SD cards as well to keep
the code consistent. Rename "discard_arg" to "erase_arg", and elaborate
the change log.


Avri Altman (2):
  mmc: core: Add discard support to sd
  mmc: core: Add sd discard timeout

 drivers/mmc/core/core.c | 15 +++++++++++----
 drivers/mmc/core/sd.c   | 10 +++++++++-
 include/linux/mmc/sd.h  |  1 +
 3 files changed, 21 insertions(+), 5 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-27  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26 15:10 [PATCH v3 0/2] mmc: core: Add SD Discard support Avri Altman
2019-02-26 15:10 ` [PATCH v3 1/2] mmc: core: Add discard support to sd Avri Altman
2019-02-26 15:10 ` [PATCH v3 2/2] mmc: core: Add sd discard timeout Avri Altman
2019-02-27  9:39 ` [PATCH v3 0/2] mmc: core: Add SD Discard support Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).