[PATCH 1/3] dma: at_hdmac: Fix ATC_DST_PER_MSB for at91 sama5d3

Henry Nestler nestler.henry at yahoo.de
Mon Aug 14 04:38:29 PDT 2023


Hello,

you can please ignore these patch, because Peter Rosin fixed it also:

Subject: [PATCH 1/2] dmaengine: at_hdmac: Repair bitfield macros for peripheral ID handling
Date: Tue, 23 May 2023 14:42:46 +0200
https://lore.kernel.org/linux-arm-kernel/68b70631-07b0-f4b2-463c-b8d3c7b9dac3@axentia.se/


-- Henry N.






Am Donnerstag, 10. August 2023 um 17:16:45 MESZ hat Henry Nestler <henrynmail-at91 at yahoo.com> Folgendes geschrieben: 





Only the upper nibble of handshake interface identifire (id) should put
into CFG bits 15 and 14 (ATC_DST_PER_MSB), because the lower four bits
are always in bits 3 to 0 (ATC_DST_PER). Same for ATC_SRC_PER_MSB.
Typically effect of this bug are loosing charcters on serial output with
DMA enabled, because flow controller would connect with wrong interface.

Signed-off-by: Henry Nestler <henrynmail-at91 at yahoo.com>
---

--- linux-6.1.38.orig/drivers/dma/at_hdmac.c
+++ linux-6.1.38/drivers/dma/at_hdmac.c
@@ -181,9 +181,9 @@
 #define ATC_DPIP_HOLE        GENMASK(15, 0)
 #define ATC_DPIP_BOUNDARY    GENMASK(25, 16)
 
-#define ATC_SRC_PER_ID(id)    (FIELD_PREP(ATC_SRC_PER_MSB, (id)) |    \
+#define ATC_SRC_PER_ID(id)    (FIELD_PREP(ATC_SRC_PER_MSB, ATC_PER_MSB(id)) |    \
                  FIELD_PREP(ATC_SRC_PER, (id)))
-#define ATC_DST_PER_ID(id)    (FIELD_PREP(ATC_DST_PER_MSB, (id)) |    \
+#define ATC_DST_PER_ID(id)    (FIELD_PREP(ATC_DST_PER_MSB, ATC_PER_MSB(id)) |    \
                  FIELD_PREP(ATC_DST_PER, (id)))
 
 





More information about the linux-arm-kernel mailing list