linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/26] tty/serial flow control fixes
@ 2014-09-02 21:39 Peter Hurley
  2014-09-02 21:39 ` [PATCH 01/26] Revert "serial: uart: add hw flow control support configuration" Peter Hurley
                   ` (27 more replies)
  0 siblings, 28 replies; 68+ messages in thread
From: Peter Hurley @ 2014-09-02 21:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, One Thousand Gnomes, linux-serial, linux-kernel,
	Peter Hurley

Hi Greg,

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 1
   Backs out the UPF_HARD_FLOW kludge for 8250. This revert should be
   for mainline and -next

Patches 3-7
   Fixes to x_char handling (ie., sending START/STOP) both in the serial
   core and to several UART drivers

Patches 10-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 14, 17 and 21
   Make CTS flow control state SMP-safe, by moving hw_stopped into a private
   field of the serial core.

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 25 and 26
   Cleanup tcflow(TCIxxx)

Regards,

Peter Hurley (26):
  Revert "serial: uart: add hw flow control support configuration"
  serial: Style fix
  serial: imx: Fix x_char handling and tx flow control
  serial: core: Fix x_char race
  serial: core: Remove unsafe x_char optimization
  serial: Fix send_xchar() handlers
  serial: mpc52xx: Use default serial core x_char handler
  serial: sunsab: Don't enable tx if tx stopped
  serial: blackfin: Fix missing gpio.h
  serial: core: Document lock requirement for UPF_* flags updates
  serial: 8250: Document serial8250_modem_status() locking
  serial: core: Unwrap tertiary assignment in uart_handle_dcd_change()
  locking: Add non-fatal spin lock assert
  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 bools
  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)

 .../devicetree/bindings/serial/of-serial.txt       |   1 -
 Documentation/serial/driver                        |   2 +
 drivers/isdn/i4l/isdn_tty.c                        |   5 -
 drivers/tty/pty.c                                  |  41 ++++++++
 drivers/tty/serial/8250/8250_core.c                |   7 +-
 drivers/tty/serial/bfin_sport_uart.c               |   1 +
 drivers/tty/serial/bfin_uart.c                     |  15 +--
 drivers/tty/serial/imx.c                           |  39 +++-----
 drivers/tty/serial/mpc52xx_uart.c                  |  17 ----
 drivers/tty/serial/mxs-auart.c                     |   2 +-
 drivers/tty/serial/of_serial.c                     |   4 -
 drivers/tty/serial/serial_core.c                   | 109 +++++++++++----------
 drivers/tty/serial/sunhv.c                         |   3 +
 drivers/tty/serial/sunsab.c                        |   5 +-
 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                        |  16 ++-
 include/linux/spinlock.h                           |   1 +
 include/linux/spinlock_api_smp.h                   |   1 +
 include/linux/spinlock_api_up.h                    |   1 +
 include/linux/tty.h                                |  11 ++-
 include/linux/tty_driver.h                         |   4 +
 25 files changed, 238 insertions(+), 208 deletions(-)

-- 
2.1.0

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

