summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/au1xmmc.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-09-02 12:14:37 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2016-09-26 21:31:35 +0200
commit3b2a067b98b45f7a7dafe21c34a3ae744c697f0f (patch)
treeabd8f7e1f3f103512bf454512abefaeb0ae4d38c /drivers/mmc/host/au1xmmc.c
parentec0baaa6b33932a25432e17e0bca8d96083caffa (diff)
mmc: dw_mmc: avoid race condition of cpu and IDMAC
We could see an obvious race condition by test that the former write operation by IDMAC aiming to clear OWN bit reach right after the later configuration of the same desc, which makes the IDMAC be in SUSPEND state as the OWN bit was cleared by the asynchronous write operation of IDMAC. The bug can be very easy reproduced on RK3288 or similar when we reduce the running rate of system buses and keep the CPU running faster. So as two separate masters, IDMAC and cpu write the same descriptor stored on the same address, and this should be protected by adding check of OWN bit before preparing new descriptors. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/au1xmmc.c')
0 files changed, 0 insertions, 0 deletions