mbox series

[0/5] serial: implement flow control for ASPEED VUART driver

Message ID 20180321025241.19785-1-jk@ozlabs.org
Headers show
Series serial: implement flow control for ASPEED VUART driver | expand

Message

Jeremy Kerr March 21, 2018, 2:52 a.m. UTC
This series implements flow control for the ASPEED VUART driver. This
hardware is slightly unusual in that the RX data rate can quickly
overwhelm the flip buffer code, so the ldisc-driven throttle/unthrottle
mechanisms don't entirely solve the problem.

To do this, we have a couple of minor changes to the tty core, as well
as an update to the tty proc interface to display buffer overrun metrics
(entirely optional, but does allow us to see the problem).

Then, we implement the standard throttle mechanism, and augment it with
a fast-path to throttle if we overrun the flip buffers before the ldisc
has had a chance to run.

Questions and comments most welcome; I'm fairly new to the tty layer.

Cheers,


Jeremy

---

Jeremy Kerr (5):
  serial: Introduce UPSTAT_SYNC_FIFO for synchronised FIFOs
  serial: expose buf_overrun count through proc interface
  serial/8250: export serial8250_read_char
  serial/aspeed-vuart: Implement rx throttling
  serial/aspeed-vuart: Implement quick throttle mechanism

 drivers/tty/serial/8250/8250_aspeed_vuart.c | 122 ++++++++++++++++++++++++++++
 drivers/tty/serial/8250/8250_port.c         |   3 +-
 drivers/tty/serial/serial_core.c            |   6 +-
 include/linux/serial_8250.h                 |   1 +
 include/linux/serial_core.h                 |   1 +
 5 files changed, 130 insertions(+), 3 deletions(-)

Comments

Greg Kroah-Hartman March 23, 2018, 3:51 p.m. UTC | #1
On Wed, Mar 21, 2018 at 10:52:36AM +0800, Jeremy Kerr wrote:
> This series implements flow control for the ASPEED VUART driver. This
> hardware is slightly unusual in that the RX data rate can quickly
> overwhelm the flip buffer code, so the ldisc-driven throttle/unthrottle
> mechanisms don't entirely solve the problem.
> 
> To do this, we have a couple of minor changes to the tty core, as well
> as an update to the tty proc interface to display buffer overrun metrics
> (entirely optional, but does allow us to see the problem).
> 
> Then, we implement the standard throttle mechanism, and augment it with
> a fast-path to throttle if we overrun the flip buffers before the ldisc
> has had a chance to run.
> 
> Questions and comments most welcome; I'm fairly new to the tty layer.

I've applied patch 2 here, can you redo the series again after fixing up
the first one and include the v2 of patch 5 so it's easier for me to
figure out what to really apply here?

thanks,

greg k-h
Jeremy Kerr March 27, 2018, 3:38 a.m. UTC | #2
Hi Greg,

> I've applied patch 2 here, can you redo the series again after fixing up
> the first one and include the v2 of patch 5 so it's easier for me to
> figure out what to really apply here?

Sure thing. I'll base v2 on top of tty-next, so you'll end up with a
4-patch series, without the duplicate.

Patches coming.

Cheers,


Jeremy