summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChaotian Jing <chaotian.jing@mediatek.com>2018-10-13 09:20:47 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2018-10-15 15:00:29 +0200
commitf38a9774ddde9d79b3487dd888edd8b8623552af (patch)
tree9c2c52c78dad7efc7c291dba9ca716cb05260165 /drivers/mmc
parentmmc: mediatek: fill the actual clock for mmc debugfs (diff)
downloadlinux-f38a9774ddde9d79b3487dd888edd8b8623552af.tar.xz
linux-f38a9774ddde9d79b3487dd888edd8b8623552af.zip
mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail
when msdc_cmd_is_ready return fail, the req_timeout work has not been inited and cancel_delayed_work() will return false, then, the request return directly and never call mmc_request_done(). so need call mod_delayed_work() before msdc_cmd_is_ready() Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mtk-sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index ef45f1dd33b7..fe80a1d9f000 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1059,6 +1059,7 @@ static void msdc_start_command(struct msdc_host *host,
WARN_ON(host->cmd);
host->cmd = cmd;
+ mod_delayed_work(system_wq, &host->req_timeout, DAT_TIMEOUT);
if (!msdc_cmd_is_ready(host, mrq, cmd))
return;
@@ -1070,7 +1071,6 @@ static void msdc_start_command(struct msdc_host *host,
cmd->error = 0;
rawcmd = msdc_cmd_prepare_raw_cmd(host, mrq, cmd);
- mod_delayed_work(system_wq, &host->req_timeout, DAT_TIMEOUT);
sdr_set_bits(host->base + MSDC_INTEN, cmd_ints_mask);
writel(cmd->arg, host->base + SDC_ARG);