mmc: mtk-sd: fix hang when data read quickly
authormingming lee <mingming.lee@mediatek.com>
Tue, 31 Dec 2019 03:29:25 +0000 (11:29 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jan 2020 14:39:45 +0000 (09:39 -0500)
commitfb80eaa9d8c15840bbceb4b8152c3759a84ae39e
tree11c1d25420b670de25701ec41bdecf0b49bb944a
parent3b0397d48b54aa22ea45e70dbbef065bbc69a245
mmc: mtk-sd: fix hang when data read quickly

For CMD21 tuning data, the 128/64 bytes data may coming in very
short time, before msdc_start_data(), the read data has already
come, in this case, clear MSDC_INT will cause the interrupt disappear
and lead to the thread hang.

the solution is just clear all interrupts before command was sent.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
drivers/mmc/mtk-sd.c