Re: [PATCH v5 04/24] dmaengine: dw-edma: Make DMA link list work as a circular buffer
| Newsgroups | org.kernel.vger.dmaengine |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The driver now outright rejects DMA descriptors that exceed the hardware linked-list (LL) ring capacity, breaking support for large scatter-gather (SG) lists. -- --- Patch [4]: [PATCH v5 04/24] dmaengine: dw-edma: Make DMA link list work as a circular buffer --- commit 4de65eea41cbb28142107d984aea6044ff700244 Author: Frank Li <[email protected]> dmaengine: dw-edma: Make DMA link list work as a circular buffer This commit converts the DMA linked list to operate as a circular ring buffer instead of rebuilding the entire list for every transfer. It also adds logic to clear control words before first use and rejects descriptor requests that exceed the usable ring capacity. > diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c > index a6bb68ffdfe26..1af262b6e881e 100644 > --- a/drivers/dma/dw-edma/dw-edma-core.c > +++ b/drivers/dma/dw-edma/dw-edma-core.c > @@ -51,13 +51,19 @@ dw_edma_alloc_desc(struct dw_edma_chan *chan, size_t nburst) > { > struct dw_edma_desc *desc; > > + /* > + * For now, a descriptor that does not fit would stall the channel > + * forever: reject it up front. > + */ > + if (!chan->non_ll && nburst > chan->ll_max - 1) > + return NULL; [Severity: High] Does this cause a functional regression for DMA clients submitting large scatter-gather lists? Previously, large transfers were handled by chunking them into batches and restarting the channel on each completion interrupt. By transitioning to a circular buffer and returning NULL for descriptors that exceed the usable ring capacity outright, dmaengine_prep_slave_sg() will now fail for those clients. Since the commit message notes this rejection is in place "until reclaim support lands," will this break existing users who depend on handling large SG lists in the meantime? -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4