XDMA stream support: set wb desc addr only if allocated.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WriteBack descriptor is allocated only in STREAM Mode.

Signed-off-by: Eric DEBIEF <debief@xxxxxxxxxxxx>
---
 drivers/dma/xilinx/xdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index c2a56f8ff1ac..3c7fcad761e8 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -653,7 +653,7 @@ xdma_prep_device_sg(struct dma_chan *chan, struct
scatterlist *sgl,
         src = &addr;
         dst = &dev_addr;
     } else {
-        dev_addr = xdma_chan->cfg.src_addr ?
+        dev_addr = xdma_chan->c2h_wback == NULL ?
             xdma_chan->cfg.src_addr : xdma_chan->c2h_wback->dma_addr;
         src = &dev_addr;
         dst = &addr;
@@ -731,7 +731,7 @@ xdma_prep_dma_cyclic(struct dma_chan *chan,
dma_addr_t address,
         src = &addr;
         dst = &dev_addr;
     } else {
-        dev_addr = xdma_chan->cfg.src_addr ?
+        dev_addr = xdma_chan->c2h_wback == NULL ?
             xdma_chan->cfg.src_addr : xdma_chan->c2h_wback->dma_addr;
         src = &dev_addr;
         dst = &addr;
--
2.34.1

-- 
 
<https://www.digigram.com/digigram-critical-audio-at-eurosatory-2024-in-paris/>




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux