[U-Boot] Inefficient code in NetLoop() ?

Stefan Roese sr at denx.de
Fri Sep 26 09:55:59 CEST 2008


On Friday 26 September 2008, Wolfgang Denk wrote:
> > > Am I reading this correctly that we  eth_halt()  and  eth_init()  the
> > > network interface for each and every call to NetLoop?
> >
> > Yes, it looks that way.  Ripe for gutting.
>
> I didn't have much time to look into the code, so I'm just speculating
> - maybe this is needed for switching interfaces in case of errors?

Some ethernet interfaces (e.g. ppc4xx) need to get stopped after the network 
transaction. Otherwise the interface will continue to DMA data to the buffers 
and this could break OS booting. So please don't remove the eth_halt() after 
the transaction is finished.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list