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: <20190417180527.6s2sidbfv5ffjlxo@flea>
Date:   Wed, 17 Apr 2019 20:05:27 +0200
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Petr Štetiar <ynezz@...e.cz>
Cc:     netdev@...r.kernel.org, devicetree@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Frank Rowand <frowand.list@...il.com>,
        John Crispin <john@...ozen.org>, Felix Fietkau <nbd@....name>
Subject: Re: [PATCH] of_net: add mtd-mac-address support to
 of_get_mac_address()

On Wed, Apr 17, 2019 at 06:06:00PM +0200, Petr Štetiar wrote:
> Maxime Ripard <maxime.ripard@...tlin.com> [2019-04-17 10:06:14]:
>
> > NVMEM is supported by of_net already
>
> Well, not anymore:
>
>  commit afa64a72b862a7a9d04f8d07fba632eaf06b23f8
>  Author: Bartosz Golaszewski <bgolaszewski@...libre.com>
>  Date:   Fri Nov 30 09:20:59 2018 +0100
>
>     of: net: kill of_get_nvmem_mac_address()
>
> Now, I'm really confused.
>
> Documentation/devicetree/bindings/net/ethernet.txt states following:
>
>  - nvmem-cells: phandle, reference to an nvmem node for the MAC address;
>  - nvmem-cell-names: string, should be "mac-address" if nvmem is to be used;
>
> which is actually misleading and confusing. There are only two ethernet
> drivers in the tree cadence and davinci which support this properties. Well
> there's nixge, but this one is special, because it has renamed `mac-address`
> to `address` with it's own implementation in `nixge_get_nvmem_address`.
>
> All other ethernet drivers (and few others) simply use `of_get_mac_address`
> which doesn't support NVMEM and the documented nvmem-cells* properties.
>
> > so it doesn't look really necessary to create additional properties that
> > cover the same use case.
>
> NVMEM could be reused for this purpose and it seems like a way to go, probably
> if we could wire `nvmem_get_mac_address` into `of_get_mac_address` and find a
> way how to handle the remaining use cases currently not handled in NVMEM:
>
>  * MAC address (octet/byte) incrementation (already handled by the proposed patch)
>  * MAC address stored as ascii/text (0090FEC9CBE4 and 00:90:FE:C9:CB:E4
>    formats) which is currently missing but would be nice to have
>
> I can prepare patches for that, just don't want to waste more time then really
> necessary, so it would really help me if someone could tell me how this should
> be implemented in NVMEM and I'll simply do it in this acceptable way and call
> it a day.

Just send whatever you have in mind with the nvmem developpers as
recepients. They are not in this thread, so I'm not sure we can point
you in the direction they want

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