mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
mmc: tmio: Add data timeout error detection
Currently, busy timeout is not checked for data transfer command. But, if the temperature condition changes, the data cannot be acquired correctly and timeout may occur. Also, we could reproduce an issue by using mmc_test driver (e.g. "Correct xfer_size at write (start failure)"). Therefore, this adds timeout error check. Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com> [saito: rework commit message.] Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com> [shimoda: rebase, add commit description] Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/1608708622-29668-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
e085b51c74
commit
35cdcd1268
1 changed files with 4 additions and 2 deletions
|
@ -477,8 +477,10 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host, unsigned int stat)
|
|||
if (!data)
|
||||
goto out;
|
||||
|
||||
if (stat & TMIO_STAT_CRCFAIL || stat & TMIO_STAT_STOPBIT_ERR ||
|
||||
stat & TMIO_STAT_TXUNDERRUN)
|
||||
if (stat & TMIO_STAT_DATATIMEOUT)
|
||||
data->error = -ETIMEDOUT;
|
||||
else if (stat & TMIO_STAT_CRCFAIL || stat & TMIO_STAT_STOPBIT_ERR ||
|
||||
stat & TMIO_STAT_TXUNDERRUN)
|
||||
data->error = -EILSEQ;
|
||||
if (host->dma_on && (data->flags & MMC_DATA_WRITE)) {
|
||||
u32 status = sd_ctrl_read16_and_16_as_32(host, CTL_STATUS);
|
||||
|
|
Loading…
Reference in a new issue