[U-Boot-Users] What if eth_init() fails?

Upakul Barkakaty upakul at gmail.com
Fri Nov 16 07:13:43 CET 2007


Hi Detlev/Ben,

Thanks for the replies. I am attaching herewith, the patch which I suppose
should fix the issue in NetLoop().

Regards,
Upakul Barkakaty
Conexant Systems,Inc

On 11/14/07, Detlev Zundel <dzu at denx.de> wrote:
>
> Hi Upakul,
>
> > 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??
>
> I think your analysis is right and thus the code in NetLoop should be
> fixed.  Feel free to send a patch and I am pretty sure Ben Warren will
> pick it up into the u-boot-net repo.
>
> Cheers
>   Detlev
>
> --
> Two  monks went  fishing in an  electron river.  The first monk drew out
> his
> network, and out flopped a hacker.  The second monk cried, "The poor
> hacker!
> How can  it live outside of the  network?"   The first monk said,  "When
> you
> have learned to live outside the network, then you will know."
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071116/68985e7e/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net.c.patch
Type: application/octet-stream
Size: 290 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20071116/68985e7e/attachment.obj 


More information about the U-Boot mailing list