From: Dirk Behme <dirk.behme@de.bosch.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back
Date: Wed, 11 Jan 2012 13:23:53 +0100 [thread overview]
Message-ID: <4F0D7F59.9030009@de.bosch.com> (raw)
In-Reply-To: <CAPnjgZ0ku_+X-fqDCjT1VNsQ4YEaEwbAepUPJ-BMdbeDfH8n_g@mail.gmail.com>
On 17.08.2011 08:22, Simon Glass wrote:
> On Tue, Aug 16, 2011 at 10:33 PM, Eric Miao <eric.miao@linaro.org> wrote:
>> Ignore the return value of eth_getenv_enetaddr_by_index(), and if it
>> fails, fall back to use dev->enetaddr, which could be filled up by
>> the ethernet device driver.
>>
>> Actually, this is the original behavior, and was later changed by
>> commit 48506a2cde2458fa1f8c5993afc98e5a4617e1d3.
>>
>> Signed-off-by: Eric Miao <eric.miao@linaro.org>
>
> Hi Eric,
>
> I found this in u-boot-usb although the commit hash I saw was 7616e7850.
>
>> ---
>> net/eth.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/eth.c b/net/eth.c
>> index a34fe59..c4fbe11 100644
>> --- a/net/eth.c
>> +++ b/net/eth.c
>> @@ -195,8 +195,7 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
>> unsigned char env_enetaddr[6];
>> int ret = 0;
>>
>> - if (!eth_getenv_enetaddr_by_index(base_name, eth_number, env_enetaddr))
>> - return -1;
>> + eth_getenv_enetaddr_by_index(base_name, eth_number, env_enetaddr);
>>
>> if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) {
>> if (memcmp(dev->enetaddr, "\0\0\0\0\0\0", 6) &&
>
> Acked-by: Simon Glass <sjg@chromium.org>
Ping.
Anybody likes to apply this? Or any new comments?
Many thanks and best regards
Dirk
P.S.: I add Wolfgang as he seems to have done the last commits to net/eth.c.
next prev parent reply other threads:[~2012-01-11 12:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 5:33 [U-Boot] [PATCH] net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back Eric Miao
2011-08-17 6:22 ` Simon Glass
2012-01-11 12:23 ` Dirk Behme [this message]
2012-01-12 5:12 ` Simon Glass
2012-01-12 7:48 ` Stefan Roese
2012-01-12 7:55 ` Stefan Roese
2012-01-13 19:19 ` Wolfgang Denk
2012-01-16 7:03 ` Eric Miao
2012-01-16 7:08 ` Eric Miao
2012-01-16 14:08 ` Philip Balister
2012-01-16 16:00 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2012-01-16 21:55 Zach Sadecki
2012-01-17 9:52 ` Wolfgang Denk
2012-01-17 16:17 ` Dirk Behme
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=4F0D7F59.9030009@de.bosch.com \
--to=dirk.behme@de.bosch.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