drivers: net: cpsw: always flush cache of size aligned to PKTALIGN
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 [dffecec0, dffed016]
Fix it by flushing cache of size aligned to PKTALIGN.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 774b021..511a965 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -908,7 +908,7 @@
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-- &&