Skip to content

Commit eac189c

Browse files
nunojsagastmaier
authored andcommitted
dma: dma-axi-dmac: fix HW scatter-gather not looking at the queue
For HW scatter gather transfers we still need to look for the queue. The HW is capable of queueing 3 concurrent transfers and if we try more than that we'll get the submit queue full and should return. Otherwise, if we go ahead and program the new transfer, we end up discarding it. Fixes: e97dc74 ("dmaengine: axi-dmac: Add support for scatter-gather transfers") Signed-off-by: Nuno Sá <[email protected]> (cherry picked from commit 0dac3bc)
1 parent 72376e1 commit eac189c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/dma/dma-axi-dmac.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,9 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan)
236236
unsigned int flags = 0;
237237
unsigned int val;
238238

239-
if (!chan->hw_sg) {
240-
val = axi_dmac_read(dmac, AXI_DMAC_REG_START_TRANSFER);
241-
if (val) /* Queue is full, wait for the next SOT IRQ */
242-
return;
243-
}
239+
val = axi_dmac_read(dmac, AXI_DMAC_REG_START_TRANSFER);
240+
if (val) /* Queue is full, wait for the next SOT IRQ */
241+
return;
244242

245243
desc = chan->next_desc;
246244

0 commit comments

Comments
 (0)