[U-Boot] [PATCH v3] 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 --- 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..300a534 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 + ALIGN(length, PKTALIGN));
/* first reap completed packets */ while (timeout-- &&

On Thu, Aug 11, 2016 at 01:00:59PM +0530, Lokesh Vutla wrote:
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
Reviewed-by: Tom Rini trini@konsulko.com

On Thursday 11 August 2016 01:00 PM, Lokesh Vutla wrote:
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
Reviewed-by: Mugunthan V N mugunthanvnm@ti.com
Regards Mugunthan V N

On Thu, Aug 11, 2016 at 01:00:59PM +0530, Lokesh Vutla wrote:
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
Applied to u-boot/master, thanks!
participants (3)
-
Lokesh Vutla
-
Mugunthan V N
-
Tom Rini