]> 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)
commit63fa193a3b3994716f26c359137d2bcb8adb97c5
treee1af5a6ec3b17d99f86fa42c6c39563b01602197
parent5f4dba24a64fd45f67b683d81b2cb6bd0c3dbc62
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