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