From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Wed, 14 Nov 2007 09:24:17 -0600 Subject: [U-Boot-Users] What if eth_init() fails? In-Reply-To: <13740586.post@talk.nabble.com> References: <13740586.post@talk.nabble.com> Message-ID: <473B1321.2090305@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Upakul Barkakaty wrote: > Hi all, I observed that when the Ethernet initialization fails, it is > not properly halting the operation and exiting. On walking through the > Networking files, I saw that the eth_init() in eth.c either returns a 0 > or 1. Now, in the NetLoop() in net.c file, from where the eth_init() > gets called, checks the condition if (eth_init(bd) < 0) { eth_halt(); > return(-1); } which is thus never true. Thus the network operation, > never exits gracefully, if Ethernet init fails. Any of you, have any > clues about this?? This is a known bug. The problem is that it's been around for so long, people don't realize what's happening. If you fix it, you might break something else. I still think it should be fixed. In fact, I was planning on submitting a patch next month for it. -- Timur Tabi Linux kernel developer at Freescale