* [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID
@ 2026-06-17 8:49 Ben Dooks
2026-06-17 14:12 ` Frank Li
2026-07-02 16:03 ` Vinod Koul
0 siblings, 2 replies; 4+ messages in thread
From: Ben Dooks @ 2026-06-17 8:49 UTC (permalink / raw)
To: Eugeniy Paltsev, Vinod Koul, Frank Li, dmaengine, linux-kernel; +Cc: Ben Dooks
When writing the lli->ctl_hi, this is an __le32 type so the
value being orred should be convered to __le32 by cpu_to_le32.
Fixes 1deb96c0fa58a ("dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic()")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
--
Note, the call to axi_chan_irq_clear() is passing lli->status_lo
through which is also an __le32 but it does not seem to be set
anywhere. Is this also a bug?
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 4d53f077e9d2..8311df2f11bb 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1123,7 +1123,7 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
hw_desc = &desc->hw_desc[i];
if (hw_desc->llp == llp) {
axi_chan_irq_clear(chan, hw_desc->lli->status_lo);
- hw_desc->lli->ctl_hi |= CH_CTL_H_LLI_VALID;
+ hw_desc->lli->ctl_hi |= cpu_to_le32(CH_CTL_H_LLI_VALID);
desc->completed_blocks = i;
if (((hw_desc->len * (i + 1)) % desc->period_len) == 0)
--
2.37.2.352.g3c44437643
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID
2026-06-17 8:49 [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID Ben Dooks
@ 2026-06-17 14:12 ` Frank Li
2026-06-17 14:16 ` Ben Dooks
2026-07-02 16:03 ` Vinod Koul
1 sibling, 1 reply; 4+ messages in thread
From: Frank Li @ 2026-06-17 14:12 UTC (permalink / raw)
To: Ben Dooks; +Cc: Eugeniy Paltsev, Vinod Koul, Frank Li, dmaengine, linux-kernel
On Wed, Jun 17, 2026 at 09:49:43AM +0100, Ben Dooks wrote:
>
> When writing the lli->ctl_hi, this is an __le32 type so the
> value being orred should be convered to __le32 by cpu_to_le32.
Not sure if it can pass sparse warning check.
Frank
>
> Fixes 1deb96c0fa58a ("dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic()")
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> --
> Note, the call to axi_chan_irq_clear() is passing lli->status_lo
> through which is also an __le32 but it does not seem to be set
> anywhere. Is this also a bug?
> ---
> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 4d53f077e9d2..8311df2f11bb 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1123,7 +1123,7 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
> hw_desc = &desc->hw_desc[i];
> if (hw_desc->llp == llp) {
> axi_chan_irq_clear(chan, hw_desc->lli->status_lo);
> - hw_desc->lli->ctl_hi |= CH_CTL_H_LLI_VALID;
> + hw_desc->lli->ctl_hi |= cpu_to_le32(CH_CTL_H_LLI_VALID);
> desc->completed_blocks = i;
>
> if (((hw_desc->len * (i + 1)) % desc->period_len) == 0)
> --
> 2.37.2.352.g3c44437643
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID
2026-06-17 14:12 ` Frank Li
@ 2026-06-17 14:16 ` Ben Dooks
0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2026-06-17 14:16 UTC (permalink / raw)
To: Frank Li; +Cc: Eugeniy Paltsev, Vinod Koul, Frank Li, dmaengine, linux-kernel
On 17/06/2026 15:12, Frank Li wrote:
> On Wed, Jun 17, 2026 at 09:49:43AM +0100, Ben Dooks wrote:
>>
>> When writing the lli->ctl_hi, this is an __le32 type so the
>> value being orred should be convered to __le32 by cpu_to_le32.
>
> Not sure if it can pass sparse warning check.
This was fixing a __le32 cast warning from sparse, forgot to put
the actual warning in the commit message :(
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID
2026-06-17 8:49 [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID Ben Dooks
2026-06-17 14:12 ` Frank Li
@ 2026-07-02 16:03 ` Vinod Koul
1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2026-07-02 16:03 UTC (permalink / raw)
To: Eugeniy Paltsev, Frank Li, dmaengine, linux-kernel, Ben Dooks
On Wed, 17 Jun 2026 09:49:43 +0100, Ben Dooks wrote:
> When writing the lli->ctl_hi, this is an __le32 type so the
> value being orred should be convered to __le32 by cpu_to_le32.
>
> Fixes 1deb96c0fa58a ("dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic()")
> --
> Note, the call to axi_chan_irq_clear() is passing lli->status_lo
> through which is also an __le32 but it does not seem to be set
> anywhere. Is this also a bug?
>
> [...]
Applied, thanks!
[1/1] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID
commit: 89aba9c39bdda8a973a6ffed7c9e93321edcfc16
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-02 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 8:49 [PATCH] dmaengine: dw-axi-dmac: fix __le32 on set of CH_CTL_H_LLI_VALID Ben Dooks
2026-06-17 14:12 ` Frank Li
2026-06-17 14:16 ` Ben Dooks
2026-07-02 16:03 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox