Re: [PATCH v3 6/6] dmaengine: plx_dma: don't invoke client callbacks with ring_lock held

From: Frank Li

Date: Wed Nov 18 2026 - 12:05:37 EST


On Tue, Nov 17, 2026 at 04:46:36PM -0600, Logan Gunthorpe wrote:
>
>
> On 2026-11-17 13:31, Frank Li wrote:
> > On Tue, Nov 17, 2026 at 10:51:35AM -0600, Logan Gunthorpe wrote:
> >> @@ -166,22 +171,35 @@ static void plx_dma_process_desc(struct plx_dma_dev *plxdev)
> >>
> >> dma_cookie_complete(&desc->txd);
> >> dma_descriptor_unmap(&desc->txd);
> >> - dmaengine_desc_get_callback_invoke(&desc->txd, &res);
> >> + dmaengine_desc_get_callback(&desc->txd, &cb);
> >> desc->txd.callback = NULL;
> >> desc->txd.callback_result = NULL;
> >> -
> >> plxdev->tail++;
> >> +
> >> + spin_unlock_bh(&plxdev->ring_lock);
> >> + dmaengine_desc_callback_invoke(&cb, &res);
> >
> > Common method is slice to local complete queue in ring_lock. Then unlock
> > ring_lock after while loop. Then invoke cb in complete queue.
> The PLX driver has no software queue. The hardware queue is large enough
> that having a software queue would have been wasted overhead. So the
> virt-dma pattern doesn't apply here. I'd really rather avoid adding a
> whole other software queue just to fix this issue that isn't that complex.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>

>
> Logan