[U-Boot] [PATCH] net: write enetaddr down to hardware on env_callback

Hannes Schmelzer Hannes.Schmelzer at br-automation.com
Tue Sep 6 06:33:40 CEST 2016


"U-Boot" <u-boot-bounces at lists.denx.de> schrieb am 06.09.2016 03:54:52:

> Von: Bin Meng <bmeng.cn at gmail.com>
> An: Joe Hershberger <joe.hershberger at gmail.com>, 
> Kopie: u-boot <u-boot at lists.denx.de>, Hannes Schmelzer 
<oe5hpm at oevsv.at>, Joe 
> Hershberger <joe.hershberger at ni.com>
> Datum: 06.09.2016 03:57
> Betreff: Re: [U-Boot] [PATCH] net: write enetaddr down to hardware on 
env_callback
> Gesendet von: "U-Boot" <u-boot-bounces at lists.denx.de>
> 
> Hi,
Hi Bin,

> 
> On Fri, Sep 2, 2016 at 9:00 PM, Joe Hershberger
> <joe.hershberger at gmail.com> wrote:
> > On Fri, Sep 2, 2016 at 7:48 AM, Hannes Schmelzer <oe5hpm at oevsv.at> 
wrote:
> >> If mac-address is changed using "setenv ethaddr ...." command the new
> >> mac-adress also must be written into the responsible ethernet driver.
> >>
> >> Signed-off-by: Hannes Schmelzer <oe5hpm at oevsv.at>
> >
> > Acked-by: Joe Hershberger <joe.hershberger at ni.com>
> 
> Why is this needed? The MAC address is supposed to be programmed in
> the driver's probe routine.

For example on my custom ZYNQ board.
The Ethernetcontroller within the ZYNQ has no ROM to store his own 
MAC-Address, further no MAC is stored within environment.
So Ethernet gets probed with a "random MAC-Address" if configured.

Later somebody (like me) oder something (my bootscript) runs "setenv 
ethaddr ...." on the console.
Result is (was before this patch), that all networking infrastructre is 
running this new mac, but hardware is running the old (random) one and 
networking is simple not functional.

ok?

> 
> Regards,
> Bin
cheers,
Hannes




More information about the U-Boot mailing list