Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275836
b: refs/heads/master
c: b1ffb4c
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Worsley authored and Greg Kroah-Hartman committed Nov 18, 2011
1 parent d0b65db commit 878af88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4aa3648c719265bac9c2742c9ebb043e6dbdd790
refs/heads/master: b1ffb4c851f185e9051ba837c16d9b84ef688d26
14 changes: 11 additions & 3 deletions trunk/drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2104,13 +2104,19 @@ static void ftdi_set_termios(struct tty_struct *tty,

cflag = termios->c_cflag;

/* FIXME -For this cut I don't care if the line is really changing or
not - so just do the change regardless - should be able to
compare old_termios and tty->termios */
if (old_termios->c_cflag == termios->c_cflag
&& old_termios->c_ispeed == termios->c_ispeed
&& old_termios->c_ospeed == termios->c_ospeed)
goto no_c_cflag_changes;

/* NOTE These routines can get interrupted by
ftdi_sio_read_bulk_callback - need to examine what this means -
don't see any problems yet */

if ((old_termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)) ==
(termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)))
goto no_data_parity_stop_changes;

/* Set number of data bits, parity, stop bits */

urb_value = 0;
Expand Down Expand Up @@ -2151,6 +2157,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
}

/* Now do the baudrate */
no_data_parity_stop_changes:
if ((cflag & CBAUD) == B0) {
/* Disable flow control */
if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
Expand Down Expand Up @@ -2178,6 +2185,7 @@ static void ftdi_set_termios(struct tty_struct *tty,

/* Set flow control */
/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
no_c_cflag_changes:
if (cflag & CRTSCTS) {
dbg("%s Setting to CRTSCTS flow control", __func__);
if (usb_control_msg(dev,
Expand Down

0 comments on commit 878af88

Please sign in to comment.