public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address
Date: Thu, 21 May 2009 07:03:39 +0200	[thread overview]
Message-ID: <4A14E0AB.7010906@googlemail.com> (raw)
In-Reply-To: <49EFFE43.4040304@gmail.com>

Ben Warren wrote:
> Daniel Mack wrote:
>> If the MAX address is given by the environment, write it back to the
>> hardware.
>>
>> Signed-off-by: Daniel Mack <daniel@caiaq.de>
>> Cc: Sascha Hauer <s.hauer@pengutronix.de>
>> ---
>>  drivers/net/smc911x.c |    9 +++++++--
>>  1 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
>> index 30f2dc2..8c9a2a8 100644
>> --- a/drivers/net/smc911x.c
>> +++ b/drivers/net/smc911x.c
>> @@ -41,8 +41,13 @@ static int smx911x_handle_mac_address(bd_t *bd)
>>  	unsigned long addrh, addrl;
>>  	uchar m[6];
>>  
>> -	/* if the environment has a valid mac address then use it */
>> -	if (!eth_getenv_enetaddr("ethaddr", m)) {
>> +	if (eth_getenv_enetaddr("ethaddr", m)) {
>> +		/* if the environment has a valid mac address then use it */
>> +		addrl = m[0] | (m[1] << 8) | (m[2] << 16) | (m[3] << 24);
>> +		addrh = m[4] | (m[5] << 8);
>> +		smc911x_set_mac_csr(ADDRL, addrl);
>> +		smc911x_set_mac_csr(ADDRH, addrh);
>> +	} else {
>>  		/* if not, try to get one from the eeprom */
>>  		addrh = smc911x_get_mac_csr(ADDRH);
>>  		addrl = smc911x_get_mac_csr(ADDRL);
> Applied to net/next branch.

Could we get this asap into mainline? Sounds like an urgent bugfix to me:

http://lists.denx.de/pipermail/u-boot/2009-May/053079.html

Many thanks

Dirk

  reply	other threads:[~2009-05-21  5:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 11:23 [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address Daniel Mack
2009-04-08 11:23 ` [U-Boot] [PATCH 2/3] smc911x: add support for LAN9220 Daniel Mack
2009-04-08 11:23   ` [U-Boot] [PATCH 3/3] smc911x: do net reset the chip if no EEPROM is connected Daniel Mack
2009-04-08 22:00     ` Mike Frysinger
2009-04-09  0:08       ` Daniel Mack
2009-04-09  3:57         ` Mike Frysinger
2009-04-21 11:13           ` Daniel Mack
2009-04-27  3:14             ` Mike Frysinger
2009-04-27 14:44               ` Daniel Mack
2009-04-27 15:56                 ` Mike Frysinger
2009-04-27 19:05                   ` Scott Wood
2009-04-23  5:36   ` [U-Boot] [PATCH 2/3] smc911x: add support for LAN9220 Ben Warren
2009-04-21 11:13 ` [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address Daniel Mack
2009-04-21 11:38 ` Sascha Hauer
2009-04-21 11:44   ` Daniel Mack
2009-04-21 13:28     ` Ben Warren
2009-04-21 13:30       ` Daniel Mack
2009-04-23  5:36 ` Ben Warren
2009-05-21  5:03   ` Dirk Behme [this message]
2009-06-05 10:02     ` Wolfgang Denk
2009-05-05 20:01 ` Mike Frysinger

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=4A14E0AB.7010906@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --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