end of thread, other threads:[~2014-09-23 15:36 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 21:39 [PATCH 00/26] tty/serial flow control fixes Peter Hurley
2014-09-02 21:39 ` [PATCH 01/26] Revert "serial: uart: add hw flow control support configuration" Peter Hurley
2014-09-02 21:50   ` Murali Karicheri
2014-09-02 21:58     ` Peter Hurley
2014-09-02 22:17       ` Murali Karicheri
2014-09-02 21:39 ` [PATCH 02/26] serial: Style fix Peter Hurley
2014-09-02 21:39 ` [PATCH 03/26] serial: imx: Fix x_char handling and tx flow control Peter Hurley
2014-09-02 21:39 ` [PATCH 04/26] serial: core: Fix x_char race Peter Hurley
2014-09-02 21:39 ` [PATCH 05/26] serial: core: Remove unsafe x_char optimization Peter Hurley
2014-09-02 21:39 ` [PATCH 06/26] serial: Fix send_xchar() handlers Peter Hurley
2014-09-02 21:39 ` [PATCH 07/26] serial: mpc52xx: Use default serial core x_char handler Peter Hurley
2014-09-02 21:39 ` [PATCH 08/26] serial: sunsab: Don't enable tx if tx stopped Peter Hurley
2014-09-02 21:39 ` [PATCH 09/26] serial: blackfin: Fix missing gpio.h Peter Hurley
2014-09-02 21:39 ` [PATCH 10/26] serial: core: Document lock requirement for UPF_* flags updates Peter Hurley
2014-09-02 21:39 ` [PATCH 11/26] serial: 8250: Document serial8250_modem_status() locking Peter Hurley
2014-09-02 21:39 ` [PATCH 12/26] serial: core: Unwrap tertiary assignment in uart_handle_dcd_change() Peter Hurley
2014-09-02 21:39 ` [PATCH 13/26] locking: Add non-fatal spin lock assert Peter Hurley
2014-09-03  9:27   ` Peter Zijlstra
2014-09-03 11:20     ` Peter Hurley
2014-09-03 14:40       ` Peter Zijlstra
2014-09-03 14:50         ` Peter Hurley
2014-09-03 15:07           ` Peter Zijlstra
2014-09-04  5:14             ` Ingo Molnar
2014-09-10 11:02               ` Peter Hurley
2014-09-10 13:08                 ` Peter Zijlstra
2014-09-10 14:45                   ` Peter Hurley
2014-09-10 18:34                     ` Greg Kroah-Hartman
2014-09-02 21:39 ` [PATCH 14/26] serial: core: Document and assert lock requirements for irq helpers Peter Hurley
2014-09-02 21:39 ` [PATCH 15/26] serial: core: Privatize modem status enable flags Peter Hurley
2014-09-02 21:39 ` [PATCH 16/26] isdn: i4l: Remove ASYNC_CTS_FLOW Peter Hurley
2014-09-02 21:39 ` [PATCH 17/26] serial: core: Privatize tty->hw_stopped Peter Hurley
2014-09-09  0:29   ` Peter Hurley
2014-09-02 21:39 ` [PATCH 18/26] usb: serial: Remove unused tty->hw_stopped Peter Hurley
2014-09-02 21:39 ` [PATCH 19/26] serial: bfin-uart: Fix auto CTS Peter Hurley
2014-09-02 21:39 ` [PATCH 20/26] serial: core: Use spin_lock_irq() in uart_set_termios() Peter Hurley
2014-09-02 21:39 ` [PATCH 21/26] tty: Convert tty_struct bitfield to bools Peter Hurley
2014-09-03 10:58   ` One Thousand Gnomes
2014-09-03 12:14     ` Peter Hurley
2014-09-03 12:19       ` One Thousand Gnomes
2014-09-03 15:10         ` Peter Hurley
2014-09-03 17:56           ` Greg Kroah-Hartman
2014-09-04 16:08             ` Peter Hurley
2014-09-02 21:39 ` [PATCH 22/26] tty: Serialize tty flow control changes with flow_lock Peter Hurley
2014-09-02 21:39 ` [PATCH 23/26] tty: Move packet mode flow control notifications to pty driver Peter Hurley
2014-09-02 21:39 ` [PATCH 24/26] tty: Serialize tcflow() with other tty flow control changes Peter Hurley
2014-09-02 21:39 ` [PATCH 25/26] tty: Move and rename send_prio_char() as tty_send_xchar() Peter Hurley
2014-09-02 21:39 ` [PATCH 26/26] tty: Hold termios_rwsem for tcflow(TCIxxx) Peter Hurley
2014-09-08 23:24 ` [PATCH 00/26] tty/serial flow control fixes Greg Kroah-Hartman
2014-09-08 23:33   ` Peter Hurley
2014-09-08 23:43     ` Greg Kroah-Hartman
2014-09-08 23:46       ` Peter Hurley
2014-09-09  0:01         ` Greg Kroah-Hartman
2014-09-10 19:06 ` [PATCH v2 00/14] " Peter Hurley
2014-09-10 19:06   ` [PATCH v2 01/14] serial: core: Document and assert lock requirements for irq helpers Peter Hurley
2014-09-10 19:06   ` [PATCH v2 02/14] serial: core: Privatize modem status enable flags Peter Hurley
2014-09-10 19:06   ` [PATCH v2 03/14] isdn: i4l: Remove ASYNC_CTS_FLOW Peter Hurley
2014-09-10 19:06   ` [PATCH v2 04/14] serial: core: Privatize tty->hw_stopped Peter Hurley
2014-09-10 19:06   ` [PATCH v2 05/14] usb: serial: Remove unused tty->hw_stopped Peter Hurley
2014-09-23 15:33     ` Johan Hovold
2014-09-10 19:06   ` [PATCH v2 06/14] serial: bfin-uart: Fix auto CTS Peter Hurley
2014-09-10 19:06   ` [PATCH v2 07/14] serial: core: Use spin_lock_irq() in uart_set_termios() Peter Hurley
2014-09-10 19:06   ` [PATCH v2 08/14] tty: Convert tty_struct bitfield to ints Peter Hurley
2014-09-10 19:06   ` [PATCH v2 09/14] tty: Serialize tty flow control changes with flow_lock Peter Hurley
2014-09-10 19:06   ` [PATCH v2 10/14] tty: Move packet mode flow control notifications to pty driver Peter Hurley
2014-09-10 19:06   ` [PATCH v2 11/14] tty: Serialize tcflow() with other tty flow control changes Peter Hurley
2014-09-10 19:06   ` [PATCH v2 12/14] tty: Move and rename send_prio_char() as tty_send_xchar() Peter Hurley
2014-09-10 19:06   ` [PATCH v2 13/14] tty: Hold termios_rwsem for tcflow(TCIxxx) Peter Hurley
2014-09-10 19:06   ` [PATCH v2 14/14] tty: Workaround Alpha non-atomic byte storage in tty_struct Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).