lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/1] Fix 8250 XON/XOFF for DMA-capable devices
Date
DMA-capable 8250 was not properly taking XON/XOFF into account
right since it was introduced in 2013. There was no attempt to
send x_char out at all which is fixed by this patch.

After making this fix, it was further reported by Gilles Buloz
that also rx side fails to work as expected if the receiving
side is not reading from tty. I took look into that issue and
and determined that XOFF char gets stuck in an intermediate
buffer until enough data can be processed in receive_buf().
So it's not very useful from flow control perspective :-). While
the problem is more likely to occur with DMA, the code does not
look robust and the problem can likely occur also w/o DMA.

I was thinking of fixing the rx side issue by adding lookahead.
The most natural place to call lookahead handler would seem
to be from flush_to_ldisc() in the case when receive_buf() does
not eat all characters that were passed to it. Does anybody have
other opinions on how it should be fixed?

Ilpo Järvinen (1):
serial: 8250: fix XOFF/XON sending when DMA is used

drivers/tty/serial/8250/8250_dma.c | 11 ++++++++++-
drivers/tty/serial/8250/8250_port.c | 4 +---
drivers/tty/serial/serial_core.c | 14 ++++++++++++++
include/linux/serial_core.h | 2 ++
4 files changed, 27 insertions(+), 4 deletions(-)

--
2.30.2

\
 
 \ /
  Last update: 2022-03-14 10:16    [W:0.235 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site