The cache should be invalidated when transfering ownership of a buffer to the device. Otherwise the writeback of dirty cache lines can corrupt the hardware written data. Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> Tested-by: Jan Weitzel <j.weitzel@xxxxxxxxx> --- Sascha, please apply this to master. It fixes a TFTP buffer corruption issue reported by Jan. --- drivers/net/cpsw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index 799fac89a2f3..301b8a9dfde5 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -888,6 +888,7 @@ static int cpsw_recv(struct eth_device *edev) while (cpdma_process(priv, &priv->rx_chan, &buffer, &len) >= 0) { dma_inv_range((ulong)buffer, (ulong)buffer + len); net_receive(edev, buffer, len); + dma_inv_range((ulong)buffer, (ulong)buffer + len); cpdma_submit(priv, &priv->rx_chan, buffer, PKTSIZE); } -- 2.1.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox