Patch "spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-spi-fsl-dspi-fix-issue-with-uninitialized-dma_sl.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 33e6391f6e64268f953239b3ec7b465cb2550a91
Author: Tony Lindgren <tony@xxxxxxxxxxx>
Date:   Tue Aug 10 11:17:26 2021 +0300

    spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
    
    [ Upstream commit 209ab223ad5b18e437289235e3bde12593b94ac4 ]
    
    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-fsl-dspi, this is probably not currently an issue but is still
    good to fix though.
    
    Fixes: 90ba37033cb9 ("spi: spi-fsl-dspi: Add DMA support for Vybrid")
    Cc: Sanchayan Maity <maitysanchayan@xxxxxxxxx>
    Cc: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Cc: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>
    Cc: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
    Acked-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Link: https://lore.kernel.org/r/20210810081727.19491-1-tony@xxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index fb45e6af6638..fd004c9db9dc 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -530,6 +530,7 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr)
 		goto err_rx_dma_buf;
 	}
 
+	memset(&cfg, 0, sizeof(cfg));
 	cfg.src_addr = phy_addr + SPI_POPR;
 	cfg.dst_addr = phy_addr + SPI_PUSHR;
 	cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux