[U-Boot] [PATCH 2/2] mvgbe: fix network device indices

Albert ARIBAUD
2011-11-05T14:34:32Z

Hi Wolfgang,

Le 05/11/2011 14:21, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4EB507B7.9090907@aribaud.net> you wrote:
>>
>> But what about MAC randomization as a function provided by the SoC level
>> to board MAC init code that wants to use it? For instance, a weak MAC
>> setup function provided by the SoC level, and the board level would use
>> it or provide its own.
>
> What would be the result? A bord that comes up with a new MAC address
> each time you reset it?

No -- the goal of the randomization code was, is, and will be to allow
the board to use the network when no correct MAC address can be found
anywhere (env vars, EEPROM, e-fuses, whatever). When a correct address
is available, that address will be used. Typically, this happens when
the board has not been provisioned yet, at a point where the MAC address
it uses is not relevant yet.

Notes:

1. This code would only be available to kirkwood-based boards anyway.

2. Although the code incorrectly describes it as "private", the random
address is actually a locally administered address (bit 1 of first octet
is set), which eliminates the risk of clashing against any 'normal'
(universally administered) address; and its last three octets are
randomized in order to limit the risk of clashing against other locally
administered addresses if we're unlucky enough to have any on the
network segment.

> Best regards,
>
> Wolfgang Denk

Amicalement,
--
Albert.