[U-Boot] [PATCH 2/3] Connect the AT91 UDC to USB CDC-ethernet support

Wolfgang Denk wd at denx.de
Fri Aug 13 16:04:55 CEST 2010


Dear Remy Bohmer,

In message <AANLkTi=eR+5ZTY_S0hE8QR460QntEHXs1izsFNtopopR at mail.gmail.com> you wrote:
> 
> >> > So broken that you cannot get back to the command line interpreter?
> >> > Really?
> >>
> >> If malloc is broken, I consider that reason enough for hang/reboot...
> >
> > That's not a good idea. =A0Please fix.
> 
> Fix what?
> If runtime a condition is detected that should _never_ _ever_ happen
> (like malloc does not work properly for some reason), which would even
> make Linux OOPS or panic may not result in a hang() on U-boot?

malloc() is not broken, it just has not enough resources to fulfil
your request. That does not mean that the rest of the system (which
does not make any such requests) would not be able to continue.

> In that case I can remove the hang() and consider if it never
> happened. Maybe even the code will reach the prompt, but there will be
> no guarantees...

Fail the running command with appropriate error message and returen
code, but do not decide for the user if he is able and willing to
continue.

> I personally consider that worse compared to tell the user that
> something serious has gone wrong...

Of course we have to issue appropriate error messages and return
codes, but there is no need to halt the system.

You stop your car, but you don't (usually) take it to a knacker's
yard when there is a flat tire.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Respect is a rational process
	-- McCoy, "The Galileo Seven", stardate 2822.3


More information about the U-Boot mailing list