public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] net, kirkwood_egiga: init mac address before using network commands
Date: Tue, 30 Mar 2010 10:01:33 +0200	[thread overview]
Message-ID: <20100330080133.DEE05E73028@gemini.denx.de> (raw)
In-Reply-To: <4BB18E5F.6060705@denx.de>

Dear Heiko Schocher,

In message <4BB18E5F.6060705@denx.de> you wrote:
> initialize mac address with the value from "ethaddr", before
> doing some network commands. This is not in line with u-boot
> design principle "not to initalize not used devices", and
> maybe should go away, if there is a solution for passing
> the mac address to arm linux kernels.
> 
> Tested on the suen3 board.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
> posting this patch as a result of this discussion:
> 
> http://lists.denx.de/pipermail/u-boot/2010-March/069025.html

Hm... it seems I misunderstood you there :-(

You wrote (here:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/76173/focus=76338):

| > know about these, of course). So if kirkwood_egiga is clean (in this
| > respect), there is no need to change it.
| 
| It ends in the same problem, as the fec_mxc.c driver has ...

At this point I thought that you were referring to the problem that
the fec_mxc.c  would under certain conditions ignore the "ethaddr"
environment setting.




>  		}
> 
> -		while (!eth_getenv_enetaddr(s, dev->enetaddr)) {
> +		if (!eth_getenv_enetaddr(s, dev->enetaddr)) {

I think this change is actually not related to the other modifi-
cations in this patch. Axctually, it is not even needed. OK, you can
call it paranoid and a waste of time to re-check the setting of the
environment variable after running setenv(), but then it's not a real
bug either. In any case it is unrelated and should not be mixed into
this commit.

>  			dev->enetaddr[0] = 0x02;
>  			dev->enetaddr[1] = 0x50;
> @@ -688,6 +688,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
>  			dev->enetaddr[5] = get_random_hex();
>  			eth_setenv_enetaddr(s, dev->enetaddr);
>  		}
> +		port_uc_addr_set(dkwgbe->regs, dev->enetaddr);

This is another issue - this is not a bug fix.

I will leave it up to others (especially Ben) to comment on this part.

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
Sometimes a man will tell his bartender things he'll never tell his doctor.
	-- Dr. Phillip Boyce, "The Menagerie" ("The Cage"),
	   stardate unknown.

      parent reply	other threads:[~2010-03-30  8:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30  5:38 [U-Boot] net, kirkwood_egiga: init mac address before using network commands Heiko Schocher
2010-03-30  7:35 ` Mike Frysinger
2010-03-30  7:43 ` Simon Kagstrom
2010-03-30  7:52 ` Detlev Zundel
2010-03-30  8:01   ` Simon Kagstrom
2010-03-30  8:26     ` Wolfgang Denk
2010-03-30  9:01       ` Simon Kagstrom
2010-03-30  9:42         ` Detlev Zundel
2010-03-30  8:01 ` Wolfgang Denk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330080133.DEE05E73028@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox