usb: serial: option: add Olivetti Olicard 200
[pandora-kernel.git] / drivers / usb / serial / ftdi_sio.c
index d34df4b..ce9f87f 100644 (file)
@@ -197,6 +197,8 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_BOOST_PID) },
        { USB_DEVICE(NEWPORT_VID, NEWPORT_AGILIS_PID) },
+       { USB_DEVICE(NEWPORT_VID, NEWPORT_CONEX_CC_PID) },
+       { USB_DEVICE(NEWPORT_VID, NEWPORT_CONEX_AGP_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
@@ -1819,8 +1821,11 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
 }
 
 /*
- * First and second port on STMCLiteadaptors is reserved for JTAG interface
- * and the forth port for pio
+ * First two ports on JTAG adaptors using an FT4232 such as STMicroelectronics's
+ * ST Micro Connect Lite are reserved for JTAG or other non-UART interfaces and
+ * can be accessed from userspace.
+ * The next two ports are enabled as UARTs by default, where port 2 is
+ * a conventional RS-232 UART.
  */
 static int ftdi_stmclite_probe(struct usb_serial *serial)
 {
@@ -1829,12 +1834,13 @@ static int ftdi_stmclite_probe(struct usb_serial *serial)
 
        dbg("%s", __func__);
 
-       if (interface == udev->actconfig->interface[2])
-               return 0;
-
-       dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n");
+       if (interface == udev->actconfig->interface[0] ||
+           interface == udev->actconfig->interface[1]) {
+               dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n");
+               return -ENODEV;
+       }
 
-       return -ENODEV;
+       return 0;
 }
 
 /*
@@ -2163,6 +2169,9 @@ static void ftdi_set_termios(struct tty_struct *tty,
 
        cflag = termios->c_cflag;
 
+       if (!old_termios)
+               goto no_skip;
+
        if (old_termios->c_cflag == termios->c_cflag
            && old_termios->c_ispeed == termios->c_ispeed
            && old_termios->c_ospeed == termios->c_ospeed)
@@ -2176,6 +2185,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
            (termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)))
                goto no_data_parity_stop_changes;
 
+no_skip:
        /* Set number of data bits, parity, stop bits */
 
        urb_value = 0;