Skip to content

Commit 8bdf533

Browse files
dbalutakartben
authored andcommitted
dma: nxp: sdma: Initialize channel capacity with zero
DMA channel capacity wasn't properly initialized and the computation relies on it being zeroed. This only works fine only when requesting channel the first time causing problems when we have multiple cycles of channel request/release. Fix this by properly initializing the capacity when requesting the channel. Fixes 43a48d4 ("drivers: dma: sdma: Update buffer descriptor") Signed-off-by: Daniel Baluta <[email protected]>
1 parent e7201b9 commit 8bdf533

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/dma/dma_nxp_sdma.c

+1
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ static bool sdma_channel_filter(const struct device *dev, int chan_id, void *par
432432

433433
dev_data->chan[chan_id].event_source = *((int *)param);
434434
dev_data->chan[chan_id].index = chan_id;
435+
dev_data->chan[chan_id].capacity = 0;
435436

436437
return true;
437438
}

0 commit comments

Comments
 (0)