Skip to content

Commit 312ff1c

Browse files
dbalutakartben
authored andcommitted
drivers: dma: sdma: Fix noise issue with pause/resume
Each time we configure an SDMA channel we also compute the total allocated DMA buffer length but we assume is initialized with zero. This is true each time a channel is requested. But if there are multiple calls to configure without releasing the channel the buffer length is not correctly computed. So, we need to initialize it with zero each time we reconfigure the dma channel. Signed-off-by: Daniel Baluta <[email protected]>
1 parent 4999086 commit 312ff1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/dma/dma_nxp_sdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ static void dma_nxp_sdma_setup_bd(const struct device *dev, uint32_t channel,
237237

238238
chan_data = &dev_data->chan[channel];
239239

240+
chan_data->capacity = 0;
241+
240242
/* initialize bd pool */
241243
chan_data->bd_pool = &dev_data->bd_pool[channel][0];
242244
chan_data->bd_count = config->block_count;

0 commit comments

Comments
 (0)