All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible software flow problem in serial_core
@ 2014-03-20 13:44 Bollinger, Seth
  2014-03-20 23:05   ` Peter Hurley
  0 siblings, 1 reply; 8+ messages in thread
From: Bollinger, Seth @ 2014-03-20 13:44 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-21  1:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 13:44 Possible software flow problem in serial_core Bollinger, Seth
2014-03-20 23:05 ` Peter Hurley
2014-03-20 23:05   ` Peter Hurley
2014-03-20 23:34   ` Bollinger, Seth
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.