tty_port: drop last traces of low_latency
authorJiri Slaby <jslaby@suse.cz>
Tue, 5 Jan 2021 12:02:38 +0000 (13:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jan 2021 15:17:32 +0000 (16:17 +0100)
The main purpose of tty_port::low_latency was removed in commit
a9c3f68f3cd8 (tty: Fix low_latency BUG) back in 2014. It was left in
place for drivers as an optional tune knob. But only one driver has been
using it until the previous commit. So remove this misconcept
completely, given there are no users.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210105120239.28031-11-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
Documentation/networking/caif/caif.rst
drivers/char/pcmcia/synclink_cs.c
drivers/net/caif/caif_serial.c
drivers/s390/char/con3215.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_vt220.c
drivers/s390/char/tty3270.c
drivers/tty/amiserial.c
drivers/tty/hvc/hvcs.c
drivers/tty/ipwireless/tty.c
drivers/tty/mxser.c
drivers/tty/serial/ifx6x60.c
drivers/tty/serial/max3100.c
drivers/tty/serial/serial_core.c
drivers/tty/synclink_gt.c
include/linux/tty.h

index a07213030ccf547d9e11a5269d9fa4af5219581f..81a14373d7801159156a06cbb55ac07bef010981 100644 (file)
@@ -68,7 +68,6 @@ There are debugfs parameters provided for serial communication.
 * tty_status: Prints the bit-mask tty status information
 
   - 0x01 - tty->warned is on.
-  - 0x02 - tty->low_latency is on.
   - 0x04 - tty->packed is on.
   - 0x08 - tty->flow_stopped is on.
   - 0x10 - tty->hw_stopped is on.
index e342daa73d1b02085f656ba595497d998bad6ff8..2be8d9a8eec5d578d6e06b89d3dfe926b1c8bc64 100644 (file)
@@ -2494,8 +2494,6 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
                printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
                         __FILE__, __LINE__, tty->driver->name, port->count);
 
-       port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-
        spin_lock_irqsave(&info->netlock, flags);
        if (info->netcount) {
                retval = -EBUSY;
index bcc14c5875bf0958109d239a9eb7c72700747670..8215cd77301f5430c8deeecf9553fefda859a382 100644 (file)
@@ -89,8 +89,7 @@ static inline void update_tty_status(struct ser_device *ser)
        ser->tty_status =
                ser->tty->stopped << 5 |
                ser->tty->flow_stopped << 3 |
-               ser->tty->packet << 2 |
-               ser->tty->port->low_latency << 1;
+               ser->tty->packet << 2;
 }
 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
 {
index 1354c42d95aa8c64f5af51cf1c613a6b6453b3d7..671efee612af5e41e649d48de5957d6bd18dc066 100644 (file)
@@ -914,7 +914,6 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)
 
        tty_port_tty_set(&raw->port, tty);
 
-       raw->port.low_latency = 0; /* don't use bottom half for pushing chars */
        /*
         * Start up 3215 device
         */
index 5aff8b684eb21e8557f253c7ddf18d48420435c1..013bcc3313057c71b71db8b0ff526aac18c209e0 100644 (file)
@@ -65,7 +65,6 @@ sclp_tty_open(struct tty_struct *tty, struct file *filp)
 {
        tty_port_tty_set(&sclp_port, tty);
        tty->driver_data = NULL;
-       sclp_port.low_latency = 0;
        return 0;
 }
 
