diff options
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 8fe034d2d3e7..bd4298bb6750 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -2104,13 +2104,19 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2104 | 2104 | ||
2105 | cflag = termios->c_cflag; | 2105 | cflag = termios->c_cflag; |
2106 | 2106 | ||
2107 | /* FIXME -For this cut I don't care if the line is really changing or | 2107 | if (old_termios->c_cflag == termios->c_cflag |
2108 | not - so just do the change regardless - should be able to | 2108 | && old_termios->c_ispeed == termios->c_ispeed |
2109 | compare old_termios and tty->termios */ | 2109 | && old_termios->c_ospeed == termios->c_ospeed) |
2110 | goto no_c_cflag_changes; | ||
2111 | |||
2110 | /* NOTE These routines can get interrupted by | 2112 | /* NOTE These routines can get interrupted by |
2111 | ftdi_sio_read_bulk_callback - need to examine what this means - | 2113 | ftdi_sio_read_bulk_callback - need to examine what this means - |
2112 | don't see any problems yet */ | 2114 | don't see any problems yet */ |
2113 | 2115 | ||
2116 | if ((old_termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)) == | ||
2117 | (termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB))) | ||
2118 | goto no_data_parity_stop_changes; | ||
2119 | |||
2114 | /* Set number of data bits, parity, stop bits */ | 2120 | /* Set number of data bits, parity, stop bits */ |
2115 | 2121 | ||
2116 | urb_value = 0; | 2122 | urb_value = 0; |
@@ -2151,6 +2157,7 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2151 | } | 2157 | } |
2152 | 2158 | ||
2153 | /* Now do the baudrate */ | 2159 | /* Now do the baudrate */ |
2160 | no_data_parity_stop_changes: | ||
2154 | if ((cflag & CBAUD) == B0) { | 2161 | if ((cflag & CBAUD) == B0) { |
2155 | /* Disable flow control */ | 2162 | /* Disable flow control */ |
2156 | if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 2163 | if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
@@ -2178,6 +2185,7 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2178 | 2185 | ||
2179 | /* Set flow control */ | 2186 | /* Set flow control */ |
2180 | /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ | 2187 | /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ |
2188 | no_c_cflag_changes: | ||
2181 | if (cflag & CRTSCTS) { | 2189 | if (cflag & CRTSCTS) { |
2182 | dbg("%s Setting to CRTSCTS flow control", __func__); | 2190 | dbg("%s Setting to CRTSCTS flow control", __func__); |
2183 | if (usb_control_msg(dev, | 2191 | if (usb_control_msg(dev, |