From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 8 Dec 2011 22:47:26 -0500 Subject: [U-Boot] [PATCH v2] ne2000: Convert to new net-multi model, fixes build of three boards In-Reply-To: <1319144219-15731-1-git-send-email-bernhard.kaindl@gmx.net> References: <201110171829.33368.vapier@gentoo.org> <1319144219-15731-1-git-send-email-bernhard.kaindl@gmx.net> Message-ID: <201112082247.27599.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: