patch "USB: serial: ch341: fix open and resume after B0" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: ch341: fix open and resume after B0
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
a20047f36e2f6a1eea4f1fd261aaa55882369868Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 6 Jan 2017 19:15:11 +0100
Subject: USB: serial: ch341: fix open and resume after B0
The private baud_rate variable is used to configure the port at open and reset-resume and must never be set to (and left at) zero or reset-resume and all further open attempts will fail.
struct")
--- drivers/usb/serial/ch341.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/serial/ch341.c +3 -1
@@ -355,7 +355,6 @@ static void ch341_set_termios(struct tty_struct *tty, baud_rate =tty_get_baud_rate (tty); - priv->baud_rate = baud_rate; ctrl =CH341_LCR_ENABLE_RX |CH341_LCR_ENABLE_TX ;switch (C_CSIZE (tty)) {
@@ -388,6 +387,9 @@ static void ch341_set_termios(struct tty_struct *tty,spin_lock_irqsave (&priv->lock, flags); priv->line_control |= (CH341_BIT_DTR |CH341_BIT_RTS );spin_unlock_irqrestore (&priv->lock, flags); + + priv->baud_rate = baud_rate; + r =ch341_init_set_baudrate (port->serial->dev, priv, ctrl);if (r <0 && old_termios) { priv->baud_rate =tty_termios_baud_rate (old_termios);
Signature · 1 line
2.11.0