aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2021-08-10 11:16:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-15 09:47:36 +0200
commitfb8e695e9cfa47864c5df8f1c15c2a4b8cf753f2 (patch)
treefd7002e3146076f3ecaa06f9cb98fc9f2cbe54a2
parent48b1f117e8d0a049135e178c11beb7c08fcd81c3 (diff)
downloadlinux-yocto-fb8e695e9cfa47864c5df8f1c15c2a4b8cf753f2.tar.gz
linux-yocto-fb8e695e9cfa47864c5df8f1c15c2a4b8cf753f2.tar.bz2
linux-yocto-fb8e695e9cfa47864c5df8f1c15c2a4b8cf753f2.zip
mmc: moxart: Fix issue with uninitialized dma_slave_config
[ Upstream commit ee5165354d498e5bceb0b386e480ac84c5f8c28c ] Depending on the DMA driver being used, the struct dma_slave_config may need to be initialized to zero for the unused data. For example, we have three DMA drivers using src_port_window_size and dst_port_window_size. If these are left uninitialized, it can cause DMA failures. For moxart, this is probably not currently an issue but is still good to fix though. Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver") Cc: Jonas Jensen <jonas.jensen@gmail.com> Cc: Vinod Koul <vkoul@kernel.org> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210810081644.19353-3-tony@atomide.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/mmc/host/moxart-mmc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index a0670e9cd012..5553a5643f40 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -631,6 +631,7 @@ static int moxart_probe(struct platform_device *pdev)
host->dma_chan_tx, host->dma_chan_rx);
host->have_dma = true;
+ memset(&cfg, 0, sizeof(cfg));
cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;