Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2400a2bf authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

USB: removal of tty->low_latency hack dating back to the old serial code



This removes tty->low_latency from all USB serial drivers that push
data into the tty layer at hard interrupt context. It's no longer needed
and actually harmful.

Signed-off-by: default avatarOliver Neukum <oliver@neukum.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 212b8f0c
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -175,13 +175,6 @@ static int cyberjack_open(struct tty_struct *tty,
	dbg("%s - usb_clear_halt", __func__);
	usb_clear_halt(port->serial->dev, port->write_urb->pipe);

	/* force low_latency on so that our tty_push actually forces
	 * the data through, otherwise it is scheduled, and with high
	 * data rates (like with OHCI) data can get lost.
	 */
	if (tty)
		tty->low_latency = 1;

	priv = usb_get_serial_port_data(port);
	spin_lock_irqsave(&priv->lock, flags);
	priv->rdtodo = 0;
+0 −4
Original line number Diff line number Diff line
@@ -656,10 +656,6 @@ static int cypress_open(struct tty_struct *tty,
	priv->rx_flags = 0;
	spin_unlock_irqrestore(&priv->lock, flags);

	/* setting to zero could cause data loss */
	if (tty)
		tty->low_latency = 1;

	/* raise both lines and set termios */
	spin_lock_irqsave(&priv->lock, flags);
	priv->line_control = CONTROL_DTR | CONTROL_RTS;
+0 −6
Original line number Diff line number Diff line
@@ -478,12 +478,6 @@ static void empeg_set_termios(struct tty_struct *tty,
	termios->c_cflag
		|= CS8;		/* character size 8 bits */

	/*
	 * Force low_latency on; otherwise the pushes are scheduled;
	 * this is bad as it opens up the possibility of dropping bytes
	 * on the floor.  We don't want to drop bytes on the floor. :)
	 */
	tty->low_latency = 1;
	tty_encode_baud_rate(tty, 115200, 115200);
}

+0 −8
Original line number Diff line number Diff line
@@ -973,14 +973,6 @@ static int garmin_open(struct tty_struct *tty,

	dbg("%s - port %d", __func__, port->number);

	/*
	 * Force low_latency on so that our tty_push actually forces the data
	 * through, otherwise it is scheduled, and with high data rates (like
	 * with OHCI) data can get lost.
	 */
	if (tty)
		tty->low_latency = 1;

	spin_lock_irqsave(&garmin_data_p->lock, flags);
	garmin_data_p->mode  = initial_mode;
	garmin_data_p->count = 0;
+0 −6
Original line number Diff line number Diff line
@@ -122,12 +122,6 @@ int usb_serial_generic_open(struct tty_struct *tty,

	dbg("%s - port %d", __func__, port->number);

	/* force low_latency on so that our tty_push actually forces the data
	   through, otherwise it is scheduled, and with high data rates (like
	   with OHCI) data can get lost. */
	if (tty)
		tty->low_latency = 1;

	/* clear the throttle flags */
	spin_lock_irqsave(&port->lock, flags);
	port->throttled = 0;
Loading