Skip to content

Commit ad5a469

Browse files
committed
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 9f158bf commit ad5a469

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
@@ -245,6 +245,8 @@ static void dma_nxp_sdma_setup_bd(const struct device *dev, uint32_t channel,
245245

246246
chan_data = &dev_data->chan[channel];
247247

248+
chan_data->capacity = 0;
249+
248250
/* initialize bd pool */
249251
chan_data->bd_pool = &dev_data->bd_pool[channel][0];
250252
chan_data->bd_count = config->block_count;

0 commit comments

Comments
 (0)