Skip to contentSkip to conversation

dmaengine: amlogic: Fix little-endian variable operations issue

PATCH In review Xianwei Zhao 2 participants 2 messages Oct 13

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dmaengine: amlogic: Fix little-endian variable operations issue

In dma_async_tx_descriptor function,fix the situation where the operation processing of the little-endian variable requires corresponding conversion.

Fixes b84b5197e344 ("dmaengine: amlogic: Add general DMA driver for A9")

---
Fix the operation little-endian variable issue.
---
Changes in v2:
- Simplify processing and rename subject to 'dmaengine', suggested by Frank.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/dma/amlogic-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/amlogic-dma.c +1 -1
index 78ee2337ae71..dbd23d29397d 100644
@@ -321,7 +321,7 @@ static struct dma_async_tx_descriptor *aml_dma_prep_slave_sg
 
 	/* the last sg set eoc flag */
 	sg_link--;
-	sg_link->ctl |= LINK_EOC;
+	sg_link->ctl |= cpu_to_le32(LINK_EOC);
 
 	return vchan_tx_prep(&aml_chan->vchan, &aml_desc->vd, flags);
 }

---
base-commit: 42c31fec1ca76b8b5f7759def122d418dff2cd4b
change-id: 20261012-fix-a9-dma-4be7e61ba653

Best regards,

Signature · 1 line
Xianwei Zhao <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · On Tue, Oct 13, 2026 at 03:21:11AM +0000, Xianwei Zhao via B4 Relay wrote:

From: Xianwei Zhao <[email protected]>

In dma_async_tx_descriptor function,fix the situation where the operation processing of the little-endian variable requires corresponding conversion.

Fixes b84b5197e344 ("dmaengine: amlogic: Add general DMA driver for A9")
Quoted 33 lines

---
Fix the operation little-endian variable issue.
---
Changes in v2:
- Simplify processing and rename subject to 'dmaengine', suggested by Frank.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/dma/amlogic-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/amlogic-dma.c +1 -2
index 78ee2337ae71..dbd23d29397d 100644
@@ -321,7 +321,7 @@ static struct dma_async_tx_descriptor *aml_dma_prep_slave_sg
 
 	/* the last sg set eoc flag */
 	sg_link--;
-	sg_link->ctl |= LINK_EOC;
+	sg_link->ctl |= cpu_to_le32(LINK_EOC);
 
 	return vchan_tx_prep(&aml_chan->vchan, &aml_desc->vd, flags);
 }
 
---

base-commit: 42c31fec1ca76b8b5f7759def122d418dff2cd4b
change-id: 20261012-fix-a9-dma-4be7e61ba653

Best regards,
--
Xianwei Zhao <[email protected]>