Skip to content

Commit

Permalink
cdc-acm: ensure that termios get set when the port is activated
Browse files Browse the repository at this point in the history
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: Jim Paris <jim@jtan.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jim Paris authored and Greg Kroah-Hartman committed Nov 3, 2014
1 parent cf84a69 commit 24cb450
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 24cb450

Please sign in to comment.