[PATCH v2 28/64] dmaengine: plx_dma: use channel BH helpers
Allen Pais <[email protected]> Mon, 27 Jul 2026 13:28:56 -0700
| Newsgroups | org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <f2aa736ef2d9422717ab798cd38bcc405eefa94b.1785183549.git.allen.lkml@gmail.com> |
Replace the device tasklet with the per-channel BH helper so completion callbacks run via dma_chan_*_bh. Signed-off-by: Allen Pais <[email protected]> --- 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..9d6bbdfa5a69 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); + dma_chan_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); + dma_chan_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); + dma_chan_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