All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/3] net: designware: fix descriptor layout and warnings on 64-bit archs
Date: Mon, 18 Apr 2016 13:55:55 +0200	[thread overview]
Message-ID: <5714CB4B.40902@suse.de> (raw)
In-Reply-To: <1460879338-7671-2-git-send-email-b.galvani@gmail.com>

Am 17.04.2016 um 09:48 schrieb Beniamino Galvani:
> All members of the DMA descriptor must be 32-bit, even on 64-bit
> architectures: change the type to u32 to ensure this. Also, fix
> other warnings.
> 
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
>  drivers/net/designware.c | 59 ++++++++++++++++++++++++++----------------------
>  drivers/net/designware.h |  4 ++--
>  2 files changed, 34 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index ca58f34..2eda461 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
[...]
> @@ -488,6 +486,11 @@ int designware_initialize(ulong base_addr, u32 interface)
>  		return -ENOMEM;
>  	}
>  
> +	if ((unsigned long long)priv + sizeof(*priv) > (1ULL << 32)) {

>=?

Regards,
Andreas

> +		printf("designware: buffers are outside DMA memory\n");
> +		return -EINVAL;
> +	}
> +
>  	memset(dev, 0, sizeof(struct eth_device));
>  	memset(priv, 0, sizeof(struct dw_eth_dev));
>  
[snip]

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)

  parent reply	other threads:[~2016-04-18 11:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17  7:48 [U-Boot] [PATCH v4 0/3] Amlogic Meson GXBaby and ODROID-C2 support Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 1/3] net: designware: fix descriptor layout and warnings on 64-bit archs Beniamino Galvani
2016-04-17  9:56   ` Marek Vasut
2016-04-17 11:14     ` Beniamino Galvani
2016-04-17 20:59       ` Marek Vasut
2016-04-18 10:57         ` Beniamino Galvani
2016-04-18 11:06           ` Alexander Graf
2016-04-18 21:38             ` Beniamino Galvani
2016-04-18 21:52               ` Alexander Graf
2016-04-25 21:43           ` Joe Hershberger
2016-04-18 11:55   ` Andreas Färber [this message]
2016-04-18 22:05     ` Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 2/3] arm: add initial support for Amlogic Meson and ODROID-C2 Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 3/3] arm: meson: implement calls to secure monitor Beniamino Galvani
2016-04-17  9:48   ` Alexander Graf
2016-04-18 21:50     ` Beniamino Galvani
2016-04-17 10:00   ` Marek Vasut
2016-04-18 21:52     ` Beniamino Galvani

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=5714CB4B.40902@suse.de \
    --to=afaerber@suse.de \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.