diff mbox

[U-Boot,3/3] net/designware: align cache invalidation on rx

Message ID 1397915542-987-3-git-send-email-ijc@hellion.org.uk
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Ian Campbell April 19, 2014, 1:52 p.m. UTC
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 drivers/net/designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shixin Zeng April 20, 2014, 5:43 a.m. UTC | #1
​
On Sat, Apr 19, 2014 at 9:52 AM, Ian Campbell <ijc@hellion.org.uk> wrote:

> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> ---
>  drivers/net/designware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 7d14cec..30446d3 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -354,7 +354,7 @@ static int dw_eth_recv(struct eth_device *dev)
>                 /* Invalidate received data */
>                 invalidate_dcache_range((unsigned long)desc_p->dmamac_addr,
>                                         (unsigned long)desc_p->dmamac_addr
> +
> -                                       length);
> +                                       roundup(length,
> ARCH_DMA_MINALIGN));
>
>                 NetReceive(desc_p->dmamac_addr, length);
>
> ​With these three patches, I don't see ​
v7_dcache_inval_range
​errors ​
anymore
​. Thanks!​
​

> --
> 1.9.0
>
> --
> You received this message because you are subscribed to the Google Groups
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
diff mbox

Patch

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 7d14cec..30446d3 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -354,7 +354,7 @@  static int dw_eth_recv(struct eth_device *dev)
 		/* Invalidate received data */
 		invalidate_dcache_range((unsigned long)desc_p->dmamac_addr,
 					(unsigned long)desc_p->dmamac_addr +
-					length);
+					roundup(length, ARCH_DMA_MINALIGN));
 
 		NetReceive(desc_p->dmamac_addr, length);