index 3f9a6ef650fac41c938cc797ced3a62d1b10fa81..047f812d1a1c89fb5ee679140572ec58c30a899d 100644 (file)
@@ -560,7 +560,6 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp)
 {
        if (tty->count == 1) {
                tty_port_tty_set(&sclp_vt220_port, tty);
-               sclp_vt220_port.low_latency = 0;
                if (!tty->winsize.ws_row && !tty->winsize.ws_col) {
                        tty->winsize.ws_row = 24;
                        tty->winsize.ws_col = 80;
index aec996de44d92744223a18f59d890c47ef4e723d..15692449a1c3fc6032e739efb926ef071a6bdaeb 100644 (file)
@@ -967,7 +967,6 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
                tty->driver_data = tp;
                tty->winsize.ws_row = tp->view.rows - 2;
                tty->winsize.ws_col = tp->view.cols;
-               tp->port.low_latency = 0;
                tp->inattr = TF_INPUT;
                goto port_install;
        }
@@ -996,7 +995,6 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
                return rc;
        }
 
-       tp->port.low_latency = 0;
        tty->winsize.ws_row = tp->view.rows - 2;
        tty->winsize.ws_col = tp->view.cols;
 
index 13f63c01c589478ba97c3e93780812f5f00939b3..18b78ea110ef47ad00a59cd854b7e8e1feebf44c 100644 (file)
@@ -998,7 +998,6 @@ static int set_serial_info(struct tty_struct *tty, struct serial_struct *ss)
        state->custom_divisor = ss->custom_divisor;
        port->close_delay = ss->close_delay * HZ/100;
        port->closing_wait = ss->closing_wait * HZ/100;
-       port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
 check_and_exit:
        if (tty_port_initialized(port)) {
@@ -1386,8 +1385,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        tty->driver_data = info;
        tty->port = port;
 
-       port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-
        retval = startup(tty, info);
        if (retval) {
                return retval;
index 509d1042825a19ed1c8da131c0559546dfe85be9..dfe02283ed2305ba1454aa365047f16aa8caffc1 100644 (file)
@@ -605,7 +605,7 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
                hvcsd->todo_mask |= HVCS_QUICK_READ;
 
        spin_unlock_irqrestore(&hvcsd->lock, flags);
-       /* This is synch because tty->low_latency == 1 */
+       /* This is synch -- FIXME :js: it is not! */
        if(got)
                tty_flip_buffer_push(&hvcsd->port);
 
index 23584769fc2920b5ecd53efe9069cfcd67dbac6d..6dacbc5e286c1092b5a4a0c92149355ae2360c5d 100644 (file)
@@ -101,7 +101,6 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
 
        tty->port.tty = linux_tty;
        linux_tty->driver_data = tty;
-       tty->port.low_latency = 1;
 
        if (tty->tty_type == TTYTYPE_MODEM)
                ipwireless_ppp_open(tty->network);
index 3703987c46661396bbf3c276a4ce295e3157ca0b..4203b64bccdb1b6c89c29aaf9ee2ca868465062e 100644 (file)
@@ -1273,7 +1273,6 @@ static int mxser_set_serial_info(struct tty_struct *tty,
                                (ss->flags & ASYNC_FLAGS));
                port->close_delay = ss->close_delay * HZ / 100;
                port->closing_wait = ss->closing_wait * HZ / 100;
-               port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
                if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST &&
                                (ss->baud_base != info->baud_base ||
                                ss->custom_divisor !=
index 182e0ccd60b2caf32e69cb635c596b9811c3439e..d4ef88ee22d0cd0b2af6177df47632b230a2a649 100644 (file)
@@ -565,9 +565,6 @@ static int ifx_port_activate(struct tty_port *port, struct tty_struct *tty)
        /* put port data into this tty */
        tty->driver_data = ifx_dev;
 
-       /* allows flip string push from int context */
-       port->low_latency = 1;
-
        /* set flag to allows data transfer */
        set_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags);
 
index 371569a0fd00a8161f76ac715a734368e2419e60..3c92d4e014887f15f553da1a4fb2d6a3b3758eb7 100644 (file)
@@ -521,9 +521,6 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios,
                        MAX3100_STATUS_PE | MAX3100_STATUS_FE |
                        MAX3100_STATUS_OE;
 
-       /* we are sending char from a workqueue so enable */
-       s->port.state->port.low_latency = 1;
-
        if (s->poll_time > 0)
                del_timer_sync(&s->timer);
 
index 828f9ad1be49ce49939d972e185ddaf63c4d5787..7dacdb6a8534509b2fed6635aa577bf91a99bb80 100644 (file)
@@ -975,7 +975,6 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
        port->closing_wait    = closing_wait;
        if (new_info->xmit_fifo_size)
                uport->fifosize = new_info->xmit_fifo_size;
-       port->low_latency = (uport->flags & UPF_LOW_LATENCY) ? 1 : 0;
 
  check_and_exit:
        retval = 0;
@@ -1795,8 +1794,6 @@ static int uart_port_activate(struct tty_port *port, struct tty_struct *tty)
        if (!uport || uport->flags & UPF_DEAD)
                return -ENXIO;
 
-       port->low_latency = (uport->flags & UPF_LOW_LATENCY) ? 1 : 0;
-
        /*
         * Start up the serial port.
         */
index c0b384e3ed4defe380ead244f04a03b9be89d78a..644173786bf0decb29e472390129aeb240d21833 100644 (file)
@@ -672,7 +672,6 @@ static int open(struct tty_struct *tty, struct file *filp)
        DBGINFO(("%s open, old ref count = %d\n", info->device_name, info->port.count));
 
        mutex_lock(&info->port.mutex);
-       info->port.low_latency = (info->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
        spin_lock_irqsave(&info->netlock, flags);
        if (info->netcount) {
index 12be8b16cdefda07d8c9519299baa9a9cf335f08..b57f6812b3bae1b2a680bcaead43ae726e8e86a8 100644 (file)
@@ -240,8 +240,7 @@ struct tty_port {
        wait_queue_head_t       delta_msr_wait; /* Modem status change */
        unsigned long           flags;          /* User TTY flags ASYNC_ */
        unsigned long           iflags;         /* Internal flags TTY_PORT_ */
-       unsigned char           console:1,      /* port is a console */
-                               low_latency:1;  /* optional: tune for latency */
+       unsigned char           console:1;      /* port is a console */
        struct mutex            mutex;          /* Locking */
        struct mutex            buf_mutex;      /* Buffer alloc lock */
        unsigned char           *xmit_buf;      /* Optional buffer */