[U-Boot] MAC address being reset to 00:00:00:00:00:00 ?

Hello all,
I am wondering what I am doing wrong - the MAC address is correct in U-Boot but when Linux boots it resets to 00:00:00:00:00:00. My board is a powerpc32 - MPC8543_E based board, derived mostly from Freescale's CDS.
I have the following in the config header file: #define CONFIG_ETHADDR 00:E0:0C:00:00:FD
I set something else in the flat device tree: ethernet@24000 { #address-cells = <1>; #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; reg = <24000 1000>; local-mac-address = [ 51 5E BC EE 55 01 ]; interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; phy-handle = <&phy0>; phy-connection-type = "rgmii"; };
So I tried to read /proc/device-tree/soc8548@e0000000/ethernet@24000/local-mac-address - and got the [ 51 5E BC EE 55 01 ].
But ifconfig shows: -sh-2.05b# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:10.0.0.247 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:30317 errors:0 dropped:0 overruns:0 frame:0 TX packets:17324 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13474224 (12.8 MiB) TX bytes:2330405 (2.2 MiB)
Any help would be appreciated.
Thanks,
Amit Margalit | SW Team Leader Siverge Networks Ltd
5 Maskit st. Herzelia Pituah 46733 Israel Tel: +972-9-9526612 Fax: +972-9-9560993 Mobile: +972-52-6390012 Web: www.siverge.com E-mail: Amit.Margalit@siverge.com mailto:uAmit.Margalit@siverge.com
Leading Networking One Chip Forward
##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal it@siverge.com #####################################################################################

Hi,
Look at the linux git code the driver use this function to fill the mac address of your net, and so I think that somenthing fail here. Maybe is not valid? Try to verify if it fails.
const void *of_get_mac_address(struct device_node *np) { struct property *pp;
pp = of_find_property(np, "mac-address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value;
pp = of_find_property(np, "local-mac-address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value;
pp = of_find_property(np, "address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value;
return NULL; }
Michael

Hi!
Thanks. This solved the issue. I tracked this down and found that I was using an address that is a multi-cast address and it got rejected.
Now I wonder why the address isn't being set by U-boot? Any ideas?
Thanks,
Amit Margalit | SW Team Leader Siverge Networks Ltd
5 Maskit st. Herzelia Pituah 46733 Israel Tel: +972-9-9526612 Fax: +972-9-9560993 Mobile: +972-52-6390012 Web: www.siverge.com E-mail: Amit.Margalit@siverge.com
Leading Networking One Chip Forward
-----Original Message----- From: Michael Trimarchi [mailto:trimarchi@gandalf.sssup.it] Sent: ג 17 פברואר 2009 14:24 To: Amit Margalit Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
Hi,
Look at the linux git code the driver use this function to fill the mac address of your net, and so I think that somenthing fail here. Maybe is not valid? Try to verify if it fails.
const void *of_get_mac_address(struct device_node *np) { struct property *pp;
pp = of_find_property(np, "mac-address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value; pp = of_find_property(np, "local-mac-address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value; pp = of_find_property(np, "address", NULL); if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) return pp->value; return NULL;
}
Michael
##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal it@siverge.com #####################################################################################

Hi,
Amit Margalit wrote:
Hi!
Thanks. This solved the issue. I tracked this down and found that I was using an address that is a multi-cast address and it got rejected.
Now I wonder why the address isn't being set by U-boot? Any ideas?
What's exacly your problem. I don't understand. Do you use a dts to pass the ethernet mac?
Michael

-----Original Message----- From: Michael Trimarchi [mailto:trimarchi@gandalf.sssup.it] Sent: ג 17 פברואר 2009 18:40 To: Amit Margalit Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
Hi,
Amit Margalit wrote:
Hi!
Thanks. This solved the issue. I tracked this down and found that I was using an address that is
a multi-cast address and it got rejected.
Now I wonder why the address isn't being set by U-boot? Any ideas?
What's exacly your problem. I don't understand. Do you use a dts to pass the ethernet mac?
[AM] I use a dts, and I was under the impression that U-boot should overwrite the mac-address line before passing it to the kernel, so that the address used by U-boot is also used by the kernel. This is not happening, and I don’t know why.
Is there another way to pass a mac-address to the kernel?
Amit
Michael
##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal it@siverge.com #####################################################################################

2009/2/17 Amit Margalit amit.margalit@siverge.com:
-----Original Message----- From: Michael Trimarchi [mailto:trimarchi@gandalf.sssup.it] Sent: ג 17 פברואר 2009 18:40 To: Amit Margalit Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
What's exacly your problem. I don't understand. Do you use a dts to pass the ethernet mac?
[AM] I use a dts, and I was under the impression that U-boot should overwrite the mac-address line before passing it to the kernel, so that the address used by U-boot is also used by the kernel. This is not happening, and I don't know why.
Is there another way to pass a mac-address to the kernel?
It sounds like u-boot *is* setting the address, but it was considered invalid? Or are you saying that the address you put in the DTS is not being overwritten by u-boot?
What version of u-boot are you using? U-Boot is supposed to overwrite the dts in memory before passing it to the kernel.
Andy

-----Original Message----- From: Andy Fleming [mailto:afleming@gmail.com] Sent: ד 18 פברואר 2009 00:44 To: Amit Margalit Cc: Michael Trimarchi; u-boot@lists.denx.de Subject: Re: [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009/2/17 Amit Margalit amit.margalit@siverge.com:
-----Original Message----- From: Michael Trimarchi [mailto:trimarchi@gandalf.sssup.it] Sent: ג 17 פברואר 2009 18:40 To: Amit Margalit Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
What's exacly your problem. I don't understand. Do you use a dts to pass the ethernet mac?
[AM] I use a dts, and I was under the impression that U-boot should overwrite the mac-address
line before passing it to the kernel, so that the address used by U-boot is also used by the kernel. This is not happening, and I don't know why.
Is there another way to pass a mac-address to the kernel?
It sounds like u-boot *is* setting the address, but it was considered invalid? Or are you saying that the address you put in the DTS is not being overwritten by u-boot?
[AM] The address I put in the DTS was invalid. It wasn't being overwritten by U-boot.
What version of u-boot are you using? U-Boot is supposed to overwrite the dts in memory before passing it to the kernel.
[AM] I am using 1.3.0, actually.
Andy
##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal it@siverge.com #####################################################################################
participants (3)
-
Amit Margalit
-
Andy Fleming
-
Michael Trimarchi