diff options
author | Stefan Roese <sr@denx.de> | 2016-08-25 12:56:50 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2016-09-27 17:29:46 +0200 |
commit | 35e3fca7e3ddaa2ae1fe9bd00b22be73e60a6042 (patch) | |
tree | 931f76815b991423052b2136f459859b426d9774 /drivers/net | |
parent | cbe7706ab8aab06c18edaa9b120371f9c8012728 (diff) | |
download | u-boot-imx-35e3fca7e3ddaa2ae1fe9bd00b22be73e60a6042.zip u-boot-imx-35e3fca7e3ddaa2ae1fe9bd00b22be73e60a6042.tar.gz u-boot-imx-35e3fca7e3ddaa2ae1fe9bd00b22be73e60a6042.tar.bz2 |
net: mvneta: Round up top tx buffer boundaries for dcache ops
check_cache_range() warns that the top boundaries are not properly
aligned when flushing or invalidating the buffers and make these
operations fail.
This gets rid of the warnings:
CACHE: Misaligned operation at range ...
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mvneta.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 6d51b9f..7ed9e29 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1506,7 +1506,8 @@ static int mvneta_send(struct udevice *dev, void *packet, int length) tx_desc->buf_phys_addr = (u32)packet; tx_desc->data_size = length; - flush_dcache_range((u32)packet, (u32)packet + length); + flush_dcache_range((u32)packet, + (u32)packet + ALIGN(length, PKTALIGN)); /* First and Last descriptor */ tx_desc->command = MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC; |