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

Graeme Russ graeme.russ at gmail.com
Sun Oct 23 13:50:43 CEST 2011


Hi Wolgang,

On Oct 23, 2011 7:20 PM, "Wolfgang Denk" <wd at denx.de> wrote:
>
> 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.

And, ergo, we send an XON when entering the readline function

Hmm, should we move readline() into console.c

> > 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.

So how does kermit/ymodem send the XON after the user has entered the
receive command and we have sent the XOFF after the newline?

Regards,

Graeme


More information about the U-Boot mailing list