]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
spi: spi-pic32: Fix issue with uninitialized dma_slave_config
authorTony Lindgren <tony@atomide.com>
Tue, 10 Aug 2021 08:17:27 +0000 (11:17 +0300)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 11 Oct 2021 23:08:44 +0000 (17:08 -0600)
commit036fbc9a32c40ac8355d41d67a2894fb051cca8c
tree7779f71e5df35d2b44d43b6682bffab8fa924852
parent381ea3bd04072fc210a5833041f23d60795a9eef
spi: spi-pic32: Fix issue with uninitialized dma_slave_config

BugLink: https://bugs.launchpad.net/bugs/1946024
[ Upstream commit 976c1de1de147bb7f4e0d87482f375221c05aeaf ]

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 spi-pic32, this is probably not currently an issue but is still good to
fix though.

Fixes: 1bcb9f8ceb67 ("spi: spi-pic32: Add PIC32 SPI master driver")
Cc: Purna Chandra Mandal <purna.mandal@microchip.com>
Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210810081727.19491-2-tony@atomide.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/spi/spi-pic32.c