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 a072130..81a1437 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 e342daa..2be8d9a 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 bcc14c5..8215cd7 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 1354c42..671efee 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 5aff8b6..013bcc3 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 3f9a6ef..047f812 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 aec996d..1569244 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 13f63c0..18b78ea 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 509d104..dfe0228 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 2358476..6dacbc5 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 3703987..4203b64 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 182e0cc..d4ef88e 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 371569a..3c92d4e 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 828f9ad..7dacdb6 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 c0b384e..6441737 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 12be8b1..b57f681 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 */