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