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

Commit 24cb4502 authored by Jim Paris's avatar Jim Paris Committed by Greg Kroah-Hartman
Browse files

cdc-acm: ensure that termios get set when the port is activated



The driver wasn't properly configuring the hardware for the current
termios settings under all conditions.  Ensure that termios are
written to the device when the port is activated.

Signed-off-by: default avatarJim Paris <jim@jtan.com>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf84a691
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ static struct acm *acm_table[ACM_TTY_MINORS];

static DEFINE_MUTEX(acm_table_lock);

static void acm_tty_set_termios(struct tty_struct *tty,
				struct ktermios *termios_old);

/*
 * acm_table accessors
 */
@@ -554,6 +557,8 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
		goto error_submit_urb;
	}

	acm_tty_set_termios(tty, NULL);

	/*
	 * Unthrottle device in case the TTY was closed while throttled.
	 */