Replace kernel-defined ASYNC_ bits
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | tty: Define ASYNC_ replacement bitsinclude/ include/ | +23 | 0 replies | |
| 2/8 | tty: Replace ASYNC_CTS_FLOW bit and update atomicallydrivers/ drivers/ drivers/ +7 more | +25 | 0 replies | |
| 3/8 | tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomicallydrivers/ drivers/ drivers/ +8 more | +53 | 0 replies | |
| 4/8 | tty: Replace ASYNC_CHECK_CD and update atomicallydrivers/ drivers/ drivers/ +10 more | +39 | 0 replies | |
| 5/8 | tty: Replace ASYNC_SUSPENDED bit and update atomicallydrivers/ drivers/ include/ | +23 | 0 replies | |
| 6/8 | tty: Replace ASYNC_INITIALIZED bit and update atomicallydrivers/ drivers/ drivers/ +24 more | +157 | 1 reply | |
| 7/8 | tty: mxser: Remove unused ASYNC_SHARE_IRQ flagdrivers/ | +0 | 0 replies | |
| 8/8 | tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flagsinclude/ | +4 | 0 replies |
Reviews trailers per patch
1 of 8 patches has a Reviewed-by or Acked-by.
| Patch | Johan Hovold |
|---|---|
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | A-b |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] Replace kernel-defined ASYNC_ bits
As outlined in my January email ("RFC: out-of-tree tty driver breakage"), the tty/serial core uses 5 bits in the tty_port.flags field to manage state. They are:
ASYNCB_INITIALIZEDASYNCB_SUSPENDEDASYNCB_NORMAL_ACTIVEASYNCB_CTS_FLOWASYNCB_CHECK_CD
(NB: ASYNC_CLOSING was recently removed)
However, updates to this field (tty_port.flags) can be and often are non-atomic. Additionally, the field is visible to/modifiable by userspace (the state bits above are not modifiable by userspace though).
This series moves these state bits into a different tty_port field (iflags) and abstracts state tests and changes with trivial helpers.
The last patch of the series purposefully breaks out-of-tree driver builds to ensure they update state test/change methods to the helpers instead.
REQUIRES: "tty: Replace TTY_IO_ERROR bit tests with tty_io_error()"
"tty: Replace TTY_THROTTLED bit tests with tty_throttled()"
Regards,
Peter Hurley (8):
tty: Define ASYNC_ replacement bits
tty: Replace ASYNC_CTS_FLOW bit and update atomically
tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically
tty: Replace ASYNC_CHECK_CD and update atomically
tty: Replace ASYNC_SUSPENDED bit and update atomically
tty: Replace ASYNC_INITIALIZED bit and update atomically
tty: mxser: Remove unused ASYNC_SHARE_IRQ flag
tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flags
drivers/char/pcmcia/synclink_cs.c | 25 +++++------- drivers/ipack/devices/ipoctal.c | 5 +-- drivers/isdn/i4l/isdn_tty.c | 38 ++++++++---------- drivers/s390/char/con3215.c | 22 +++++------ drivers/tty/amiserial.c | 31 +++++++-------- drivers/tty/cyclades.c | 38 ++++++++---------- drivers/tty/isicom.c | 19 ++++----- drivers/tty/moxa.c | 10 ++--- drivers/tty/mxser.c | 28 +++++--------- drivers/tty/n_gsm.c | 8 ++-- drivers/tty/rocket.c | 13 ++++--- drivers/tty/serial/crisv10.c | 25 ++++++------ drivers/tty/serial/serial_core.c | 40 ++++++++++--------- drivers/tty/synclink.c | 65 ++++++++++++++----------------- drivers/tty/synclink_gt.c | 35 +++++++---------- drivers/tty/synclinkmp.c | 35 +++++++---------- drivers/tty/tty_port.c | 25 ++++++------ drivers/usb/class/cdc-acm.c | 4 +- drivers/usb/serial/console.c | 4 +- drivers/usb/serial/generic.c | 6 +-- drivers/usb/serial/mxuport.c | 6 +-- drivers/usb/serial/sierra.c | 4 +- drivers/usb/serial/usb-serial.c | 2 +- drivers/usb/serial/usb_wwan.c | 4 +- include/linux/tty.h | 77 ++++++++++++++++++++++++++++++++++++- include/uapi/linux/tty_flags.h | 13 ++++++- net/irda/ircomm/ircomm_tty.c | 29 +++++++------- net/irda/ircomm/ircomm_tty_attach.c | 2 +- net/irda/ircomm/ircomm_tty_ioctl.c | 10 ++--- 29 files changed, 320 insertions(+), 303 deletions(-)
Signature · 1 line
2.8.1