All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mmc: core: Add SD Discard support
@ 2019-02-06 11:28 Avri Altman
  2019-02-06 11:28 ` [PATCH v2 1/3] mmc: core: Calculate the discard arg only once Avri Altman
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Avri Altman @ 2019-02-06 11:28 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.

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 (3):
  mmc: core: Calculate the discard arg only once
  mmc: core: Indicate SD specs higher than 4.0
  mmc: core: Add discard support to sd

 drivers/mmc/core/block.c | 12 +++---------
 drivers/mmc/core/core.c  |  8 ++++++--
 drivers/mmc/core/mmc.c   |  8 ++++++++
 drivers/mmc/core/sd.c    | 15 +++++++++++++++
 include/linux/mmc/card.h |  3 +++
 include/linux/mmc/sd.h   |  6 ++++++
 6 files changed, 41 insertions(+), 11 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2019-02-25 16:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 11:28 [PATCH v2 0/3] mmc: core: Add SD Discard support Avri Altman
2019-02-06 11:28 ` [PATCH v2 1/3] mmc: core: Calculate the discard arg only once Avri Altman
2019-02-06 15:14   ` Ulf Hansson
2019-02-06 11:28 ` [PATCH v2 2/3] mmc: core: Indicate SD specs higher than 4.0 Avri Altman
2019-02-06 15:14   ` Ulf Hansson
2019-02-06 11:28 ` [PATCH v2 3/3] mmc: core: Add discard support to sd Avri Altman
2019-02-06 15:14   ` Ulf Hansson
2019-02-14 11:12     ` Avri Altman
2019-02-24  7:08       ` Avri Altman
2019-02-25 13:42   ` Ulf Hansson
2019-02-25 16:45     ` Avri Altman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.