linux-stable/drivers/dma
Amelie Delaunay 3e90adedcc dmaengine: stm32-dma: configure next sg only if there are more than 2 sgs
[ Upstream commit e19bdbaa31 ]

DMA operates in Double Buffer Mode (DBM) when the transfer is cyclic and
there are at least two periods.
When DBM is enabled, the DMA toggles between two memory targets (SxM0AR and
SxM1AR), indicated by the SxSCR.CT bit (Current Target).
There is no need to update the next memory address if two periods are
configured, as SxM0AR and SxM1AR are already properly set up before the
transfer begins in the stm32_dma_start_transfer() function.
This avoids unnecessary updates to SxM0AR/SxM1AR, thereby preventing
potential Transfer Errors. Specifically, when the channel is enabled,
SxM0AR and SxM1AR can only be written if SxSCR.CT=1 and SxSCR.CT=0,
respectively. Otherwise, a Transfer Error interrupt is triggered, and the
stream is automatically disabled.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20250624-stm32_dma_dbm_fix-v1-1-337c40d6c93e@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:41:25 +02:00
..
amd dmaengine updates for v6.16 2025-06-05 08:49:30 -07:00
bestcomm
dw
dw-axi-dmac
dw-edma dma: dw-edma: Fix build warning in dw_edma_pcie_probe() 2025-07-15 20:41:49 +05:30
fsl-dpaa2-qdma
hsu
idxd dmaengine updates for v6.16 2025-06-05 08:49:30 -07:00
ioat treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
lgm
mediatek dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() 2025-06-26 15:09:20 -07:00
ppc4xx
qcom
sf-pdma
sh dmaengine: sh: rz-dmac: Add RZ/V2H(P) support 2025-05-14 15:30:40 +01:00
stm32 dmaengine: stm32-dma: configure next sg only if there are more than 2 sgs 2025-08-20 18:41:25 +02:00
ti dmaengine updates for v6.16 2025-06-05 08:49:30 -07:00
xilinx dmaengine: xilinx_dma: Set dma_device directions 2025-05-14 14:50:07 +01:00
acpi-dma.c
altera-msgdma.c
amba-pl08x.c
apple-admac.c
arm-dma350.c dmaengine: Add Arm DMA-350 driver 2025-04-17 20:47:39 +05:30
at_hdmac.c
at_xdmac.c dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts 2025-04-17 20:38:10 +05:30
bcm2835-dma.c
bcm-sba-raid.c
dma-axi-dmac.c
dma-jz4780.c
dmaengine.c
dmaengine.h
dmatest.c dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" 2025-04-17 15:06:02 +05:30
ep93xx_dma.c
fsl_raid.c
fsl_raid.h
fsl-edma-common.c dmaegnine: fsl-edma: add edma error interrupt handler 2025-04-23 18:42:46 +05:30
fsl-edma-common.h dmaegnine: fsl-edma: add edma error interrupt handler 2025-04-23 18:42:46 +05:30
fsl-edma-main.c dmaengine updates for v6.16 2025-06-05 08:49:30 -07:00
fsl-edma-trace.c
fsl-edma-trace.h
fsl-qdma.c
fsldma.c fsldma: Set correct dma_mask based on hw capability 2025-05-14 15:25:15 +01:00
fsldma.h fsldma: Set correct dma_mask based on hw capability 2025-05-14 15:25:15 +01:00
hisi_dma.c
idma64.c
idma64.h
img-mdc-dma.c
imx-dma.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
imx-sdma.c
k3dma.c
Kconfig dmaengine: ARM_DMA350 should depend on ARM/ARM64 2025-04-23 18:42:46 +05:30
loongson1-apb-dma.c
loongson2-apb-dma.c
lpc18xx-dmamux.c
lpc32xx-dmamux.c
Makefile dmaengine: Add Arm DMA-350 driver 2025-04-17 20:47:39 +05:30
mcf-edma-main.c
milbeaut-hdmac.c
milbeaut-xdmac.c
mmp_pdma.c
mmp_tdma.c dmaengine: mmp: Fix again Wvoid-pointer-to-enum-cast warning 2025-08-15 16:39:01 +02:00
moxart-dma.c
mpc512x_dma.c
mv_xor_v2.c
mv_xor.c dmaengine: mv_xor: Fix missing check after DMA map and missing unmap 2025-08-15 16:39:11 +02:00
mv_xor.h
mxs-dma.c
nbpfaxi.c dmaengine: nbpfaxi: Add missing check after DMA map 2025-08-15 16:39:11 +02:00
of-dma.c
owl-dma.c
pch_dma.c
pl330.c
plx_dma.c
pxa_dma.c
sa11x0-dma.c
sprd-dma.c
st_fdma.c
st_fdma.h
ste_dma40_ll.c
ste_dma40_ll.h
ste_dma40.c
ste_dma40.h
sun4i-dma.c
sun6i-dma.c
tegra20-apb-dma.c
tegra186-gpc-dma.c
tegra210-adma.c dmaengine: tegra210-adma: Add Tegra264 support 2025-05-14 14:47:22 +01:00
timb_dma.c
TODO
txx9dmac.c
txx9dmac.h
uniphier-mdmac.c
uniphier-xdmac.c
virt-dma.c
virt-dma.h
xgene-dma.c