[PATCH] net: cpsw: invalidate complete buffer
Jan Weitzel
j.weitzel at phytec.de
Fri Feb 27 01:56:04 PST 2015
Without invalidating the complete buffer before giving it to
dma_inv_range, we got strange packets.
Signed-off-by: Jan Weitzel <j.weitzel at phytec.de>
Tested-by: Teresa Gámez <t.gamez at phytec.de>
---
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 799fac8..33afdc3 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -886,7 +886,7 @@ static int cpsw_recv(struct eth_device *edev)
int len;
while (cpdma_process(priv, &priv->rx_chan, &buffer, &len) >= 0) {
- dma_inv_range((ulong)buffer, (ulong)buffer + len);
+ dma_inv_range((ulong)buffer, (ulong)buffer + PKTSIZE);
net_receive(edev, buffer, len);
cpdma_submit(priv, &priv->rx_chan, buffer, PKTSIZE);
}
--
1.9.1
More information about the barebox
mailing list