
Stefan Roese wrote:
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.
I share Stefan's concerns. Isn't in general the eth_init()/eth_halt() construct because of polling mode where the network controller needs to make sure to operate in well defined states?
In our deployments of using U-Boot networking facilities in standalone apps, there were problems when not doing the full eth_init()/eth_halt() sequence: without closing eth_halt() after the initial successfull transaction the network interface would choke and not work after some time, and all subsequent transfers would fail.
kind regards, Rafal