Skip to contentSkip to conversation

Mac address warning

U-Boot Eric Nelson 4 participants 9 messages Aug 1, 2013 – Aug 4, 2013

lore
Share & tools
lore
#0 lore raw

Hi all,

While testing Troy's usbnet patches, I was reminded of this mysterious warning issued when the environment has no mac address stored, but the device provides one:

	printf("\nWarning: %s using MAC address from net device\n",
			dev->name);

Why is this a warning? It's the out-of-the box default for new boards who haven't saved a mac address to the persistent environment.

Please advise,

Eric

#1 lore raw

Hi Eric,

Quoted 6 lines · Eric Nelson

Hi all,

While testing Troy's usbnet patches, I was reminded of this mysterious warning issued when the environment has no mac address stored, but the device provides one:

Quoted 6 lines

printf("\nWarning: %s using MAC address from net device\n",
dev->name);

Why is this a warning? It's the out-of-the box default for new boards who haven't saved a mac address to the persistent environment.

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw
Quoted 12 lines · Stefano Babic

Hi Eric,

Quoted 9 lines · Eric Nelson

Hi all,

While testing Troy's usbnet patches, I was reminded of this mysterious warning issued when the environment has no mac address stored, but the device provides one:

printf("\nWarning: %s using MAC address from net device\n",
dev->name);

Quoted 7 lines
Quoted 3 lines

Why is this a warning? It's the out-of-the box default for new boards who haven't saved a mac address to the persistent environment.

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

On am335x the message we use is:
<ethaddr> not set. Validating first E-fuse MAC
And then validate it, and setenv.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130802/40115039/attachment.pgp>
#3 lore raw

Hi Tom,

Quoted 8 lines · Tom Rini
Quoted 4 lines

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

On am335x the message we use is: <ethaddr> not set. Validating first E-fuse MAC And then validate it, and setenv.

..but the code is common as it is located in net/eth.c. The warning does not depend on the SOC.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#5 lore raw
In reply to Tom Rini

Thanks Tom,

Quoted 17 lines · Tom Rini
Quoted 16 lines · Stefano Babic

Hi Eric,

Quoted 12 lines · Eric Nelson

Hi all,

While testing Troy's usbnet patches, I was reminded of this mysterious warning issued when the environment has no mac address stored, but the device provides one:

printf("\nWarning: %s using MAC address from net device\n",
dev->name);

Why is this a warning? It's the out-of-the box default for new boards who haven't saved a mac address to the persistent environment.

Quoted 8 lines
Quoted 3 lines

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

On am335x the message we use is:
<ethaddr> not set. Validating first E-fuse MAC
And then validate it, and setenv.

I think this points out the issue. The fec_mxc driver isn't setting a default ethaddr environment variable.

Stefano, we've had lots of questions from customers because ethaddr is empty in the normal case (no environment saved).

I'll figure out where this goes and submit a patch.

Regards,

Eric

#4 lore raw
In reply to Stefano Babic
Quoted 8 lines · Stefano Babic

Hi Tom,

Quoted 5 lines · Tom Rini
Quoted 4 lines

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

Quoted 5 lines
Quoted 3 lines

On am335x the message we use is: <ethaddr> not set. Validating first E-fuse MAC And then validate it, and setenv.

..but the code is common as it is located in net/eth.c. The warning does not depend on the SOC.

Does it even belong there? It looks like some generally unused and dangling functionality, the "write" portion that is. A number of drivers do set write_hwaddr, but only usb_ether calls it, and not in an update the HW fashion...

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130802/14c3b9f3/attachment.pgp>
#8 lore raw
In reply to Eric Nelson

Dear Eric Nelson,

Quoted 11 lines · In message <[email protected]> you wrote:

While testing Troy's usbnet patches, I was reminded of this mysterious warning issued when the environment has no mac address stored, but the device provides one:

	printf("\nWarning: %s using MAC address from net device\n",
			dev->name);

Why is this a warning? It's the out-of-the box default for new boards who haven't saved a mac address to the persistent environment.

It is a warnign because in U-Boot the "ethaddr" environment variable is considered the primary source of information here. If it is missing, U-Boot may try to use other sources for this information, but it will warn you that it is not doing the normal thing.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Everything should be made as simple as possible, but not simpler."
                                                    - Albert Einstein
#6 lore raw
In reply to Stefano Babic

Dear Stefano Babic,

Quoted 4 lines · In message <[email protected]> you wrote:

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

No, warning is perfectly right here. We deviate from the normal initialization sequence, and the user should note that (and eventually take measures to resolve the problem).

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Experience is that marvelous thing that enable  you  to  recognize  a
mistake when you make it again.                   - Franklin P. Jones
#7 lore raw
Quoted 4 lines · Wolfgang Denk

Dear Stefano Babic,

Quoted 1 line · In message <[email protected]> you wrote:
Quoted 8 lines
Quoted 3 lines

Well, I have found it very useful in case I set explicitely the ethaddr variable, so I know where the MAC address comes from. Do you find it disturbing ? Maybe we could replace "warning" with "info".

No, warning is perfectly right here. We deviate from the normal initialization sequence, and the user should note that (and eventually take measures to resolve the problem).

Thanks Wolfgang,

Stefano and Tom straightened me out and I forwarded a patch to address the issue that mxc_fec.c wasn't properly setting a default ethaddr when an address is programmed in fuses.

Regards,

Eric