tty/serial flow control fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest14 patches 1 replyIn review
- v126 patches 25 repliesSuperseded
Changes in v2 from the cover letter
1. Omits v1 patches 1-12 which you already applied
2. Depends on 'locking: Add WARN_ON_ONCE lock assertion',
which replaces v1 patch 13
3. Works around Alpha EV4/5 non-atomic byte/short storage
4. Works around gcc bug in versions < 4.7.2, where bitfield stores can corrupt adjacent storage on ia64, ppc64, sparc64 and 64-bit parisc arches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52080
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | serial: core: Document and assert lock requirements for irq helpersdrivers/ | +8 | 0 replies | |
| 2/14 | serial: core: Privatize modem status enable flagsdrivers/ drivers/ include/ | +30 | 0 replies | |
| 3/14 | isdn: i4l: Remove ASYNC_CTS_FLOWdrivers/ | +0 | 0 replies | |
| 4/14 | serial: core: Privatize tty->hw_stoppeddrivers/ drivers/ include/ | +22 | 0 replies | |
| 5/14 | usb: serial: Remove unused tty->hw_stoppeddrivers/ drivers/ drivers/ | +3 | 1 reply | |
| 6/14 | serial: bfin-uart: Fix auto CTSdrivers/ | +2 | 0 replies | |
| 7/14 | serial: core: Use spin_lock_irq() in uart_set_termios()drivers/ | +4 | 0 replies | |
| 8/14 | tty: Convert tty_struct bitfield to intsinclude/ | +4 | 0 replies | |
| 9/14 | tty: Serialize tty flow control changes with flow_lockdrivers/ include/ include/ | +36 | 0 replies | |
| 10/14 | tty: Move packet mode flow control notifications to pty driverdrivers/ drivers/ | +45 | 0 replies | |
| 11/14 | tty: Serialize tcflow() with other tty flow control changesdrivers/ include/ | +9 | 0 replies | |
| 12/14 | tty: Move and rename send_prio_char() as tty_send_xchar()drivers/ drivers/ include/ | +34 | 0 replies | |
| 13/14 | tty: Hold termios_rwsem for tcflow(TCIxxx)drivers/ | +7 | 0 replies | |
| 14/14 | tty: Workaround Alpha non-atomic byte storage in tty_structinclude/ | +3 | 0 replies |
Reviews trailers per patch
1 of 14 patches has a Reviewed-by or Acked-by.
| Patch | Johan Hovold |
|---|---|
| 1/14 | |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | A-b |
| 6/14 | |
| 7/14 | |
| 8/14 | |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/14] tty/serial flow control fixes
Hi Greg,
Changes since v1:
1. Omits v1 patches 1-12 which you already applied
2. Depends on 'locking: Add WARN_ON_ONCE lock assertion',
which replaces v1 patch 13
3. Works around Alpha EV4/5 non-atomic byte/short storage
4. Works around gcc bug in versions < 4.7.2, where bitfield stores can corrupt adjacent storage on ia64, ppc64, sparc64 and 64-bit parisc arches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52080
v1:
This patch series reworks the internals of tty and serial flow control to fix multiple races in both START/STOP flow control and RTS/CTS flow control.
The main changes in this series are:
Patch 2 (v1 patch 15)
Rename and move ASYNC_CTS_FLOW and ASYNC_CHECK_CD statuses into a private field for the serial core, and add helper functions to test those statuses for UART drivers.
This is a necessary step toward making tty port->flags SMP-safe, without introducing a new lock.
Patches 1, 4 and 8 (v1 patches 14, 17 and 21)
Make CTS flow control state SMP-safe, by moving hw_stopped into a private field of the serial core.
Patches 9-11 (v1 patches 22-24)
Make tty flow control changes mutually exclusive.
Protecting tty->stopped and tty->flow_stopped with a new spin lock (instead of the ->ctrl_lock) is required to fix multiple races with controlling terminal changes, coming in a follow-on patch series.
Patches 12 & 13 (v1 patches 25 & 26)
Cleanup tcflow(TCIxxx)
Regards,
Peter Hurley (14):
serial: core: Document and assert lock requirements for irq helpers
serial: core: Privatize modem status enable flags
isdn: i4l: Remove ASYNC_CTS_FLOW
serial: core: Privatize tty->hw_stopped
usb: serial: Remove unused tty->hw_stopped
serial: bfin-uart: Fix auto CTS
serial: core: Use spin_lock_irq() in uart_set_termios()
tty: Convert tty_struct bitfield to ints
tty: Serialize tty flow control changes with flow_lock
tty: Move packet mode flow control notifications to pty driver
tty: Serialize tcflow() with other tty flow control changes
tty: Move and rename send_prio_char() as tty_send_xchar()
tty: Hold termios_rwsem for tcflow(TCIxxx)
tty: Workaround Alpha non-atomic byte storage in tty_struct
drivers/isdn/i4l/isdn_tty.c | 5 -- drivers/tty/pty.c | 41 +++++++++++++++ drivers/tty/serial/bfin_uart.c | 15 +++--- drivers/tty/serial/mxs-auart.c | 2 +- drivers/tty/serial/serial_core.c | 70 +++++++++++++++----------- drivers/tty/tty_io.c | 93 ++++++++++++++++++++++------------- drivers/tty/tty_ioctl.c | 47 +++++------------- drivers/usb/serial/digi_acceleport.c | 7 +-- drivers/usb/serial/io_ti.c | 7 +-- drivers/usb/serial/ti_usb_3410_5052.c | 7 +-- include/linux/serial_core.h | 15 +++++- include/linux/tty.h | 15 ++++-- include/linux/tty_driver.h | 4 ++ 13 files changed, 193 insertions(+), 135 deletions(-)
Signature · 1 line
2.1.0