From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mvgbe: fix network device indices
Date: Tue, 25 Oct 2011 23:10:30 +0200 [thread overview]
Message-ID: <201110252310.30372.michael@walle.cc> (raw)
In-Reply-To: <F766E4F80769BD478052FB6533FA745D1A14C4DAAA@SC-VEXCH4.marvell.com>
Am Freitag 21 Oktober 2011, 10:09:15 schrieben Sie:
> > -----Original Message-----
> > From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
> > On Behalf Of Michael Walle
> > Sent: Friday, October 07, 2011 3:53 AM
> > To: u-boot at lists.denx.de
> > Subject: [U-Boot] [PATCH] mvgbe: fix network device indices
> >
> > Don't assume that the MAC address of egiga0 rsp. egiga1 is ethaddr rsp.
> > eth1addr. If there is only a egiga1 device, u-boot will enumerate it as
> > device 0 and therefore the MAC address is set with the environment
> > varibale
> > ethaddr.
>
> Hi
>
> If I understood it correctly,
> In current implementation, if only egiga1 device is enabled on the board,
> then it will assign MAC address associated with environment variable
> "ethaddr".
yes but the current mvgbe driver will check eth1addr and set it to a random
value if not set.
> This patch will make environment variable "egiga1" available in such case.
> Right?
mh? This patch will use the same enumeration as the net/eth.c code in
eth_initialize(). At least if there is no other ethernet driver than mvgbe.
So ethaddr is set to a random value instead of eth1addr, which
eth_initialize() then use the set the mac address.
> If so, then this is not the case with only mvgbe, it is applicable for all
> network drivers.
yeah other drivers also set eth(N)addr sometimes, which suffers from the same
problem. maybe a driver could provide some callback to initialize a macaddress
or eth_register returns the device index which in turn could be used to get
the proper ethNaddr environment variable.
--
Michael
next prev parent reply other threads:[~2011-10-25 21:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 22:23 [U-Boot] [PATCH] mvgbe: fix network device indices Michael Walle
2011-10-07 8:26 ` Prafulla Wadaskar
2011-10-07 10:48 ` Michael Walle
2011-10-16 18:28 ` Michael Walle
2011-10-07 17:16 ` Mike Frysinger
2011-10-21 8:09 ` Prafulla Wadaskar
2011-10-25 21:10 ` Michael Walle [this message]
2011-10-27 9:12 ` Prafulla Wadaskar
2011-10-27 10:22 ` Michael Walle
2011-10-27 21:31 ` [U-Boot] [PATCH 0/2] improve ethernet device index handling Michael Walle
2011-10-27 21:31 ` [U-Boot] [PATCH 1/2] net: introduce per device index Michael Walle
2011-10-27 21:36 ` Michael Walle
2011-11-03 11:23 ` Michael Walle
2011-11-03 11:39 ` Prafulla Wadaskar
2011-11-03 17:58 ` Wolfgang Denk
2011-11-03 18:09 ` Mike Frysinger
2011-10-27 21:31 ` [U-Boot] [PATCH 2/2] mvgbe: fix network device indices Michael Walle
2011-11-03 18:10 ` Mike Frysinger
2011-11-03 23:02 ` Michael Walle
2011-11-03 23:11 ` Mike Frysinger
2011-11-04 6:29 ` Prafulla Wadaskar
2011-11-04 23:06 ` Mike Frysinger
2011-11-05 9:53 ` Albert ARIBAUD
2011-11-05 13:21 ` Wolfgang Denk
2011-11-05 14:34 ` Albert ARIBAUD
2011-11-05 15:06 ` Wolfgang Denk
2011-11-08 7:44 ` Prafulla Wadaskar
2011-11-08 7:32 ` Prafulla Wadaskar
2011-11-08 13:56 ` 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=201110252310.30372.michael@walle.cc \
--to=michael@walle.cc \
--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