[U-Boot-Users] Return convention for eth_init() ?
r-woodruff2 at ti.com
Thu Jun 19 18:53:53 CEST 2003
Sorry about the HTML. My win machine which is on the side for mail, seems
to sneak settings changes in.
Should I add an error check into ./net/net.c's NetLoop? It seems that
trying to write to the hardware if it didn't respond or had a problem could
cause problems with our own board, and possibly the network its on.
Unfortunately, as many of the eth_ints don't report errors uniformly it
would break some code...I could change other code bits, but I can't test
Oh well, I'll probably report the error properly, and forget to add the
check. I of coarse can change it locally but I'd rather not diverge to
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: Thursday, June 19, 2003 11:34 AM
> To: Woodruff, Richard
> Cc: U-Boot Users
> Subject: Re: [U-Boot-Users] Return convention for eth_init() ?
> In message
> <FD2AC9A020DDD51194710008C7089B20053D4C90 at dlee17.itg.ti.com>
> you wrote:
> > Is there any "correct" convention for the value eth_init()
> is supposed
> > to return? grep'ing/cscop'ing the code seems to indicate that there
> Return 0 for success, -1 for error.
> > isn't.....what should it be.... if there is no consistent
> return then
> > perhaps it should be changed to return a void. Being
> silly, I checked for
> > errors and tried to report them back, unfortunately none of the
> > upstream users check for errors. Thankfully, the control^c
> now works
> > for me.
> You are right, there is little error checking in place as is,
> but we should keep this option open.
> > ------_=_NextPart_001_01C33678.735DDCCA
> > Content-Type: text/html
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> > charset=us-ascii"> <TITLE>Message</TITLE>
> Please do not send HTML messages.
> Please send plain text only.
> Best regards,
> Wolfgang Denk
> Software Engineering: Embedded and Realtime Systems, Embedded Linux
> Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email:
> wd at denx.de The most exciting phrase to hear in science, the
> one that heralds new discoveries, is not "Eureka!" (I found
> it!) but "That's funny ..."
> -- Isaac Asimov
More information about the U-Boot