Re: [PATCH v3 27/34] dmaengine: plx_dma: use channel BH helpers
From: Frank Li
Date: Wed Sep 02 2026 - 11:26:35 EST
On Mon, Aug 10, 2026 at 11:09:28AM -0700, Allen Pais wrote:
> Replace the device tasklet with the per-channel BH helper so completion
> callbacks run via dmaengine_*_bh.
>
> Signed-off-by: Allen Pais <allen.lkml@xxxxxxxxx>
> Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> drivers/dma/plx_dma.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
> index 84941a918b01..a9a798c54ef1 100644
> --- a/drivers/dma/plx_dma.c
> +++ b/drivers/dma/plx_dma.c
> @@ -105,7 +105,6 @@ struct plx_dma_dev {
> struct dma_chan dma_chan;
> struct pci_dev __rcu *pdev;
> void __iomem *bar;
> - struct tasklet_struct desc_task;
>
> spinlock_t ring_lock;
> bool ring_active;
> @@ -241,9 +240,10 @@ static void plx_dma_stop(struct plx_dma_dev *plxdev)
> rcu_read_unlock();
> }
>
> -static void plx_dma_desc_task(struct tasklet_struct *t)
> +static void plx_dma_desc_task(struct dma_chan *chan)
> {
> - struct plx_dma_dev *plxdev = from_tasklet(plxdev, t, desc_task);
> + struct plx_dma_dev *plxdev = container_of(chan, struct plx_dma_dev,
> + dma_chan);
>
> plx_dma_process_desc(plxdev);
> }
> @@ -366,7 +366,7 @@ static irqreturn_t plx_dma_isr(int irq, void *devid)
> return IRQ_NONE;
>
> if (status & PLX_REG_INTR_STATUS_DESC_DONE && plxdev->ring_active)
> - tasklet_schedule(&plxdev->desc_task);
> + dmaengine_schedule_bh(&plxdev->dma_chan);
>
> writew(status, plxdev->bar + PLX_REG_INTR_STATUS);
>
> @@ -471,7 +471,7 @@ static void plx_dma_free_chan_resources(struct dma_chan *chan)
> if (irq > 0)
> synchronize_irq(irq);
>
> - tasklet_kill(&plxdev->desc_task);
> + dmaengine_kill_bh(&plxdev->dma_chan);
>
> plx_dma_abort_desc(plxdev);
>
> @@ -510,7 +510,7 @@ static int plx_dma_create(struct pci_dev *pdev)
> goto free_plx;
>
> spin_lock_init(&plxdev->ring_lock);
> - tasklet_setup(&plxdev->desc_task, plx_dma_desc_task);
> + dmaengine_init_bh(&plxdev->dma_chan, plx_dma_desc_task);
>
> RCU_INIT_POINTER(plxdev->pdev, pdev);
> plxdev->bar = pcim_iomap_table(pdev)[0];
> --
> 2.43.0
>