[U-Boot] [PATCH v4 2/2] NS16550: buffer reads

Wolfgang Denk wd at denx.de
Sun Oct 23 10:20:51 CEST 2011


Dear Graeme Russ,

In message <4EA34086.4030101 at gmail.com> you wrote:
> 
> One problem I see with XON/XOFF is that if we don't send XOFF at the right
> time, we run the risk of entering a busy loop (any reasonable timeout delay
> for example) and loosing input. So in theory, we would need to send XOFF
> after every getc() ...

That's not true.  I am not aware of any significant delays that take
place while receiving characters that belong to a single line.  If we
had any of these, we would lose characters all the time - but we
don't.

It should be sufficient to send XOFF after receiving a newline
character.

> Maybe we need disable/enable flow control functions for when we know we
> will be entering a busy loop the consumes serial input (ymodem and kermit
> transfers and readline for example)

This should not be necessary. Actually the implementation should not
need to know about such special cases.

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
Compassion -- that's the one things no machine ever had.  Maybe it's
the one thing that keeps men ahead of them.
	-- McCoy, "The Ultimate Computer", stardate 4731.3


More information about the U-Boot mailing list