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

Commit d7be6221 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: serial: set drain delay at port probe



The port drain delay is constant and should be set at port probe rather
than open.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5f45304
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -495,6 +495,8 @@ static int cypress_generic_port_probe(struct usb_serial_port *port)
	}
	usb_set_serial_port_data(port, priv);

	port->port.drain_delay = 256;

	return 0;
}

@@ -625,7 +627,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
							__func__, result);
		cypress_set_dead(port);
	}
	port->port.drain_delay = 256;

	return result;
} /* cypress_open */

+2 −1
Original line number Diff line number Diff line
@@ -207,7 +207,6 @@ static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port)
		return result;
	}

	port->port.drain_delay = 256;
	return 0;
}

@@ -322,6 +321,8 @@ static int f81232_port_probe(struct usb_serial_port *port)

	usb_set_serial_port_data(port, priv);

	port->port.drain_delay = 256;

	return 0;
}

+1 −2
Original line number Diff line number Diff line
@@ -1872,8 +1872,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)

	++edge_serial->num_ports_open;

	port->port.drain_delay = 1;

	goto release_es_lock;

unlink_int_urb:
@@ -2473,6 +2471,7 @@ static int edge_port_probe(struct usb_serial_port *port)
	}

	port->port.closing_wait = msecs_to_jiffies(closing_wait * 10);
	port->port.drain_delay = 1;

	return 0;
}
+3 −1
Original line number Diff line number Diff line
@@ -343,6 +343,8 @@ static int oti6858_port_probe(struct usb_serial_port *port)

	usb_set_serial_port_data(port, priv);

	port->port.drain_delay = 256;	/* FIXME: check the FIFO length */

	return 0;
}

@@ -558,7 +560,7 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
	/* setup termios */
	if (tty)
		oti6858_set_termios(tty, port, &tmp_termios);
	port->port.drain_delay = 256;	/* FIXME: check the FIFO length */

	return 0;
}

+2 −1
Original line number Diff line number Diff line
@@ -235,6 +235,8 @@ static int pl2303_port_probe(struct usb_serial_port *port)

	usb_set_serial_port_data(port, priv);

	port->port.drain_delay = 256;

	return 0;
}

@@ -521,7 +523,6 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
		return result;
	}

	port->port.drain_delay = 256;
	return 0;
}

Loading