From e3014a572e0c2411ba1f7d69ae2201db70870fbf Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 9 Oct 2019 16:57:14 +0000 Subject: [PATCH] dwmmc: Reset the dma controller at attach If the bootloader enabled DMA we need to fully reset the DMA controller otherwise we might have some stale data in it that provoke weird behavior. MFC after: 1 week --- sys/dev/mmc/host/dwmmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c index ea426df71268..a551b6dabd78 100644 --- a/sys/dev/mmc/host/dwmmc.c +++ b/sys/dev/mmc/host/dwmmc.c @@ -611,6 +611,7 @@ dwmmc_attach(device_t dev) } if (!sc->use_pio) { + dma_stop(sc); if (dma_setup(sc)) return (ENXIO);