From: Lokesh Vutla Date: Tue, 9 Aug 2016 11:17:44 +0530 Subject: [U-Boot] [PATCH v2] drivers: net: cpsw: always flush cache of size PKTSIZE_ALIGN Message-ID: <20160809054744.11702-1-lokeshvutla@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de cpsw tries to flush dcache which is not in the range of PKTSIZE. Because of this the following warning comes while flushing: CACHE: Misaligned operation at range [dffecec0, dffed016] Fix it by flushing cache of size PKTSIZE_ALIGN as similar to what is being done in _cpsw_recv. Signed-off-by: Lokesh Vutla --- Changes since v1: - Use PKTALIGN instead of cache line size - Need not align start of packet buffer from the network subsystem. drivers/net/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index 2ce4ec6..8ce5716 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -907,7 +907,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 + PKTSIZE_ALIGN); /* first reap completed packets */ while (timeout-- && -- 2.9.2