]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: fix __mmc_switch timeout caused by preempt
authorChaotian Jing <chaotian.jing@mediatek.com>
Mon, 30 Nov 2015 01:27:30 +0000 (09:27 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 22 Dec 2015 10:32:18 +0000 (11:32 +0100)
commite392843927ee82c0d65ea079857d3463e86bb416
treee1af5a6ec3b17d99f86fa42c6c39563b01602197
parent773a58f8ce3f942945abce1b2523d63b638a4585
mmc: core: fix __mmc_switch timeout caused by preempt

there is a time window between __mmc_send_status() and time_afer(),
on some eMMC chip, the timeout_ms is only 10ms, if this thread was
scheduled out during this period, then, even card has already changes
to transfer state by the result of CMD13, this part of code also treat
it to timeout error.
So, need calculate timeout first, then call __mmc_send_status(), if
already timeout and card still in programing state, then treat it to
the real timeout error.

Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc_ops.c