[PATCH 1/3] fec: restart autoneg at open instead of init

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 7 03:47:34 EDT 2012


On Fri, Sep 07, 2012 at 09:30:00AM +0200, Eric Bénard wrote:
> Hi Sascha,
> 
> Le Fri, 7 Sep 2012 08:57:03 +0200,
> Sascha Hauer <s.hauer at pengutronix.de> a écrit :
> 
> > Hi Eric,
> > 
> > On Thu, Sep 06, 2012 at 09:39:29PM +0200, Eric Bénard wrote:
> > > this saves some time during boot when ethernet is not needed in barebox
> > 
> > Is this really significant on your hardware? I made a measurement here
> > and the miidev_restart_aneg() takes 130us on an i.MX27 board.
> > 
> > The original intention of doing it at init time was that autonegotation
> > is already completed when we actually use the network. And this time
> > really is significant:
> > 
> > without the patch:
> > 
> > barebox at Phytec phyCORE-i.MX27:/ time ping 192.168.23.4
> > warning: No MAC address set. Using random address 62:FE:FE:0B:09:A8
> > phy0: Link is up - 100/Full
> > host 192.168.23.4 is alive
> > time: 10ms
> > 
> > with the patch:
> > 
> > barebox at Phytec phyCORE-i.MX27:/ time ping 192.168.23.4
> > warning: No MAC address set. Using random address A6:1B:AB:80:FA:E7
> > phy0: Link is up - 100/Full
> > host 192.168.23.4 is alive
> > time: 2040ms
> > 
> that strange. I don't see why miidev_restart_aneg() would take less
> time at boot than at open.

Well, it does not really take longer. The difference is that if you are
sitting before your board it usually takes a few seconds to interrupt
autoboot, think what you want to do, and finally enter some network
command. In the meantime autonegotiation will be complete. If we start
autonegotiation at open time, we will always have to wait for the full
autonegotiation time after starting the first network command.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list