public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Setting up MAC address for eth drivers
@ 2015-03-13 12:25 Michal Simek
  2015-03-17 10:16 ` Michal Simek
  2015-03-17 15:56 ` Joe Hershberger
  0 siblings, 2 replies; 15+ messages in thread
From: Michal Simek @ 2015-03-13 12:25 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-06-15 10:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 12:25 [U-Boot] Setting up MAC address for eth drivers Michal Simek
2015-03-17 10:16 ` Michal Simek
2015-03-17 15:56 ` Joe Hershberger
2015-03-17 16:57   ` Michal Simek
2015-03-17 17:21     ` Joe Hershberger
2015-03-17 17:47       ` Michal Simek
2015-03-23 20:22         ` Simon Glass
2015-03-24  6:49           ` [U-Boot] [PATCH v1] net: Update hardware MAC address if it changes in env Joe Hershberger
2015-03-24  6:54             ` Joe Hershberger
2015-03-24  7:41             ` [U-Boot] [PATCH v2] " Joe Hershberger
2015-03-30 18:08               ` Joe Hershberger
2015-03-31 11:41                 ` Michal Simek
2015-04-21 23:21                   ` Joe Hershberger
2015-06-15  9:07             ` [U-Boot] [PATCH v1] " Bin Meng
2015-06-15 10:42               ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox