public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] ne2000: Convert to new net-multi model, fixes build of three boards
Date: Thu, 8 Dec 2011 22:47:26 -0500	[thread overview]
Message-ID: <201112082247.27599.vapier@gentoo.org> (raw)
In-Reply-To: <1319144219-15731-1-git-send-email-bernhard.kaindl@gmx.net>

On Thursday 20 October 2011 16:56:59 Bernhard Kaindl wrote:
> --- a/drivers/net/ne2000_base.c
> +++ b/drivers/net/ne2000_base.c
> 
> +	/*
> +	 * According to doc/README.enetaddr, drivers shall give priority
> +	 * to the MAC address value in the environment, so we do not read
> +	 * it from the prom or eeprom if it is specified in the environment.
> +	 */
> +	if (!eth_getenv_enetaddr("ethaddr", dev->enetaddr)) {
> +		/* If the MAC address is not in the environment, get it: */
> +		if (!get_prom(dev->enetaddr, nic.base)) /* get MAC from prom */
> +			dp83902a_init(dev->enetaddr);   /* fallback: seeprom */
> +		/* And write it into the environment otherwise eth_write_hwaddr
> +		 * returns -1 due to eth_getenv_enetaddr_by_index() failing,
> +		 * and this causes "Warning: failed to set MAC address", and
> +		 * cmd_bdinfo has no ethaddr value which it can show: */
> +		eth_setenv_enetaddr("ethaddr", dev->enetaddr);
> +	}

this env parsing doesn't belong here.  the net drivers only read dev-
>enetaddr.  can you post a patch to drop this ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111208/4cf587d4/attachment.pgp>

      parent reply	other threads:[~2011-12-09  3:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 18:12 [U-Boot] [PATCH] ne2000: Fix broken build of three boards after CONFIG_NET_MULTI drop Bernhard Kaindl
2011-10-16 19:39 ` Mike Frysinger
2011-10-17 22:05   ` Bernhard Kaindl
2011-10-17 22:26     ` Mike Frysinger
2011-10-17 22:29       ` Mike Frysinger
2011-10-20 20:56         ` [U-Boot] [PATCH v2] ne2000: Convert to new net-multi model, fixes build of three boards Bernhard Kaindl
2011-12-07 21:45           ` Marek Vasut
2011-12-08 21:27           ` Wolfgang Denk
2011-12-09  3:47           ` Mike Frysinger [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=201112082247.27599.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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