[U-Boot] Setting up MAC address for eth drivers

Michal Simek monstr at monstr.eu
Tue Mar 17 11:16:42 CET 2015


Hi,

any update on this one?

Thanks,
Michal

On 03/13/2015 01:25 PM, Michal Simek wrote:
> Hi,
> 
> I have a question regarding setting mac address for drivers.
> Drivers setting up write_hwaddr via eth_write_hwaddr via eth_initialize
> which is called from common/board_r.c.
> 
> But then there are some drivers(macb, designware, altera_tse) which also calls
> mac setup from dev->init which has side effect for example when you setup CONFIG_ENV_OVERWRITE
> and change mac address you can directly use it.
> 
> It also means if there is intention to call hwaddr from dev->init
> that for the first packet mac address is setup twice - in eth core init
> and then before every driver use.
> 
> I am asking this question because I would like to know the right flow
> for eth mac setup.
> If it is
> set ethaddr xx....
> saveenv
> reset
> eth with new mac
> 
> or if
> set ethaddr
> eth with new mac
> should work
> 
> The second approach looks reasonable when ethaddr is not set at all
> but then at least our driver needs to be fixed to support this feature.
> 
> Thanks,
> Michal
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150317/68647c18/attachment.sig>


More information about the U-Boot mailing list