summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorJim Paris2014-10-30 16:04:47 +0100
committerGreg Kroah-Hartman2014-11-04 00:26:15 +0100
commit24cb4502c97b0c9bed90aae0225adb92088783d3 (patch)
treed5571a7923e2f7559d0456eaa3a9cf27f983af01 /drivers/usb/class/cdc-acm.c
parentUSB: cdc-acm: add device id for GW Instek AFG-2225 (diff)
downloadkernel-qcow2-linux-24cb4502c97b0c9bed90aae0225adb92088783d3.tar.gz
kernel-qcow2-linux-24cb4502c97b0c9bed90aae0225adb92088783d3.tar.xz
kernel-qcow2-linux-24cb4502c97b0c9bed90aae0225adb92088783d3.zip
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: 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>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 959343b891c7..6771f884cb82 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -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.
*/