Re: [PATCH v3 18/24] dmaengine: dw-edma: Make the LL ring reset a full channel resync
[email protected] Mon, 27 Jul 2026 17:24:12 +0000
| Newsgroups | org.kernel.vger.dmaengine |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The driver fails to dynamically append multiple descriptors to the LL ring concurrently, defeating the pipelining design. -- --- Patch [18]: [PATCH v3 18/24] dmaengine: dw-edma: Make the LL ring reset a full channel resync --- commit 5973888151d0718a6614eb2366d05e6ecc44461c Author: Koichiro Den <[email protected]> dmaengine: dw-edma: Make the LL ring reset a full channel resync This commit updates the channel reset logic for the dw-edma LL ring. It clears out descriptors with published entries to prevent stale tracking while keeping untouched descriptors available, and ensures the ring is reset before looking up the next issued descriptor. > diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c > --- a/drivers/dma/dw-edma/dw-edma-core.c > +++ b/drivers/dma/dw-edma/dw-edma-core.c [ ... ] > @@ -364,6 +383,13 @@ static int dw_edma_start_transfer(struct dw_edma_chan *chan) > struct dw_edma_desc *desc; > struct virt_dma_desc *vd; > > + if (!chan->non_ll) { > + if (dw_edma_abort_is_pending(chan)) > + return 0; > + if (!chan->ll_valid) > + dw_edma_core_reset_ll(chan); > + } > + > vd = vchan_next_desc(&chan->vc); [Severity: Medium] Does this logic prevent dynamic appending of subsequent descriptors? Since vchan_next_desc() only fetches the first descriptor in the desc_issued list, if this descriptor has been fully published (start_burst == nburst) but not yet fully consumed by hardware (done_burst < nburst), it remains on the list. In that scenario, dw_edma_start_transfer() will repeatedly fetch this same descriptor, find no more elements to add, and return. This would completely ignore any subsequent pending descriptors until the first one is completed and removed, defeating the pipelining design of appending multiple descriptors to the LL ring concurrently. > if (!vd) > return 0; -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=18