Hello Mike, Mike Frysinger wrote: > On Wednesday 24 March 2010 07:56:28 Heiko Schocher wrote: >> doc/README.enetaddr prescribes, to use a mac address stored in >> environment, before using a mac address stored in some special >> place. > > you're reading things incorrectly, or you didnt read the whole thing. the > fec_mxc driver is correct today. its initialize function seeds eth_device- >> enetaddr with the hardware storage. it is up to the common networking code > to sync the environment to eth_device before calling the driver init function > (which it does). then the driver always uses eth_device->enetaddr.
Ok, but this driver initialize in fec_probe() (which gets called through fecmxc_initialize() on uboot startup) always the fec mac address registers with eeprom mac address. So, if uboot not uses network interface, linux uses this mac address (and if no valid mac address is in eeprom, linux has no valid mac address). But, if uboot uses network, before booting linux, linux gets the network address stored in ethaddr, because this driver sets again in fec_init the mac address (at this point the content from ethaddr) -> 2 different mac addresses used on this plattform ... I think this could not be correct, and should be fixed ... So, if not changing something in the driver, how is this intended to solve? (I know, it would be great to have a standard to pass the mac address to linux on arm based plattforms, but as Detlev wrote, such attempts failed ...) I don;t want to make this through board specific code ... While writing this, and realizing that this behaviour is a feature, maybe this problem occur on other network drivers on arm plattforms too ... hah, found one: drivers/net/kirkwood_egiga.c did it in the same way as drivers/net/fec_mxc.c ... Ok, it is in line with uboot standard, but arm plattforms which booting linux without doing network trafic under uboot tend to have different mac addresses ... This should be solved! (Actual I don;t know, if arm linux prescribes something about how to setup the mac address before it ...) bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot