]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/net/mvneta.c
net: mvneta: Round up top tx buffer boundaries for dcache ops
[karo-tx-uboot.git] / drivers / net / mvneta.c
index fa20f548e5202032947dac1c49ec33a9ddf2c64b..7ed9e29fd77f690c0c515f317fdfc7bd0194037d 100644 (file)
@@ -20,7 +20,7 @@
 #include <config.h>
 #include <malloc.h>
 #include <asm/io.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <phy.h>
 #include <miiphy.h>
 #include <watchdog.h>
@@ -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;