From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 14 Nov 2007 11:49:28 -0500 Subject: [U-Boot-Users] What if eth_init() fails? In-Reply-To: <473B1321.2090305@freescale.com> References: <13740586.post@talk.nabble.com> <473B1321.2090305@freescale.com> Message-ID: <200711141149.31028.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 14 November 2007, Timur Tabi wrote: > 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. so by fixing one bug, you may expose other bugs, and that's a bad thing ? bad code has gotta go ! -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20071114/ed3e560a/attachment.pgp