]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: net: cpsw: always flush cache of size aligned to PKTALIGN
authorLokesh Vutla <lokeshvutla@ti.com>
Thu, 11 Aug 2016 07:30:59 +0000 (13:00 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 Aug 2016 13:23:47 +0000 (09:23 -0400)
cpsw tries to flush dcache which is not in the range of PKTALIGN.
Because of this the following warning comes while flushing:

CACHE: Misaligned operation at range [dffecec0dffed016]

Fix it by flushing cache of size aligned to PKTALIGN.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
drivers/net/cpsw.c

index 774b021e356e430251a26d1a068b45608869a7d1..511a965c9b0c0e50265a505cccb6fbb15c690441 100644 (file)
@@ -908,7 +908,7 @@ static int _cpsw_send(struct cpsw_priv *priv, void *packet, int length)
        int timeout = CPDMA_TIMEOUT;
 
        flush_dcache_range((unsigned long)packet,
-                          (unsigned long)packet + length);
+                          (unsigned long)packet + ALIGN(length, PKTALIGN));
 
        /* first reap completed packets */
        while (timeout-- &&