All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Mac address warning
@ 2013-08-01 23:28 Eric Nelson
  2013-08-02 13:08 ` Stefano Babic
  2013-08-04 20:17 ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Nelson @ 2013-08-01 23:28 UTC (permalink / raw)
  To: u-boot

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

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

* [U-Boot] Mac address warning
  2013-08-01 23:28 [U-Boot] Mac address warning Eric Nelson
@ 2013-08-02 13:08 ` Stefano Babic
  2013-08-02 14:16   ` Tom Rini
  2013-08-04 20:24   ` Wolfgang Denk
  2013-08-04 20:17 ` Wolfgang Denk
  1 sibling, 2 replies; 9+ messages in thread
From: Stefano Babic @ 2013-08-02 13:08 UTC (permalink / raw)
  To: u-boot

Hi Eric,

On 02/08/2013 01:28, Eric Nelson wrote:
> 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.

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


-- 
=====================================================================
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
=====================================================================

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

* [U-Boot] Mac address warning
  2013-08-02 13:08 ` Stefano Babic
@ 2013-08-02 14:16   ` Tom Rini
  2013-08-02 14:36     ` Stefano Babic
  2013-08-02 14:39     ` Eric Nelson
  2013-08-04 20:24   ` Wolfgang Denk
  1 sibling, 2 replies; 9+ messages in thread
From: Tom Rini @ 2013-08-02 14:16 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 02, 2013 at 03:08:36PM +0200, Stefano Babic wrote:
> Hi Eric,
> 
> On 02/08/2013 01:28, Eric Nelson wrote:
> > 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.
> 
> 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.

-- 
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>

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

* [U-Boot] Mac address warning
  2013-08-02 14:16   ` Tom Rini
@ 2013-08-02 14:36     ` Stefano Babic
  2013-08-02 14:45       ` Tom Rini
  2013-08-02 14:39     ` Eric Nelson
  1 sibling, 1 reply; 9+ messages in thread
From: Stefano Babic @ 2013-08-02 14:36 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 02/08/2013 16:16, Tom Rini 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".
> 
> 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

-- 
=====================================================================
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
=====================================================================

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

* [U-Boot] Mac address warning
  2013-08-02 14:16   ` Tom Rini
  2013-08-02 14:36     ` Stefano Babic
@ 2013-08-02 14:39     ` Eric Nelson
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Nelson @ 2013-08-02 14:39 UTC (permalink / raw)
  To: u-boot

Thanks Tom,

On 08/02/2013 07:16 AM, Tom Rini wrote:
> On Fri, Aug 02, 2013 at 03:08:36PM +0200, Stefano Babic wrote:
>> Hi Eric,
>>
>> On 02/08/2013 01:28, Eric Nelson wrote:
>>> 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.
>>
>> 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

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

* [U-Boot] Mac address warning
  2013-08-02 14:36     ` Stefano Babic
@ 2013-08-02 14:45       ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2013-08-02 14:45 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 02, 2013 at 04:36:23PM +0200, Stefano Babic wrote:
> Hi Tom,
> 
> On 02/08/2013 16:16, Tom Rini 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".
> > 
> > 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...

-- 
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>

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

* [U-Boot] Mac address warning
  2013-08-01 23:28 [U-Boot] Mac address warning Eric Nelson
  2013-08-02 13:08 ` Stefano Babic
@ 2013-08-04 20:17 ` Wolfgang Denk
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2013-08-04 20:17 UTC (permalink / raw)
  To: u-boot

Dear Eric Nelson,

In message <51FAEF05.1050700@boundarydevices.com> 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

-- 
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

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

* [U-Boot] Mac address warning
  2013-08-02 13:08 ` Stefano Babic
  2013-08-02 14:16   ` Tom Rini
@ 2013-08-04 20:24   ` Wolfgang Denk
  2013-08-04 20:37     ` Eric Nelson
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2013-08-04 20:24 UTC (permalink / raw)
  To: u-boot

Dear Stefano Babic,

In message <51FBAF54.1090502@denx.de> 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

-- 
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

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

* [U-Boot] Mac address warning
  2013-08-04 20:24   ` Wolfgang Denk
@ 2013-08-04 20:37     ` Eric Nelson
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Nelson @ 2013-08-04 20:37 UTC (permalink / raw)
  To: u-boot

On 08/04/2013 01:24 PM, Wolfgang Denk wrote:
> Dear Stefano Babic,
>
> In message <51FBAF54.1090502@denx.de> 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).
>
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

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

end of thread, other threads:[~2013-08-04 20:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01 23:28 [U-Boot] Mac address warning Eric Nelson
2013-08-02 13:08 ` Stefano Babic
2013-08-02 14:16   ` Tom Rini
2013-08-02 14:36     ` Stefano Babic
2013-08-02 14:45       ` Tom Rini
2013-08-02 14:39     ` Eric Nelson
2013-08-04 20:24   ` Wolfgang Denk
2013-08-04 20:37     ` Eric Nelson
2013-08-04 20:17 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.