linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/19] mmc: Improve host driver's support for R1B responses
@ 2020-04-14 16:13 Ulf Hansson
  2020-04-14 16:13 ` [PATCH 01/19] mmc: atmel-mci: Keep timer enabled when queuing a next request Ulf Hansson
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: Ulf Hansson @ 2020-04-14 16:13 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson
  Cc: Adrian Hunter, Linus Walleij, Rui Miguel Silva, Johan Hovold,
	Alex Elder, Greg Kroah-Hartman, Jonathan Neuschäfer,
	Bruce Chang, Harald Welte, Alex Dubov, Sascha Sommer,
	Manivannan Sadhasivam, mirq-linux, Jesper Nilsson, Lars Persson,
	Paul Cercueil, Ludovic Desroches, Nicolas Ferre

Some MMC/SD commands uses R1B responses, which means the card may assert the DAT0 line
to signal busy for a period of time, after it has received the command. The mmc
core normally specifies the busy period for the command in the
cmd->busy_timeout. Ideally the driver should respect it, but that isn't always
the case, for several reasons.

For example, the mmc host may not even support HW busy signal
detection, the HW may have a build-in upper limit of the timeout and the driver
simply uses that or it uses some other internal command/request SW timeout
mechanism with another timeout value.

In cases when the host driver can't support a cmd->busy_timeout, the core
implements a fallback method, which is based upon sending CMD13 to poll the card
about the status instead. However, to make this work, the host driver need to
specify the mmc->max_busy_timeout, as to make the core aware of when to use the
fallback method with CMD13 polling.

Step by step, host drivers has been improved to better cope with the above
scenarios. Although in this series, I have walked through *all* host drivers and
those that looked particularly suspicious I have fixed.

Note, none of the changes has been tested on HW, so I am relying on help with
this.

The next step beyond this series is to make MMC_CAP_ERASE default enabled, as
that would trigger CMD38 to be used. CMD38 uses the R1B response and may
typically require longer busy periods to be supported.

Kind regards
Ulf Hanssom


Ulf Hansson (19):
  mmc: atmel-mci: Keep timer enabled when queuing a next request
  mmc: atmel-mci: Set the timer per command rather than per request
  mmc: atmel-mci: Respect the cmd->busy_timeout from the mmc core
  mmc: jz4740: Inform the mmc core about the maximum busy timeout
  mmc: usdhi6rol0: Inform the mmc core about the maximum busy timeout
  mmc: cb710: Inform the mmc core about the maximum busy timeout
  mmc: owl-mmc: Respect the cmd->busy_timeout from the mmc core
  mmc: sdricoh_cs: Drop unused defines
  mmc: sdricoh_cs: Use MMC_APP_CMD rather than a hardcoded number
  mmc: sdricoh_cs: Move MMC_APP_CMD handling to sdricoh_mmc_cmd()
  mmc: sdricoh_cs: Drop redundant in-parameter to sdricoh_query_status()
  mmc: sdricoh_cs: Throttle polling rate for data transfers
  mmc: sdricoh_cs: Throttle polling rate for commands
  mmc: sdricoh_cs: Respect the cmd->busy_timeout from the mmc core
  mmc: tifm_sd: Inform the mmc core about the maximum busy timeout
  mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc core
  mmc: mmc_spi: Add/rename defines for timeouts
  mmc: mmc_spi: Respect the cmd->busy_timeout from the mmc core
  staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc
    core

 drivers/mmc/host/atmel-mci.c   |  12 ++--
 drivers/mmc/host/cb710-mmc.c   |   8 +++
 drivers/mmc/host/jz4740_mmc.c  |  13 ++++-
 drivers/mmc/host/mmc_spi.c     |  20 +++----
 drivers/mmc/host/owl-mmc.c     |   8 ++-
 drivers/mmc/host/sdricoh_cs.c  | 103 +++++++++++++++++----------------
 drivers/mmc/host/tifm_sd.c     |   9 ++-
 drivers/mmc/host/usdhi6rol0.c  |   9 ++-
 drivers/mmc/host/via-sdmmc.c   |   7 ++-
 drivers/staging/greybus/sdio.c |  10 +++-
 10 files changed, 125 insertions(+), 74 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2020-05-08  8:38 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 16:13 [PATCH 00/19] mmc: Improve host driver's support for R1B responses Ulf Hansson
2020-04-14 16:13 ` [PATCH 01/19] mmc: atmel-mci: Keep timer enabled when queuing a next request Ulf Hansson
2020-04-17 20:39   ` ludovic.desroches
2020-04-14 16:13 ` [PATCH 02/19] mmc: atmel-mci: Set the timer per command rather than per request Ulf Hansson
2020-04-17 20:40   ` ludovic.desroches
2020-04-14 16:13 ` [PATCH 03/19] mmc: atmel-mci: Respect the cmd->busy_timeout from the mmc core Ulf Hansson
2020-04-17 20:44   ` ludovic.desroches
2020-04-14 16:13 ` [PATCH 04/19] mmc: jz4740: Inform the mmc core about the maximum busy timeout Ulf Hansson
2020-04-14 16:13 ` [PATCH 05/19] mmc: usdhi6rol0: " Ulf Hansson
2020-04-15  6:34   ` Jesper Nilsson
2020-04-14 16:14 ` [PATCH 06/19] mmc: cb710: " Ulf Hansson
2020-04-14 18:39   ` Michał Mirosław
2020-04-15  7:41     ` Ulf Hansson
2020-05-08  8:38       ` Ulf Hansson
2020-04-14 16:14 ` [PATCH 07/19] mmc: owl-mmc: Respect the cmd->busy_timeout from the mmc core Ulf Hansson
2020-04-14 16:14 ` [PATCH 08/19] mmc: sdricoh_cs: Drop unused defines Ulf Hansson
2020-04-14 16:14 ` [PATCH 09/19] mmc: sdricoh_cs: Use MMC_APP_CMD rather than a hardcoded number Ulf Hansson
2020-04-14 16:14 ` [PATCH 10/19] mmc: sdricoh_cs: Move MMC_APP_CMD handling to sdricoh_mmc_cmd() Ulf Hansson
2020-04-14 16:14 ` [PATCH 11/19] mmc: sdricoh_cs: Drop redundant in-parameter to sdricoh_query_status() Ulf Hansson
2020-04-14 16:14 ` [PATCH 12/19] mmc: sdricoh_cs: Throttle polling rate for data transfers Ulf Hansson
2020-04-14 16:14 ` [PATCH 13/19] mmc: sdricoh_cs: Throttle polling rate for commands Ulf Hansson
2020-04-14 16:14 ` [PATCH 14/19] mmc: sdricoh_cs: Respect the cmd->busy_timeout from the mmc core Ulf Hansson
2020-04-14 16:14 ` [PATCH 15/19] mmc: tifm_sd: Inform the mmc core about the maximum busy timeout Ulf Hansson
2020-04-14 16:14 ` [PATCH 16/19] mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc core Ulf Hansson
2020-04-14 16:14 ` [PATCH 17/19] mmc: mmc_spi: Add/rename defines for timeouts Ulf Hansson
2020-04-14 16:14 ` [PATCH 18/19] mmc: mmc_spi: Respect the cmd->busy_timeout from the mmc core Ulf Hansson
2020-04-14 16:14 ` [PATCH 19/19] staging: greybus: sdio: " Ulf Hansson
2020-04-15  8:30   ` Rui Miguel Silva
2020-04-16 10:25   ` Greg Kroah-Hartman

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).