[PATCH] net: cpsw: invalidate complete buffer
Lucas Stach
l.stach at pengutronix.de
Fri Feb 27 03:47:24 PST 2015
Am Freitag, den 27.02.2015, 10:56 +0100 schrieb Jan Weitzel:
> Without invalidating the complete buffer before giving it to
> dma_inv_range, we got strange packets.
>
This is most likely not the correct fix. If this helps then our
dma_inv_range functions aren't working properly, which would be really
bad. How do those "strange packets" look like?
> 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);
> }
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the barebox
mailing list