mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Peter Stuge <peter@stuge.se>
Cc: linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>
Subject: Re: Dropped characters in serial connection without flow control
Date: Wed, 28 Oct 2009 18:16:59 +0000	[thread overview]
Message-ID: <20091028181659.5a97daab@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20091028175937.27472.qmail@stuge.se>

> There is no(!) support for flow control in the hardware.

So do XON/XOFF ?

> Is there anything I can do to reduce serial port interrupt latency or
> otherwise try to mitigate this in my ldisc or in Linux in general? I
> realize that it will never be quite reliable without any flow
> control.
> 
> Baud rate is currently 115200 but could become 57600.

The core tty buffering code tops out at about 40Mbits on a decent PC
system so you shouldn't be seeing problems from that. Our internal
buffering is about 64K which at 115200 is actually over 5 seconds.

> Is there something in particular that I can do wrong or right in
> the ldisc?
> 
> Might it be a good idea to add a circ_buf in the receiver path and
> move out any and all attempts at parsing incoming data? Currently
> it has a simple message buffer and a state machine in there.

ldisc processing is not done in the receiver path

> Characters are dropped both going out and coming in. Nothing to do
> about the out direction, but maybe input can be made reliable?
> 
> I don't expect it, but maybe you know a trick?

Without knowing more about the hardware and the code and the like its a
bit tricky to even guess what your problems are.

      parent reply	other threads:[~2009-10-28 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 17:59 Peter Stuge
2009-10-28 18:05 ` Greg KH
2009-10-28 18:19   ` Peter Stuge
2009-10-28 18:16 ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091028181659.5a97daab@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@stuge.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®