Skip to contentSkip to conversation

USB: pl2303: fix DTR/RTS being raised on baud rate change

PATCH New Johan Hovold 1 participant 1 message Mar 23, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20120323142249.GB11407@localhost

#1 lore raw

PATCH 1/1 USB: pl2303: fix DTR/RTS being raised on baud rate change

DTR/RTS should only be raised when changing baudrate from B0 and not on any baud rate change (> B0).

---
 drivers/usb/serial/pl2303.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/serial/pl2303.c +1 -1
index 052c401..c3b1911 100644
@@ -420,7 +420,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
 	control = priv->line_control;
 	if ((cflag & CBAUD) == B0)
 		priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
-	else
+	else if ((old_termios->c_cflag & CBAUD) == B0)
 		priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
 	if (control != priv->line_control) {
 		control = priv->line_control;
Signature · 1 line
1.7.8.5