[U-Boot] [PATCH v2] NS16550: buffer reads

Wolfgang Denk wd at denx.de
Tue Oct 25 09:31:11 CEST 2011


Dear Graeme Russ,

In message <CALButCLNEjjEB=1zvvikrVo5-X9vyYOECU1-ZrpXf2myavM+Pg at mail.gmail.com> you wrote:
> 
> Now 1c) makes the bold assumption that any command which calls getc()
> 'knows what it is doing' and will consume all input characters at a fast
> enough rate AND will not invoke a delay between receiving the last
> character and returning back to the command line interpreter. If the
> command knows it received characters and knows it will invoke a delay (some
> kind of post-processing) then in order to not lose characters, the command
> MUST issue it's own XOFF - nothing else aside from an interrupt driven
> serial driver will solve the problem in this case.

This is a fundamentally broken design.  No command should ever need to
have any such knowledge, not to mention that we must not littering
potentially all code with serial flow control calls.

You will have really hard times to get anything like that into mainline.

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
The optimum committee has no members.
                                                   - Norman Augustine


More information about the U-Boot mailing list