aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 01b6404df395..ad654f8208ef 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -797,6 +797,7 @@ static struct usb_device_id id_table_combined [] = {
797 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 797 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
798 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID), 798 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
799 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 799 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
800 { USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) },
800 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, 801 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
801 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), 802 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
802 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 803 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
@@ -805,6 +806,8 @@ static struct usb_device_id id_table_combined [] = {
805 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, 806 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
806 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), 807 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
807 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 808 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
809 { USB_DEVICE(FTDI_VID, TI_XDS100V2_PID),
810 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
808 { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) }, 811 { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
809 { USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) }, 812 { USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) },
810 { USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) }, 813 { USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) },
@@ -841,6 +844,7 @@ static struct usb_device_id id_table_combined [] = {
841 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 844 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
842 { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), 845 { USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
843 .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, 846 .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
847 { USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
844 { }, /* Optional parameter entry */ 848 { }, /* Optional parameter entry */
845 { } /* Terminating entry */ 849 { } /* Terminating entry */
846}; 850};
@@ -1333,8 +1337,7 @@ static int set_serial_info(struct tty_struct *tty,
1333 goto check_and_exit; 1337 goto check_and_exit;
1334 } 1338 }
1335 1339
1336 if ((new_serial.baud_base != priv->baud_base) && 1340 if (new_serial.baud_base != priv->baud_base) {
1337 (new_serial.baud_base < 9600)) {
1338 mutex_unlock(&priv->cfg_lock); 1341 mutex_unlock(&priv->cfg_lock);
1339 return -EINVAL; 1342 return -EINVAL;
1340 } 1343 }
@@ -1824,6 +1827,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
1824 1827
1825static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) 1828static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
1826{ 1829{
1830 struct ktermios dummy;
1827 struct usb_device *dev = port->serial->dev; 1831 struct usb_device *dev = port->serial->dev;
1828 struct ftdi_private *priv = usb_get_serial_port_data(port); 1832 struct ftdi_private *priv = usb_get_serial_port_data(port);
1829 int result; 1833 int result;
@@ -1842,8 +1846,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
1842 This is same behaviour as serial.c/rs_open() - Kuba */ 1846 This is same behaviour as serial.c/rs_open() - Kuba */
1843 1847
1844 /* ftdi_set_termios will send usb control messages */ 1848 /* ftdi_set_termios will send usb control messages */
1845 if (tty) 1849 if (tty) {
1846 ftdi_set_termios(tty, port, tty->termios); 1850 memset(&dummy, 0, sizeof(dummy));
1851 ftdi_set_termios(tty, port, &dummy);
1852 }
1847 1853
1848 /* Start reading from the device */ 1854 /* Start reading from the device */
1849 result = usb_serial_generic_open(tty, port); 1855 result = usb_serial_generic_open(tty, port);