From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Walle Date: Sun, 16 Oct 2011 20:28:52 +0200 Subject: [U-Boot] [PATCH] mvgbe: fix network device indices In-Reply-To: <0badf8ccc31cf6d53e6a8b2572e03a38.squirrel@ssl.serverraum.org> References: <0badf8ccc31cf6d53e6a8b2572e03a38.squirrel@ssl.serverraum.org> Message-ID: <201110162028.52318.michael@walle.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Freitag 07 Oktober 2011, 12:48:40 schrieb Michael Walle: > Am Fr, 7.10.2011, 10:26 schrieb Prafulla Wadaskar: > >> -----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 environmen > >> varibale > >> ethaddr. > > > > So if there is only one eth port available, the associated environment > > variable should be ethaddr, this is understood. > > Is there any issue with this? > > Are you asking me or the list? (if the question was for me, remember that > there might be _only_ the egiga1 device.) > > > Then I have anther question in my mind- > > Why not we name eth0addr for environment variable associated with egiga0 > > to maintain consistency with naming and used ports? > > If i get it right, there is another problem with setting the environment > variable from the driver itself. > > eth_register() and eth_init() using an own index to enumerate the devices. > Eg. if an e1000 is registered before the the associated environment > variable would be eth1addr for the first mvgbe device and eth2addr for the > second. > > This patch only fixes the case where no other network device is > registered. (The current behaviour just works with egiga0 being the only > or the first and egiga1 being the second device). ping :) -- Michael