[U-Boot] [PATCH v2] zynq-gem: Flush cache before handing RX packet to receive handler

Bin Meng bmeng.cn at gmail.com
Thu Dec 13 14:22:19 UTC 2018


Hi Stefan,

On Thu, Dec 13, 2018 at 10:00 PM Stefan Theil
<stefan.theil at mixed-mode.de> wrote:
>

Please include the commit message. Also the commit tile should read
'invalidate' instead of 'flush'

> Signed-off-by: Stefan Theil <stefan.theil at mixed-mode.de>
>
> ---
> Changes for v2:
>         - Use invalidate_dcache_range instead of
>           flush_dcache_range
> ---
>  drivers/net/zynq_gem.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index 9bd79b198a..32a0ff392f 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -621,6 +621,9 @@ static int zynq_gem_recv(struct udevice *dev, int flags, uchar **packetp)
>
>         *packetp = (uchar *)(uintptr_t)addr;
>
> +       invalidate_dcache_range(addr, addr + roundup(PKTSIZE_ALIGN, ARCH_DMA_MINALIGN));
> +       barrier();
> +
>         return frame_len;
>  }

Regards,
Bin


More information about the U-Boot mailing list