Patch "spi: mt65xx: Add dma max segment size declaration" has been added to the 6.0-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: mt65xx: Add dma max segment size declaration

to the 6.0-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-mt65xx-add-dma-max-segment-size-declaration.patch
and it can be found in the queue-6.0 subdirectory.

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



commit f94f99e49ab4259af47e84ec9f348bff4003c7fd
Author: zhichao.liu <zhichao.liu@xxxxxxxxxxxx>
Date:   Tue Sep 27 16:32:48 2022 +0800

    spi: mt65xx: Add dma max segment size declaration
    
    [ Upstream commit 309e98548c2b144512d0a212f2d786ae9694f5e4 ]
    
    Add spi dma max segment size declaration according to spi
    hardware capability, instead of 64KB by system default
    setting, to improve bus bandwidth for mass data transmission.
    
    Signed-off-by: zhichao.liu <zhichao.liu@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220927083248.25404-1-zhichao.liu@xxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Stable-dep-of: c6f7874687f7 ("spi: mediatek: Enable irq when pdata is ready")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index a7cc96aeb590..d6aff909fc36 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1187,6 +1187,11 @@ static int mtk_spi_probe(struct platform_device *pdev)
 	if (!dev->dma_mask)
 		dev->dma_mask = &dev->coherent_dma_mask;
 
+	if (mdata->dev_comp->ipm_design)
+		dma_set_max_seg_size(dev, SZ_16M);
+	else
+		dma_set_max_seg_size(dev, SZ_256K);
+
 	ret = devm_request_irq(dev, irq, mtk_spi_interrupt,
 			       IRQF_TRIGGER_NONE, dev_name(dev), master);
 	if (ret)



[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