summaryrefslogtreecommitdiff
path: root/drivers/staging/mt7621-dma
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-03 07:55:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-03 07:55:28 +0100
commitd5d12ce229c17fde99c6f8cc42f3701264a60e8c (patch)
tree9d3c4ec71ea8cab74d02b8311997630d651767eb /drivers/staging/mt7621-dma
parent7626e002225a4c1b9455689b1f22909dfeff43ca (diff)
parent2595646791c319cadfdbf271563aac97d0843dc7 (diff)
Merge 4.20-rc5 into staging-next
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-dma')
-rw-r--r--drivers/staging/mt7621-dma/mtk-hsdma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c b/drivers/staging/mt7621-dma/mtk-hsdma.c
index 35556f024aa1..d67a2504adb1 100644
--- a/drivers/staging/mt7621-dma/mtk-hsdma.c
+++ b/drivers/staging/mt7621-dma/mtk-hsdma.c
@@ -335,6 +335,8 @@ static int mtk_hsdma_start_transfer(struct mtk_hsdam_engine *hsdma,
/* tx desc */
src = sg->src_addr;
for (i = 0; i < chan->desc->num_sgs; i++) {
+ tx_desc = &chan->tx_ring[chan->tx_idx];
+
if (len > HSDMA_MAX_PLEN)
tlen = HSDMA_MAX_PLEN;
else
@@ -344,7 +346,6 @@ static int mtk_hsdma_start_transfer(struct mtk_hsdam_engine *hsdma,
tx_desc->addr1 = src;
tx_desc->flags |= HSDMA_DESC_PLEN1(tlen);
} else {
- tx_desc = &chan->tx_ring[chan->tx_idx];
tx_desc->addr0 = src;
tx_desc->flags = HSDMA_DESC_PLEN0(tlen);