Re: [PATCH 1/2] dt-bindings: net: ethernet-controller: Add mac offset option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 20, 2024 at 08:17:06PM +0100, Linus Walleij wrote:
> In practice (as found in the OpenWrt project) many devices
> with multiple ethernet interfaces just store a base MAC
> address in NVMEM and increase the lowermost byte with one for
> each interface, so as to occupy less NVMEM.
> 
> Support this with a per-interface offset so we can encode
> this in a predictable way for each interface sharing the
> same NVMEM cell.

This has come up several times before[1][2][3]. Based on those I know 
this is not sufficient with the different variations of how MAC 
addresses are shared. OTOH, I don't think a bunch of properties to deal 
with all the possible transforms works either. It will be one of those 
cases of properties added one-by-one where we end up with something 
poorly designed. I think probably we want to just enumerate different 
schemes and leave it to code to deal with each scheme.

Or we could just say it is the bootloader's problem to figure this out 
and populate the DT using the existing properties for MAC addresses. 
Though bootloaders want to use DT too...

Rob

[1] https://lore.kernel.org/linux-devicetree/20230509143504.30382-4-fr0st61te@xxxxxxxxx/
[2] https://lore.kernel.org/linux-devicetree/20211123134425.3875656-1-michael@xxxxxxxx/
[3] https://lore.kernel.org/linux-devicetree/20200919214941.8038-5-ansuelsmth@xxxxxxxxx/





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux