lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190524200012.GP21208@lunn.ch>
Date:   Fri, 24 May 2019 22:00:12 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Krzysztof Halasa <khalasa@...p.pl>
Subject: Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as
 resource

On Fri, May 24, 2019 at 06:20:19PM +0200, Linus Walleij wrote:
> In order to probe this ethernet interface from the device tree
> all physical MMIO regions must be passed as resources. Begin
> this rewrite by first passing the port base address as a
> resource for all platforms using this driver, remap it in
> the driver and avoid using any reference of the statically
> mapped virtual address in the driver.
> 
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  arch/arm/mach-ixp4xx/fsg-setup.c         | 20 ++++++++++++++++++++
>  arch/arm/mach-ixp4xx/goramo_mlr.c        | 20 ++++++++++++++++++++
>  arch/arm/mach-ixp4xx/ixdp425-setup.c     | 20 ++++++++++++++++++++
>  arch/arm/mach-ixp4xx/nas100d-setup.c     | 10 ++++++++++
>  arch/arm/mach-ixp4xx/nslu2-setup.c       | 10 ++++++++++
>  arch/arm/mach-ixp4xx/omixp-setup.c       | 20 ++++++++++++++++++++
>  arch/arm/mach-ixp4xx/vulcan-setup.c      | 20 ++++++++++++++++++++
>  drivers/net/ethernet/xscale/ixp4xx_eth.c | 20 +++++++++++---------
>  8 files changed, 131 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
> index 648932d8d7a8..507ee3878769 100644
> --- a/arch/arm/mach-ixp4xx/fsg-setup.c
> +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
> @@ -132,6 +132,22 @@ static struct platform_device fsg_leds = {
>  };
>  
>  /* Built-in 10/100 Ethernet MAC interfaces */
> +static struct resource fsg_eth_npeb_resources[] = {
> +	{
> +		.start		= IXP4XX_EthB_BASE_PHYS,
> +		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,

Hi Linus

It is a long time since i did resources. But i was always told to use
the SZ_ macros, so SZ_4K. I also think 0xfff is wrong, it should be
0x1000.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