Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dmaengine-fix-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:
"A bunch of driver fixes for:

- ptdma error handling in init

- lock fix in at_hdmac

- error path and error num fix for sh dma

- pm balance fix for stm32"

* tag 'dmaengine-fix-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
dmaengine: shdma: Fix runtime PM imbalance on error
dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size
dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
dmaengine: sh: rcar-dmac: Check for error num after setting mask
dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet()
dmaengine: ptdma: Fix the error handling path in pt_core_init()

+25 -13
+3 -1
drivers/dma/at_xdmac.c
··· 1681 1681 __func__, atchan->irq_status); 1682 1682 1683 1683 if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) && 1684 - !(atchan->irq_status & error_mask)) 1684 + !(atchan->irq_status & error_mask)) { 1685 + spin_unlock_irq(&atchan->lock); 1685 1686 return; 1687 + } 1686 1688 1687 1689 if (atchan->irq_status & error_mask) 1688 1690 at_xdmac_handle_error(atchan);
+9 -8
drivers/dma/ptdma/ptdma-dev.c
··· 207 207 if (!cmd_q->qbase) { 208 208 dev_err(dev, "unable to allocate command queue\n"); 209 209 ret = -ENOMEM; 210 - goto e_dma_alloc; 210 + goto e_destroy_pool; 211 211 } 212 212 213 213 cmd_q->qidx = 0; ··· 229 229 230 230 /* Request an irq */ 231 231 ret = request_irq(pt->pt_irq, pt_core_irq_handler, 0, dev_name(pt->dev), pt); 232 - if (ret) 233 - goto e_pool; 232 + if (ret) { 233 + dev_err(dev, "unable to allocate an IRQ\n"); 234 + goto e_free_dma; 235 + } 234 236 235 237 /* Update the device registers with queue information. */ 236 238 cmd_q->qcontrol &= ~CMD_Q_SIZE; ··· 252 250 /* Register the DMA engine support */ 253 251 ret = pt_dmaengine_register(pt); 254 252 if (ret) 255 - goto e_dmaengine; 253 + goto e_free_irq; 256 254 257 255 /* Set up debugfs entries */ 258 256 ptdma_debugfs_setup(pt); 259 257 260 258 return 0; 261 259 262 - e_dmaengine: 260 + e_free_irq: 263 261 free_irq(pt->pt_irq, pt); 264 262 265 - e_dma_alloc: 263 + e_free_dma: 266 264 dma_free_coherent(dev, cmd_q->qsize, cmd_q->qbase, cmd_q->qbase_dma); 267 265 268 - e_pool: 269 - dev_err(dev, "unable to allocate an IRQ\n"); 266 + e_destroy_pool: 270 267 dma_pool_destroy(pt->cmd_q.dma_pool); 271 268 272 269 return ret;
+7 -2
drivers/dma/sh/rcar-dmac.c
··· 1868 1868 1869 1869 dmac->dev = &pdev->dev; 1870 1870 platform_set_drvdata(pdev, dmac); 1871 - dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK); 1872 - dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40)); 1871 + ret = dma_set_max_seg_size(dmac->dev, RCAR_DMATCR_MASK); 1872 + if (ret) 1873 + return ret; 1874 + 1875 + ret = dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40)); 1876 + if (ret) 1877 + return ret; 1873 1878 1874 1879 ret = rcar_dmac_parse_of(&pdev->dev, dmac); 1875 1880 if (ret < 0)
+3 -1
drivers/dma/sh/shdma-base.c
··· 115 115 ret = pm_runtime_get(schan->dev); 116 116 117 117 spin_unlock_irq(&schan->chan_lock); 118 - if (ret < 0) 118 + if (ret < 0) { 119 119 dev_err(schan->dev, "%s(): GET = %d\n", __func__, ret); 120 + pm_runtime_put(schan->dev); 121 + } 120 122 121 123 pm_runtime_barrier(schan->dev); 122 124
+3 -1
drivers/dma/stm32-dmamux.c
··· 292 292 ret = of_dma_router_register(node, stm32_dmamux_route_allocate, 293 293 &stm32_dmamux->dmarouter); 294 294 if (ret) 295 - goto err_clk; 295 + goto pm_disable; 296 296 297 297 return 0; 298 298 299 + pm_disable: 300 + pm_runtime_disable(&pdev->dev); 299 301 err_clk: 300 302 clk_disable_unprepare(stm32_dmamux->clk); 301 303