]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mediatek: wait dma stop bit reset to 0
authorMengqi Zhang <mengqi.zhang@mediatek.com>
Thu, 9 Jun 2022 11:22:39 +0000 (19:22 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 15 Jun 2022 17:05:56 +0000 (10:05 -0700)
commit337534a67172cc4f03de46a86017f6b6e1d7688f
tree95dffd051ff68c23a150a14b6384ab08ae77bc59
parentaa09ae9c060a5ea13a8dbc974c5ecef0e6b51d5e
mmc: mediatek: wait dma stop bit reset to 0

MediaTek IP requires that after dma stop, it need to wait this dma stop
bit auto-reset to 0. When bus is in high loading state, it will take a
while for the dma stop complete. If there is no waiting operation here,
when program runs to clear fifo and reset, bus will hang.

In addition, there should be no return in msdc_data_xfer_next() if
there is data need be transferred, because no matter what error occurs
here, it should continue to excute to the following mmc_request_done.
Otherwise the core layer may wait complete forever.

Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220609112239.18911-1-mengqi.zhang@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c