aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/Kconfig9
-rw-r--r--drivers/usb/serial/Makefile1
-rw-r--r--drivers/usb/serial/airprime.c63
-rw-r--r--drivers/usb/serial/cypress_m8.c187
-rw-r--r--drivers/usb/serial/ftdi_sio.c46
-rw-r--r--drivers/usb/serial/ftdi_sio.h36
-rw-r--r--drivers/usb/serial/io_usbvend.h2
-rw-r--r--drivers/usb/serial/keyspan_usa90msg.h2
8 files changed, 226 insertions, 120 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index 0c4aa00bb39d..bc798edf0358 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -53,6 +53,15 @@ config USB_SERIAL_GENERIC
53 support" be compiled as a module for this driver to be used 53 support" be compiled as a module for this driver to be used
54 properly. 54 properly.
55 55
56config USB_SERIAL_AIRPRIME
57 tristate "USB AirPrime CDMA Wireless Driver"
58 depends on USB_SERIAL
59 help
60 Say Y here if you want to use a AirPrime CDMA Wireless PC card.
61
62 To compile this driver as a module, choose M here: the
63 module will be called airprime.
64
56config USB_SERIAL_BELKIN 65config USB_SERIAL_BELKIN
57 tristate "USB Belkin and Peracom Single Port Serial Driver" 66 tristate "USB Belkin and Peracom Single Port Serial Driver"
58 depends on USB_SERIAL 67 depends on USB_SERIAL
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
index b0aac47d1959..d56ff6d86cce 100644
--- a/drivers/usb/serial/Makefile
+++ b/drivers/usb/serial/Makefile
@@ -11,6 +11,7 @@ usbserial-obj-$(CONFIG_USB_EZUSB) += ezusb.o
11 11
12usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y) 12usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y)
13 13
14obj-$(CONFIG_USB_SERIAL_AIRPRIME) += airprime.o
14obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o 15obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
15obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o 16obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o
16obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o 17obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
new file mode 100644
index 000000000000..a4ce0008d69b
--- /dev/null
+++ b/drivers/usb/serial/airprime.c
@@ -0,0 +1,63 @@
1/*
2 * AirPrime CDMA Wireless Serial USB driver
3 *
4 * Copyright (C) 2005 Greg Kroah-Hartman <gregkh@suse.de>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version
8 * 2 as published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/tty.h>
14#include <linux/module.h>
15#include <linux/usb.h>
16#include "usb-serial.h"
17
18static struct usb_device_id id_table [] = {
19 { USB_DEVICE(0xf3d, 0x0112) },
20 { },
21};
22MODULE_DEVICE_TABLE(usb, id_table);
23
24static struct usb_driver airprime_driver = {
25 .owner = THIS_MODULE,
26 .name = "airprime",
27 .probe = usb_serial_probe,
28 .disconnect = usb_serial_disconnect,
29 .id_table = id_table,
30};
31
32static struct usb_serial_device_type airprime_device = {
33 .owner = THIS_MODULE,
34 .name = "airprime",
35 .id_table = id_table,
36 .num_interrupt_in = NUM_DONT_CARE,
37 .num_bulk_in = NUM_DONT_CARE,
38 .num_bulk_out = NUM_DONT_CARE,
39 .num_ports = 1,
40};
41
42static int __init airprime_init(void)
43{
44 int retval;
45
46 retval = usb_serial_register(&airprime_device);
47 if (retval)
48 return retval;
49 retval = usb_register(&airprime_driver);
50 if (retval)
51 usb_serial_deregister(&airprime_device);
52 return retval;
53}
54
55static void __exit airprime_exit(void)
56{
57 usb_deregister(&airprime_driver);
58 usb_serial_deregister(&airprime_device);
59}
60
61module_init(airprime_init);
62module_exit(airprime_exit);
63MODULE_LICENSE("GPL");
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index d165f42d560d..f34a9bb6a219 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -16,6 +16,14 @@
16 * See http://geocities.com/i0xox0i for information on this driver and the 16 * See http://geocities.com/i0xox0i for information on this driver and the
17 * earthmate usb device. 17 * earthmate usb device.
18 * 18 *
19 * Lonnie Mendez <dignome@gmail.com>
20 * 4-29-2005
21 * Fixed problem where setting or retreiving the serial config would fail with
22 * EPIPE. Removed CRTS toggling so the driver behaves more like other usbserial
23 * adapters. Issued new interval of 1ms instead of the default 10ms. As a
24 * result, transfer speed has been substantially increased. From avg. 850bps to
25 * avg. 3300bps. initial termios has also been modified. Cleaned up code and
26 * formatting issues so it is more readable. Replaced the C++ style comments.
19 * 27 *
20 * Lonnie Mendez <dignome@gmail.com> 28 * Lonnie Mendez <dignome@gmail.com>
21 * 12-15-2004 29 * 12-15-2004
@@ -32,12 +40,6 @@
32 * 10-2003 40 * 10-2003
33 * Driver first released. 41 * Driver first released.
34 * 42 *
35 *
36 * Long Term TODO:
37 * Improve transfer speeds - both read/write are somewhat slow
38 * at this point.
39 * Improve debugging. Show modem line status with debug output and
40 * implement filtering for certain data as a module parameter.
41 */ 43 */
42 44
43/* Thanks to Neil Whelchel for writing the first cypress m8 implementation for linux. */ 45/* Thanks to Neil Whelchel for writing the first cypress m8 implementation for linux. */
@@ -72,11 +74,12 @@
72 static int debug; 74 static int debug;
73#endif 75#endif
74static int stats; 76static int stats;
77static int interval;
75 78
76/* 79/*
77 * Version Information 80 * Version Information
78 */ 81 */
79#define DRIVER_VERSION "v1.08" 82#define DRIVER_VERSION "v1.09"
80#define DRIVER_AUTHOR "Lonnie Mendez <dignome@gmail.com>, Neil Whelchel <koyama@firstlight.net>" 83#define DRIVER_AUTHOR "Lonnie Mendez <dignome@gmail.com>, Neil Whelchel <koyama@firstlight.net>"
81#define DRIVER_DESC "Cypress USB to Serial Driver" 84#define DRIVER_DESC "Cypress USB to Serial Driver"
82 85
@@ -130,7 +133,6 @@ struct cypress_private {
130 char prev_status, diff_status; /* used for TIOCMIWAIT */ 133 char prev_status, diff_status; /* used for TIOCMIWAIT */
131 /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */ 134 /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */
132 struct termios tmp_termios; /* stores the old termios settings */ 135 struct termios tmp_termios; /* stores the old termios settings */
133 char calledfromopen; /* used when issuing lines on open - fixes rts drop bug */
134}; 136};
135 137
136/* write buffer structure */ 138/* write buffer structure */
@@ -168,10 +170,8 @@ static void cypress_buf_free(struct cypress_buf *cb);
168static void cypress_buf_clear(struct cypress_buf *cb); 170static void cypress_buf_clear(struct cypress_buf *cb);
169static unsigned int cypress_buf_data_avail(struct cypress_buf *cb); 171static unsigned int cypress_buf_data_avail(struct cypress_buf *cb);
170static unsigned int cypress_buf_space_avail(struct cypress_buf *cb); 172static unsigned int cypress_buf_space_avail(struct cypress_buf *cb);
171static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf, 173static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf, unsigned int count);
172 unsigned int count); 174static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigned int count);
173static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf,
174 unsigned int count);
175 175
176 176
177static struct usb_serial_device_type cypress_earthmate_device = { 177static struct usb_serial_device_type cypress_earthmate_device = {
@@ -234,14 +234,13 @@ static struct usb_serial_device_type cypress_hidcom_device = {
234 *****************************************************************************/ 234 *****************************************************************************/
235 235
236 236
237/* This function can either set or retreive the current serial line settings */ 237/* This function can either set or retrieve the current serial line settings */
238static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits, 238static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits,
239 int parity_enable, int parity_type, int reset, int cypress_request_type) 239 int parity_enable, int parity_type, int reset, int cypress_request_type)
240{ 240{
241 int i, n_baud_rate = 0, retval = 0; 241 int new_baudrate = 0, retval = 0, tries = 0;
242 struct cypress_private *priv; 242 struct cypress_private *priv;
243 __u8 feature_buffer[5]; 243 __u8 feature_buffer[8];
244 __u8 config;
245 unsigned long flags; 244 unsigned long flags;
246 245
247 dbg("%s", __FUNCTION__); 246 dbg("%s", __FUNCTION__);
@@ -256,7 +255,8 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m
256 * of 57600bps (I have no idea whether DeLorme chose to use the general purpose 255 * of 57600bps (I have no idea whether DeLorme chose to use the general purpose
257 * firmware or not), if you need to modify this speed setting for your own 256 * firmware or not), if you need to modify this speed setting for your own
258 * project please add your own chiptype and modify the code likewise. The 257 * project please add your own chiptype and modify the code likewise. The
259 * Cypress HID->COM device will work successfully up to 115200bps. 258 * Cypress HID->COM device will work successfully up to 115200bps (but the
259 * actual throughput is around 3kBps).
260 */ 260 */
261 if (baud_mask != priv->cbr_mask) { 261 if (baud_mask != priv->cbr_mask) {
262 dbg("%s - baud rate is changing", __FUNCTION__); 262 dbg("%s - baud rate is changing", __FUNCTION__);
@@ -265,109 +265,114 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m
265 * but are not used with NMEA and SiRF protocols */ 265 * but are not used with NMEA and SiRF protocols */
266 266
267 if ( (baud_mask == B300) || (baud_mask == B600) ) { 267 if ( (baud_mask == B300) || (baud_mask == B600) ) {
268 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 268 err("%s - failed setting baud rate, unsupported speed",
269 __FUNCTION__); 269 __FUNCTION__);
270 n_baud_rate = 4800; 270 new_baudrate = priv->baud_rate;
271 } else if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 271 } else if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
272 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 272 err("%s - failed setting baud rate, unsupported speed",
273 __FUNCTION__); 273 __FUNCTION__);
274 n_baud_rate = 4800; 274 new_baudrate = priv->baud_rate;
275 } 275 }
276 } else if (priv->chiptype == CT_CYPHIDCOM) { 276 } else if (priv->chiptype == CT_CYPHIDCOM) {
277 if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 277 if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
278 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 278 err("%s - failed setting baud rate, unsupported speed",
279 __FUNCTION__); 279 __FUNCTION__);
280 n_baud_rate = 4800; 280 new_baudrate = priv->baud_rate;
281 } 281 }
282 } else if (priv->chiptype == CT_GENERIC) { 282 } else if (priv->chiptype == CT_GENERIC) {
283 if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 283 if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
284 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 284 err("%s - failed setting baud rate, unsupported speed",
285 __FUNCTION__); 285 __FUNCTION__);
286 n_baud_rate = 4800; 286 new_baudrate = priv->baud_rate;
287 } 287 }
288 } else { 288 } else {
289 info("%s - please define your chiptype, using 4800bps default", __FUNCTION__); 289 info("%s - please define your chiptype", __FUNCTION__);
290 n_baud_rate = 4800; 290 new_baudrate = priv->baud_rate;
291 } 291 }
292 } else { /* baud rate not changing, keep the old */ 292 } else { /* baud rate not changing, keep the old */
293 n_baud_rate = priv->baud_rate; 293 new_baudrate = priv->baud_rate;
294 } 294 }
295 dbg("%s - baud rate is being sent as %d", __FUNCTION__, n_baud_rate); 295 dbg("%s - baud rate is being sent as %d", __FUNCTION__, new_baudrate);
296
297 296
298 /* 297 memset(feature_buffer, 0, 8);
299 * This algorithm accredited to Jiang Jay Zhang... thanks for all the help! 298 /* fill the feature_buffer with new configuration */
300 */ 299 *((u_int32_t *)feature_buffer) = new_baudrate;
301 for (i = 0; i < 4; ++i) {
302 feature_buffer[i] = ( n_baud_rate >> (i*8) & 0xFF );
303 }
304 300
305 config = 0; // reset config byte 301 feature_buffer[4] |= data_bits; /* assign data bits in 2 bit space ( max 3 ) */
306 config |= data_bits; // assign data bits in 2 bit space ( max 3 )
307 /* 1 bit gap */ 302 /* 1 bit gap */
308 config |= (stop_bits << 3); // assign stop bits in 1 bit space 303 feature_buffer[4] |= (stop_bits << 3); /* assign stop bits in 1 bit space */
309 config |= (parity_enable << 4); // assign parity flag in 1 bit space 304 feature_buffer[4] |= (parity_enable << 4); /* assign parity flag in 1 bit space */
310 config |= (parity_type << 5); // assign parity type in 1 bit space 305 feature_buffer[4] |= (parity_type << 5); /* assign parity type in 1 bit space */
311 /* 1 bit gap */ 306 /* 1 bit gap */
312 config |= (reset << 7); // assign reset at end of byte, 1 bit space 307 feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */
313
314 feature_buffer[4] = config;
315 308
316 dbg("%s - device is being sent this feature report:", __FUNCTION__); 309 dbg("%s - device is being sent this feature report:", __FUNCTION__);
317 dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1], 310 dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1],
318 feature_buffer[2], feature_buffer[3], feature_buffer[4]); 311 feature_buffer[2], feature_buffer[3], feature_buffer[4]);
319 312
313 do {
320 retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0), 314 retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0),
321 HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS, 315 HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
322 0x0300, 0, feature_buffer, 5, 500); 316 0x0300, 0, feature_buffer, 8, 500);
317
318 if (tries++ >= 3)
319 break;
323 320
324 if (retval != 5) 321 if (retval == EPIPE)
322 usb_clear_halt(port->serial->dev, 0x00);
323 } while (retval != 8 && retval != ENODEV);
324
325 if (retval != 8)
325 err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); 326 err("%s - failed sending serial line settings - %d", __FUNCTION__, retval);
326 else { 327 else {
327 spin_lock_irqsave(&priv->lock, flags); 328 spin_lock_irqsave(&priv->lock, flags);
328 priv->baud_rate = n_baud_rate; 329 priv->baud_rate = new_baudrate;
329 priv->cbr_mask = baud_mask; 330 priv->cbr_mask = baud_mask;
330 priv->current_config = config; 331 priv->current_config = feature_buffer[4];
331 ++priv->cmd_count;
332 spin_unlock_irqrestore(&priv->lock, flags); 332 spin_unlock_irqrestore(&priv->lock, flags);
333 } 333 }
334 break; 334 break;
335 case CYPRESS_GET_CONFIG: 335 case CYPRESS_GET_CONFIG:
336 dbg("%s - retreiving serial line settings", __FUNCTION__); 336 dbg("%s - retreiving serial line settings", __FUNCTION__);
337 /* reset values in feature buffer */ 337 /* set initial values in feature buffer */
338 memset(feature_buffer, 0, 5); 338 memset(feature_buffer, 0, 8);
339 339
340 do {
340 retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0), 341 retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0),
341 HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS, 342 HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
342 0x0300, 0, feature_buffer, 5, 500); 343 0x0300, 0, feature_buffer, 8, 500);
344
345 if (tries++ >= 3)
346 break;
347
348 if (retval == EPIPE)
349 usb_clear_halt(port->serial->dev, 0x00);
350 } while (retval != 5 && retval != ENODEV);
351
343 if (retval != 5) { 352 if (retval != 5) {
344 err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval); 353 err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval);
345 return retval; 354 return retval;
346 } else { 355 } else {
347 spin_lock_irqsave(&priv->lock, flags); 356 spin_lock_irqsave(&priv->lock, flags);
357
348 /* store the config in one byte, and later use bit masks to check values */ 358 /* store the config in one byte, and later use bit masks to check values */
349 priv->current_config = feature_buffer[4]; 359 priv->current_config = feature_buffer[4];
350 /* reverse the process above to get the baud_mask value */ 360 priv->baud_rate = *((u_int32_t *)feature_buffer);
351 n_baud_rate = 0; // reset bits
352 for (i = 0; i < 4; ++i) {
353 n_baud_rate |= ( feature_buffer[i] << (i*8) );
354 }
355 361
356 priv->baud_rate = n_baud_rate; 362 if ( (priv->cbr_mask = rate_to_mask(priv->baud_rate)) == 0x40)
357 if ( (priv->cbr_mask = rate_to_mask(n_baud_rate)) == 0x40)
358 dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__); 363 dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__);
359 ++priv->cmd_count;
360 spin_unlock_irqrestore(&priv->lock, flags); 364 spin_unlock_irqrestore(&priv->lock, flags);
361 } 365 }
362 break;
363 default:
364 err("%s - unsupported serial control command issued", __FUNCTION__);
365 } 366 }
367 spin_lock_irqsave(&priv->lock, flags);
368 ++priv->cmd_count;
369 spin_unlock_irqrestore(&priv->lock, flags);
370
366 return retval; 371 return retval;
367} /* cypress_serial_control */ 372} /* cypress_serial_control */
368 373
369 374
370/* given a baud mask, it will return speed on success */ 375/* given a baud mask, it will return integer baud on success */
371static int mask_to_rate (unsigned mask) 376static int mask_to_rate (unsigned mask)
372{ 377{
373 int rate; 378 int rate;
@@ -438,11 +443,12 @@ static int generic_startup (struct usb_serial *serial)
438 443
439 usb_reset_configuration (serial->dev); 444 usb_reset_configuration (serial->dev);
440 445
446 interval = 1;
441 priv->cmd_ctrl = 0; 447 priv->cmd_ctrl = 0;
442 priv->line_control = 0; 448 priv->line_control = 0;
443 priv->termios_initialized = 0; 449 priv->termios_initialized = 0;
444 priv->calledfromopen = 0;
445 priv->rx_flags = 0; 450 priv->rx_flags = 0;
451 priv->cbr_mask = B300;
446 usb_set_serial_port_data(serial->port[0], priv); 452 usb_set_serial_port_data(serial->port[0], priv);
447 453
448 return (0); 454 return (0);
@@ -513,7 +519,6 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
513 dbg("%s - port %d", __FUNCTION__, port->number); 519 dbg("%s - port %d", __FUNCTION__, port->number);
514 520
515 /* clear halts before open */ 521 /* clear halts before open */
516 usb_clear_halt(serial->dev, 0x00);
517 usb_clear_halt(serial->dev, 0x81); 522 usb_clear_halt(serial->dev, 0x81);
518 usb_clear_halt(serial->dev, 0x02); 523 usb_clear_halt(serial->dev, 0x02);
519 524
@@ -531,7 +536,6 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
531 /* raise both lines and set termios */ 536 /* raise both lines and set termios */
532 spin_lock_irqsave(&priv->lock, flags); 537 spin_lock_irqsave(&priv->lock, flags);
533 priv->line_control = CONTROL_DTR | CONTROL_RTS; 538 priv->line_control = CONTROL_DTR | CONTROL_RTS;
534 priv->calledfromopen = 1;
535 priv->cmd_ctrl = 1; 539 priv->cmd_ctrl = 1;
536 spin_unlock_irqrestore(&priv->lock, flags); 540 spin_unlock_irqrestore(&priv->lock, flags);
537 result = cypress_write(port, NULL, 0); 541 result = cypress_write(port, NULL, 0);
@@ -553,7 +557,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
553 usb_fill_int_urb(port->interrupt_in_urb, serial->dev, 557 usb_fill_int_urb(port->interrupt_in_urb, serial->dev,
554 usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress), 558 usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress),
555 port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length, 559 port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length,
556 cypress_read_int_callback, port, port->interrupt_in_urb->interval); 560 cypress_read_int_callback, port, interval);
557 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 561 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
558 562
559 if (result){ 563 if (result){
@@ -680,12 +684,12 @@ static void cypress_send(struct usb_serial_port *port)
680 spin_lock_irqsave(&priv->lock, flags); 684 spin_lock_irqsave(&priv->lock, flags);
681 switch (port->interrupt_out_size) { 685 switch (port->interrupt_out_size) {
682 case 32: 686 case 32:
683 // this is for the CY7C64013... 687 /* this is for the CY7C64013... */
684 offset = 2; 688 offset = 2;
685 port->interrupt_out_buffer[0] = priv->line_control; 689 port->interrupt_out_buffer[0] = priv->line_control;
686 break; 690 break;
687 case 8: 691 case 8:
688 // this is for the CY7C63743... 692 /* this is for the CY7C63743... */
689 offset = 1; 693 offset = 1;
690 port->interrupt_out_buffer[0] = priv->line_control; 694 port->interrupt_out_buffer[0] = priv->line_control;
691 break; 695 break;
@@ -738,6 +742,7 @@ send:
738 742
739 port->interrupt_out_urb->transfer_buffer_length = actual_size; 743 port->interrupt_out_urb->transfer_buffer_length = actual_size;
740 port->interrupt_out_urb->dev = port->serial->dev; 744 port->interrupt_out_urb->dev = port->serial->dev;
745 port->interrupt_out_urb->interval = interval;
741 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); 746 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
742 if (result) { 747 if (result) {
743 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, 748 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__,
@@ -910,7 +915,7 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
910 unsigned cflag, iflag, baud_mask; 915 unsigned cflag, iflag, baud_mask;
911 unsigned long flags; 916 unsigned long flags;
912 __u8 oldlines; 917 __u8 oldlines;
913 int linechange; 918 int linechange = 0;
914 919
915 dbg("%s - port %d", __FUNCTION__, port->number); 920 dbg("%s - port %d", __FUNCTION__, port->number);
916 921
@@ -996,15 +1001,7 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
996 case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break; 1001 case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break;
997 default: dbg("%s - unknown masked baud rate", __FUNCTION__); 1002 default: dbg("%s - unknown masked baud rate", __FUNCTION__);
998 } 1003 }
999 priv->line_control |= CONTROL_DTR; 1004 priv->line_control = (CONTROL_DTR | CONTROL_RTS);
1000
1001 /* toggle CRTSCTS? - don't do this if being called from cypress_open */
1002 if (!priv->calledfromopen) {
1003 if (cflag & CRTSCTS)
1004 priv->line_control |= CONTROL_RTS;
1005 else
1006 priv->line_control &= ~CONTROL_RTS;
1007 }
1008 } 1005 }
1009 spin_unlock_irqrestore(&priv->lock, flags); 1006 spin_unlock_irqrestore(&priv->lock, flags);
1010 1007
@@ -1014,8 +1011,6 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1014 cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable, 1011 cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable,
1015 parity_type, 0, CYPRESS_SET_CONFIG); 1012 parity_type, 0, CYPRESS_SET_CONFIG);
1016 1013
1017 msleep(50); /* give some time between change and read (50ms) */
1018
1019 /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure 1014 /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure
1020 * this should confirm that all is working if it returns what we just set */ 1015 * this should confirm that all is working if it returns what we just set */
1021 cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG); 1016 cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG);
@@ -1031,7 +1026,6 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1031 dbg("Using custom termios settings for a baud rate of 4800bps."); 1026 dbg("Using custom termios settings for a baud rate of 4800bps.");
1032 /* define custom termios settings for NMEA protocol */ 1027 /* define custom termios settings for NMEA protocol */
1033 1028
1034
1035 tty->termios->c_iflag /* input modes - */ 1029 tty->termios->c_iflag /* input modes - */
1036 &= ~(IGNBRK /* disable ignore break */ 1030 &= ~(IGNBRK /* disable ignore break */
1037 | BRKINT /* disable break causes interrupt */ 1031 | BRKINT /* disable break causes interrupt */
@@ -1052,23 +1046,16 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1052 | ISIG /* disable interrupt, quit, and suspend special characters */ 1046 | ISIG /* disable interrupt, quit, and suspend special characters */
1053 | IEXTEN); /* disable non-POSIX special characters */ 1047 | IEXTEN); /* disable non-POSIX special characters */
1054 1048
1055 } else if (priv->chiptype == CT_CYPHIDCOM) { 1049 } /* CT_CYPHIDCOM: Application should handle this for device */
1056
1057 // Software app handling it for device...
1058 1050
1059 }
1060 linechange = (priv->line_control != oldlines); 1051 linechange = (priv->line_control != oldlines);
1061 spin_unlock_irqrestore(&priv->lock, flags); 1052 spin_unlock_irqrestore(&priv->lock, flags);
1062 1053
1063 /* if necessary, set lines */ 1054 /* if necessary, set lines */
1064 if (!priv->calledfromopen && linechange) { 1055 if (linechange) {
1065 priv->cmd_ctrl = 1; 1056 priv->cmd_ctrl = 1;
1066 cypress_write(port, NULL, 0); 1057 cypress_write(port, NULL, 0);
1067 } 1058 }
1068
1069 if (priv->calledfromopen)
1070 priv->calledfromopen = 0;
1071
1072} /* cypress_set_termios */ 1059} /* cypress_set_termios */
1073 1060
1074 1061
@@ -1164,7 +1151,7 @@ static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs)
1164 spin_lock_irqsave(&priv->lock, flags); 1151 spin_lock_irqsave(&priv->lock, flags);
1165 switch(urb->actual_length) { 1152 switch(urb->actual_length) {
1166 case 32: 1153 case 32:
1167 // This is for the CY7C64013... 1154 /* This is for the CY7C64013... */
1168 priv->current_status = data[0] & 0xF8; 1155 priv->current_status = data[0] & 0xF8;
1169 bytes = data[1]+2; 1156 bytes = data[1]+2;
1170 i=2; 1157 i=2;
@@ -1172,7 +1159,7 @@ static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs)
1172 havedata = 1; 1159 havedata = 1;
1173 break; 1160 break;
1174 case 8: 1161 case 8:
1175 // This is for the CY7C63743... 1162 /* This is for the CY7C63743... */
1176 priv->current_status = data[0] & 0xF8; 1163 priv->current_status = data[0] & 0xF8;
1177 bytes = (data[0] & 0x07)+1; 1164 bytes = (data[0] & 0x07)+1;
1178 i=1; 1165 i=1;
@@ -1245,7 +1232,7 @@ continue_read:
1245 port->interrupt_in_urb->transfer_buffer, 1232 port->interrupt_in_urb->transfer_buffer,
1246 port->interrupt_in_urb->transfer_buffer_length, 1233 port->interrupt_in_urb->transfer_buffer_length,
1247 cypress_read_int_callback, port, 1234 cypress_read_int_callback, port,
1248 port->interrupt_in_urb->interval); 1235 interval);
1249 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1236 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1250 if (result) 1237 if (result)
1251 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 1238 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
@@ -1274,6 +1261,8 @@ static void cypress_write_int_callback(struct urb *urb, struct pt_regs *regs)
1274 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 1261 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
1275 priv->write_urb_in_use = 0; 1262 priv->write_urb_in_use = 0;
1276 return; 1263 return;
1264 case -EPIPE: /* no break needed */
1265 usb_clear_halt(port->serial->dev, 0x02);
1277 default: 1266 default:
1278 /* error in the urb, so we have to resubmit it */ 1267 /* error in the urb, so we have to resubmit it */
1279 dbg("%s - Overflow in write", __FUNCTION__); 1268 dbg("%s - Overflow in write", __FUNCTION__);
@@ -1535,3 +1524,5 @@ module_param(debug, bool, S_IRUGO | S_IWUSR);
1535MODULE_PARM_DESC(debug, "Debug enabled or not"); 1524MODULE_PARM_DESC(debug, "Debug enabled or not");
1536module_param(stats, bool, S_IRUGO | S_IWUSR); 1525module_param(stats, bool, S_IRUGO | S_IWUSR);
1537MODULE_PARM_DESC(stats, "Enable statistics or not"); 1526MODULE_PARM_DESC(stats, "Enable statistics or not");
1527module_param(interval, int, S_IRUGO | S_IWUSR);
1528MODULE_PARM_DESC(interval, "Overrides interrupt interval");
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 4c788c767a97..52394f08a947 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -76,7 +76,7 @@
76 * Defererence pointers after any paranoid checks, not before. 76 * Defererence pointers after any paranoid checks, not before.
77 * 77 *
78 * (21/Jun/2003) Erik Nygren 78 * (21/Jun/2003) Erik Nygren
79 * Added support for Home Electronics Tira-1 IR tranceiver using FT232BM chip. 79 * Added support for Home Electronics Tira-1 IR transceiver using FT232BM chip.
80 * See <http://www.home-electro.com/tira1.htm>. Only operates properly 80 * See <http://www.home-electro.com/tira1.htm>. Only operates properly
81 * at 100000 and RTS-CTS, so set custom divisor mode on startup. 81 * at 100000 and RTS-CTS, so set custom divisor mode on startup.
82 * Also force the Tira-1 and USB-UIRT to only use their custom baud rates. 82 * Also force the Tira-1 and USB-UIRT to only use their custom baud rates.
@@ -91,7 +91,7 @@
91 * Minor whitespace and comment changes. 91 * Minor whitespace and comment changes.
92 * 92 *
93 * (12/Jun/2003) David Norwood 93 * (12/Jun/2003) David Norwood
94 * Added support for USB-UIRT IR tranceiver using 8U232AM chip. 94 * Added support for USB-UIRT IR transceiver using 8U232AM chip.
95 * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only 95 * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only
96 * operates properly at 312500, so set custom divisor mode on startup. 96 * operates properly at 312500, so set custom divisor mode on startup.
97 * 97 *
@@ -272,6 +272,7 @@ static int debug;
272 272
273static struct usb_device_id id_table_sio [] = { 273static struct usb_device_id id_table_sio [] = {
274 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 274 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
275 { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
275 { } /* Terminating entry */ 276 { } /* Terminating entry */
276}; 277};
277 278
@@ -296,7 +297,6 @@ static struct usb_device_id id_table_8U232AM [] = {
296 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) }, 297 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) },
297 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) }, 298 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) },
298 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) }, 299 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) },
299 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0, 0x3ff) },
300 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) }, 300 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) },
301 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 301 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
302 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, 302 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
@@ -369,11 +369,14 @@ static struct usb_device_id id_table_8U232AM [] = {
369 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) }, 369 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) },
370 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) }, 370 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) },
371 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) }, 371 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) },
372 { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0, 0x3ff) }, 372 { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0, 0x3ff) },
373 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) }, 373 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) },
374 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) }, 374 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) },
375 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) }, 375 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) },
376 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) }, 376 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) },
377 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0, 0x3ff) },
378 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0, 0x3ff) },
379 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0, 0x3ff) },
377 { } /* Terminating entry */ 380 { } /* Terminating entry */
378}; 381};
379 382
@@ -382,7 +385,6 @@ static struct usb_device_id id_table_FT232BM [] = {
382 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) }, 385 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) },
383 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) }, 386 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) },
384 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) }, 387 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) },
385 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0x400, 0xffff) },
386 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) }, 388 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) },
387 { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) }, 389 { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) },
388 { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) }, 390 { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) },
@@ -485,11 +487,15 @@ static struct usb_device_id id_table_FT232BM [] = {
485 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) }, 487 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) },
486 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) }, 488 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) },
487 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) }, 489 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) },
488 { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0x400, 0xffff) }, 490 { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0x400, 0xffff) },
489 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) }, 491 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) },
490 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) }, 492 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) },
491 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) }, 493 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) },
492 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) }, 494 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) },
495 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0x400, 0xffff) },
496 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0x400, 0xffff) },
497 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0x400, 0xffff) },
498 { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) },
493 { } /* Terminating entry */ 499 { } /* Terminating entry */
494}; 500};
495 501
@@ -517,7 +523,6 @@ static struct usb_device_id id_table_combined [] = {
517 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 523 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
518 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 524 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
519 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 525 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
520 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID) },
521 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 526 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
522 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, 527 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
523 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 528 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
@@ -596,6 +601,22 @@ static struct usb_device_id id_table_combined [] = {
596 { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) }, 601 { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) },
597 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) }, 602 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) },
598 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) }, 603 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) },
604 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E808_PID, 0x400, 0xffff) },
605 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E809_PID, 0x400, 0xffff) },
606 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80A_PID, 0x400, 0xffff) },
607 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80B_PID, 0x400, 0xffff) },
608 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80C_PID, 0x400, 0xffff) },
609 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80D_PID, 0x400, 0xffff) },
610 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80E_PID, 0x400, 0xffff) },
611 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80F_PID, 0x400, 0xffff) },
612 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E888_PID, 0x400, 0xffff) },
613 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E889_PID, 0x400, 0xffff) },
614 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88A_PID, 0x400, 0xffff) },
615 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88B_PID, 0x400, 0xffff) },
616 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88C_PID, 0x400, 0xffff) },
617 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88D_PID, 0x400, 0xffff) },
618 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88E_PID, 0x400, 0xffff) },
619 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88F_PID, 0x400, 0xffff) },
599 { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) }, 620 { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) },
600 { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) }, 621 { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) },
601 { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) }, 622 { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) },
@@ -609,11 +630,16 @@ static struct usb_device_id id_table_combined [] = {
609 { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) }, 630 { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) },
610 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, 631 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) },
611 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, 632 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) },
612 { USB_DEVICE(FTDI_RM_VID, FTDI_RMCANVIEW_PID) }, 633 { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) },
613 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, 634 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) },
614 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, 635 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) },
615 { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) }, 636 { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) },
616 { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, 637 { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) },
638 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID) },
639 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) },
640 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) },
641 { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
642 { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) },
617 { } /* Terminating entry */ 643 { } /* Terminating entry */
618}; 644};
619 645
@@ -1457,10 +1483,10 @@ static int ftdi_FT2232C_startup (struct usb_serial *serial)
1457 inter = serial->interface->altsetting->desc.bInterfaceNumber; 1483 inter = serial->interface->altsetting->desc.bInterfaceNumber;
1458 1484
1459 if (inter) { 1485 if (inter) {
1460 priv->interface = INTERFACE_B; 1486 priv->interface = PIT_SIOB;
1461 } 1487 }
1462 else { 1488 else {
1463 priv->interface = INTERFACE_A; 1489 priv->interface = PIT_SIOA;
1464 } 1490 }
1465 priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */ 1491 priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */
1466 1492
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index be5d60bf90b9..a52bb13a9ce4 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -26,7 +26,6 @@
26#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */ 26#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */
27#define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */ 27#define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */
28#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */ 28#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
29#define FTDI_8U232AM_ALT_ALT_PID 0xf3c0 /* FTDI's second alternate PID for above */
30#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */ 29#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
31#define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */ 30#define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */
32#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */ 31#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */
@@ -137,7 +136,7 @@
137/* 136/*
138 * Home Electronics (www.home-electro.com) USB gadgets 137 * Home Electronics (www.home-electro.com) USB gadgets
139 */ 138 */
140#define FTDI_HE_TIRA1_PID 0xFA78 /* Tira-1 IR tranceiver */ 139#define FTDI_HE_TIRA1_PID 0xFA78 /* Tira-1 IR transceiver */
141 140
142/* USB-UIRT - An infrared receiver and transmitter using the 8U232AM chip */ 141/* USB-UIRT - An infrared receiver and transmitter using the 8U232AM chip */
143/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */ 142/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */
@@ -157,7 +156,8 @@
157 */ 156 */
158#define OCT_VID 0x0B39 /* OCT vendor ID */ 157#define OCT_VID 0x0B39 /* OCT vendor ID */
159/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */ 158/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */
160/* Also rebadged as SIIG Inc. model US2308 */ 159/* Also rebadged as Dick Smith Electronics (Aus) XH6451 */
160/* Also rebadged as SIIG Inc. model US2308 hardware version 1 */
161#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ 161#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */
162 162
163/* an infrared receiver for user access control with IR tags */ 163/* an infrared receiver for user access control with IR tags */
@@ -236,10 +236,10 @@
236 236
237/* 237/*
238 * RM Michaelides CANview USB (http://www.rmcan.com) 238 * RM Michaelides CANview USB (http://www.rmcan.com)
239 * CAN filedbus interface adapter, addad by port GmbH www.port.de) 239 * CAN fieldbus interface adapter, added by port GmbH www.port.de)
240 * Ian Abbott changed the macro names for consistency.
240 */ 241 */
241#define FTDI_RM_VID 0x0403 /* Vendor Id */ 242#define FTDI_RM_CANVIEW_PID 0xfd60 /* Product Id */
242#define FTDI_RMCANVIEW_PID 0xfd60 /* Product Id */
243 243
244/* 244/*
245 * EVER Eco Pro UPS (http://www.ever.com.pl/) 245 * EVER Eco Pro UPS (http://www.ever.com.pl/)
@@ -247,6 +247,26 @@
247 247
248#define EVER_ECO_PRO_CDS 0xe520 /* RS-232 converter */ 248#define EVER_ECO_PRO_CDS 0xe520 /* RS-232 converter */
249 249
250/*
251 * 4N-GALAXY.DE PIDs for CAN-USB, USB-RS232, USB-RS422, USB-RS485,
252 * USB-TTY activ, USB-TTY passiv. Some PIDs are used by several devices
253 * and I'm not entirely sure which are used by which.
254 */
255#define FTDI_4N_GALAXY_DE_0_PID 0x8372
256#define FTDI_4N_GALAXY_DE_1_PID 0xF3C0
257#define FTDI_4N_GALAXY_DE_2_PID 0xF3C1
258
259/*
260 * Mobility Electronics products.
261 */
262#define MOBILITY_VID 0x1342
263#define MOBILITY_USB_SERIAL_PID 0x0202 /* EasiDock USB 200 serial */
264
265/*
266 * Active Robots product ids.
267 */
268#define FTDI_ACTIVE_ROBOTS_PID 0xE548 /* USB comms board */
269
250/* Commands */ 270/* Commands */
251#define FTDI_SIO_RESET 0 /* Reset the port */ 271#define FTDI_SIO_RESET 0 /* Reset the port */
252#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ 272#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
@@ -259,10 +279,6 @@
259#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */ 279#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
260#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */ 280#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */
261 281
262/* Port interface code for FT2232C */
263#define INTERFACE_A 1
264#define INTERFACE_B 2
265
266 282
267/* 283/*
268 * BmRequestType: 1100 0000b 284 * BmRequestType: 1100 0000b
diff --git a/drivers/usb/serial/io_usbvend.h b/drivers/usb/serial/io_usbvend.h
index 8c1fa5e722b1..f1804fd5a3dd 100644
--- a/drivers/usb/serial/io_usbvend.h
+++ b/drivers/usb/serial/io_usbvend.h
@@ -289,7 +289,7 @@
289// 289//
290 290
291// 291//
292// Edgeport Compatiblity Descriptor 292// Edgeport Compatibility Descriptor
293// 293//
294// This descriptor is only returned by Edgeport-compatible devices 294// This descriptor is only returned by Edgeport-compatible devices
295// supporting the EPiC spec. True ION devices do not return this 295// supporting the EPiC spec. True ION devices do not return this
diff --git a/drivers/usb/serial/keyspan_usa90msg.h b/drivers/usb/serial/keyspan_usa90msg.h
index dd935b62c1a8..86708ecd8735 100644
--- a/drivers/usb/serial/keyspan_usa90msg.h
+++ b/drivers/usb/serial/keyspan_usa90msg.h
@@ -19,7 +19,7 @@
19 19
20 This file is available under a BSD-style copyright 20 This file is available under a BSD-style copyright
21 21
22 2. The name of InnoSys Incorprated may not be used to endorse or promote 22 2. The name of InnoSys Incorporated may not be used to endorse or promote
23 products derived from this software without specific prior written 23 products derived from this software without specific prior written
24 permission. 24 permission.
25 25