]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mmc: mtk-sd: Add wait dma stop done flow
authorDerong Liu <derong.liu@mediatek.com>
Fri, 27 Aug 2021 07:15:37 +0000 (15:15 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:07 +0000 (09:48 +0100)
commit31af1d9939400b1fc32d97126cfc39b4420b67fa
treeba3dc54f8959dd76f3885f62a6c741e8982dc16d
parente336bcecd95fa823c1661152d8212e6ee1c3503c
mmc: mtk-sd: Add wait dma stop done flow

BugLink: https://bugs.launchpad.net/bugs/1951822
commit 43e5fee317f4b0a48992b8b07935b1a3ac20ce84 upstream.

We found this issue on a 5G platform, during CMDQ error handling, if DMA
status is active when it call msdc_reset_hw(), it means mmc host hw reset
and DMA transfer will be parallel, mmc host may access sram region
unexpectedly. According to the programming guide of mtk-sd host, it needs
to wait for dma stop done after set dma stop.

This change should be applied to all SoCs.

Signed-off-by: Derong Liu <derong.liu@mediatek.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210827071537.1034-1-derong.liu@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/mmc/host/mtk-sd.c