]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
commit3bbb0deea6d5c6d5ed38ae927a5bf9b0cd7c8639
treee1af5a6ec3b17d99f86fa42c6c39563b01602197
parent05caee939f8d58d81e962071da85761e1e3a4c73
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