diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-11-30 12:13:14 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-12-21 21:51:27 +0530 |
commit | b3072be7f955e56789a0508c18e9870f45cd9a11 (patch) | |
tree | a2a156be5700f6d8228de23d776b308b32085406 /drivers/dma | |
parent | 58b61fc75ba901b1fd63c911b31249f36d17e9c4 (diff) |
dmaengine: xilinx: xdma: Better handling of the busy variable
The driver internal scatter-gather logic is:
* set busy to true
* start transfer
<irq>
* set busy to false
* trigger next transfer if any
* set busy to true
</irq>
Setting busy to false in cyclic transfers does not make any sense and is
conceptually wrong. In order to ease the integration of additional
callbacks let's move this change to the scatter-gather path.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20231130111315.729430-4-miquel.raynal@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/xilinx/xdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index 4efef1b5f89c..e931ff42209c 100644 --- a/drivers/dma/xilinx/xdma.c +++ b/drivers/dma/xilinx/xdma.c @@ -745,7 +745,6 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id) if (!vd) goto out; - xchan->busy = false; desc = to_xdma_desc(vd); xdev = xchan->xdev_hdl; @@ -766,6 +765,7 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id) vchan_cyclic_callback(vd); } else { + xchan->busy = false; desc->completed_desc_num += complete_desc_num; /* if all data blocks are transferred, remove and complete the request */ |