Skip to content

fixes for empty tx buffer breakage

Peter Hurley linux-serial lkml sparclinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2serial: Test for no tx data on tx restartdrivers/tty/serial/imx.c drivers/tty/serial/ip22zilog.c drivers/tty/serial/m32r_sio.c +3 more+18 -30 replies
2/2serial: arc_uart: Use uart_circ_empty() for open-coded comparisondrivers/tty/serial/arc_uart.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] fixes for empty tx buffer breakage
Cc Seth Bollinger <[email protected]>
Cc Aaro Koskinen <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>

Greg,

I completed the audit of serial drivers after reports that several Sun serial drivers were broken by
commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c, 'serial_core: Fix conditional start_tx on ring buffer not empty'.

I apologize for not submitting this sooner. The delay was due to an ongoing analysis of serial flow control prompted by Sam Ravnborg's question:

Quoted 5 lines · Sam Ravnborg

I also noticed the typical pattern is:

     if (uart_circ_empty(xmit) || uart_tx_stopped(port))

Should you use this pattern also in sunsab.c?

Unfortunately, that analysis revealed that tx flow control is largely SMP-unsafe, and it's fairly easy to corrupt the hardware state wrt. the tty flow control state.

I'm still working on the solutions to that; they're too extensive to submit for 3.16 anyway.

Regards,

Peter Hurley (2):
serial: Test for no tx data on tx restart
serial: arc_uart: Use uart_circ_empty() for open-coded comparison

 drivers/tty/serial/arc_uart.c   | 2 +-
 drivers/tty/serial/imx.c        | 3 +++
 drivers/tty/serial/ip22zilog.c  | 2 ++
 drivers/tty/serial/m32r_sio.c   | 8 +++++---
 drivers/tty/serial/pmac_zilog.c | 3 +++
 drivers/tty/serial/sunsab.c     | 3 +++
 drivers/tty/serial/sunzilog.c   | 2 ++
 7 files changed, 19 insertions(+), 4 deletions(-)
Signature · 1 line
2.0.0