diff options
author | Amelie Delaunay <amelie.delaunay@foss.st.com> | 2023-10-04 17:50:24 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-09 11:10:58 +0530 |
commit | 67e13e89742c3b21ce177f612bf9ef32caae6047 (patch) | |
tree | 9d3a74c0d3a5e418112d496afb293073352c6689 /scripts/gdb/linux/vmalloc.py | |
parent | 2df467e908ce463cff1431ca1b00f650f7a514b4 (diff) |
dmaengine: stm32-dma: fix residue in case of MDMA chaining
In case of MDMA chaining, DMA is configured in Double-Buffer Mode (DBM)
with two periods, but if transfer has been prepared with _prep_slave_sg(),
the transfer is not marked cyclic (=!chan->desc->cyclic). However, as DBM
is activated for MDMA chaining, residue computation must take into account
cyclic constraints.
With only two periods in MDMA chaining, and no update due to Transfer
Complete interrupt masked, n_sg is always 0. If DMA current memory address
(depending on SxCR.CT and SxM0AR/SxM1AR) does not correspond, it means n_sg
should be increased.
Then, the residue of the current period is the one read from SxNDTR and
should not be overwritten with the full period length.
Fixes: 723795173ce1 ("dmaengine: stm32-dma: add support to trigger STM32 MDMA")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231004155024.2609531-2-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions