* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
@ 2009-02-17 11:50 Amit Margalit
2009-02-17 12:24 ` Michael Trimarchi
0 siblings, 1 reply; 7+ messages in thread
From: Amit Margalit @ 2009-02-17 11:50 UTC (permalink / raw)
To: u-boot
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 at 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 at e0000000/ethernet at 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 at 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 at siverge.com
#####################################################################################
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 11:50 [U-Boot] MAC address being reset to 00:00:00:00:00:00 ? Amit Margalit
@ 2009-02-17 12:24 ` Michael Trimarchi
2009-02-17 14:37 ` Amit Margalit
0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2009-02-17 12:24 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 12:24 ` Michael Trimarchi
@ 2009-02-17 14:37 ` Amit Margalit
2009-02-17 16:40 ` Michael Trimarchi
0 siblings, 1 reply; 7+ messages in thread
From: Amit Margalit @ 2009-02-17 14:37 UTC (permalink / raw)
To: u-boot
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 at siverge.com
Leading Networking One Chip Forward
> -----Original Message-----
> From: Michael Trimarchi [mailto:trimarchi at gandalf.sssup.it]
> Sent: ? 17 ?????? 2009 14:24
> To: Amit Margalit
> Cc: u-boot at 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 at siverge.com
#####################################################################################
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 14:37 ` Amit Margalit
@ 2009-02-17 16:40 ` Michael Trimarchi
2009-02-17 22:37 ` Amit Margalit
0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2009-02-17 16:40 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 16:40 ` Michael Trimarchi
@ 2009-02-17 22:37 ` Amit Margalit
2009-02-17 22:43 ` Andy Fleming
0 siblings, 1 reply; 7+ messages in thread
From: Amit Margalit @ 2009-02-17 22:37 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Michael Trimarchi [mailto:trimarchi at gandalf.sssup.it]
> Sent: ? 17 ?????? 2009 18:40
> To: Amit Margalit
> Cc: u-boot at 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 at siverge.com
#####################################################################################
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 22:37 ` Amit Margalit
@ 2009-02-17 22:43 ` Andy Fleming
2009-02-18 4:24 ` Amit Margalit
0 siblings, 1 reply; 7+ messages in thread
From: Andy Fleming @ 2009-02-17 22:43 UTC (permalink / raw)
To: u-boot
2009/2/17 Amit Margalit <amit.margalit@siverge.com>:
>> -----Original Message-----
>> From: Michael Trimarchi [mailto:trimarchi at gandalf.sssup.it]
>> Sent: ? 17 ?????? 2009 18:40
>> To: Amit Margalit
>> Cc: u-boot at 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] MAC address being reset to 00:00:00:00:00:00 ?
2009-02-17 22:43 ` Andy Fleming
@ 2009-02-18 4:24 ` Amit Margalit
0 siblings, 0 replies; 7+ messages in thread
From: Amit Margalit @ 2009-02-18 4:24 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Andy Fleming [mailto:afleming at gmail.com]
> Sent: ? 18 ?????? 2009 00:44
> To: Amit Margalit
> Cc: Michael Trimarchi; u-boot at 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 at gandalf.sssup.it]
> >> Sent: ? 17 ?????? 2009 18:40
> >> To: Amit Margalit
> >> Cc: u-boot at 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 at siverge.com
#####################################################################################
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-18 4:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 11:50 [U-Boot] MAC address being reset to 00:00:00:00:00:00 ? Amit Margalit
2009-02-17 12:24 ` Michael Trimarchi
2009-02-17 14:37 ` Amit Margalit
2009-02-17 16:40 ` Michael Trimarchi
2009-02-17 22:37 ` Amit Margalit
2009-02-17 22:43 ` Andy Fleming
2009-02-18 4:24 ` Amit Margalit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox