mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Jan Weitzel <j.weitzel@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] net: cpsw: invalidate complete buffer
Date: Fri, 27 Feb 2015 12:47:24 +0100	[thread overview]
Message-ID: <1425037644.2673.2.camel@pengutronix.de> (raw)
In-Reply-To: <1425030964-45167-1-git-send-email-j.weitzel@phytec.de>

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@phytec.de>
> Tested-by: Teresa Gámez <t.gamez@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/  |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-02-27 11:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27  9:56 Jan Weitzel
2015-02-27 11:47 ` Lucas Stach [this message]
2015-02-27 13:14   ` Jan Weitzel
2015-02-27 13:39     ` Lucas Stach
2015-02-27 13:45       ` Lucas Stach
2015-03-02  7:35         ` Jan Weitzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425037644.2673.2.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=j.weitzel@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox