From: "Bollinger, Seth" <Seth.Bollinger@digi.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Possible software flow problem in serial_core
Date: Thu, 20 Mar 2014 13:44:57 +0000 [thread overview]
Message-ID: <CF505B08.6E64%seth.bollinger@digi.com> (raw)
Hello All,
We’ve recently run into a possible problem with software flow control
handling in the serial_core layer.
Here is the scenario:
1. Transmit from uart to remote device
2. Remote device sends us an XOFF
3. The tty layer receives the XOFF
4. stop_tty() - The uart transmitter is stopped (ops->stop_tx) just as the
serial_core ring is cleared (this could trap a few bytes in the fifo).
5. Remote device sends us an XON
6. The tty layer receives the XON
7. start_tty() - However, the serial_core ring is empty, so the call to
start the uart transmitter (uart_start:ops->start_tx) is skipped
Any window, however small, could leave bytes stuck in the transmitter
forever -- particularly if there will be no further transmission until
receiving a response.
I can't find any functionality in the drivers that accounts for this
possibility. Can you help me find how Linux serial drivers manage this
eventuality?
Thanks,
Seth
next reply other threads:[~2014-03-20 13:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 13:44 Bollinger, Seth [this message]
2014-03-20 23:05 ` Possible software flow problem in serial_core Peter Hurley
2014-03-20 23:34 ` Bollinger, Seth
2014-03-21 0:34 ` Peter Hurley
2014-03-21 0:48 ` Bollinger, Seth
2014-03-21 1:07 ` Peter Hurley
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=CF505B08.6E64%seth.bollinger@digi.com \
--to=seth.bollinger@digi.com \
--cc=linux-kernel@vger.kernel.org \
/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