1 diff -rNu linux-2.4.29.old/drivers/usb/serial/pl2303.c linux-2.4.29/drivers/usb/serial/pl2303.c
2 --- linux-2.4.29.old/drivers/usb/serial/pl2303.c 2005-03-22 14:48:04.000000000 +0100
3 +++ linux-2.4.29/drivers/usb/serial/pl2303.c 2005-03-22 15:33:05.735943352 +0100
6 * Prolific PL2303 USB to serial adaptor driver
8 - * Copyright (C) 2001-2003 Greg Kroah-Hartman (greg@kroah.com)
9 + * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
10 * Copyright (C) 2003 IBM Corp.
12 * Original driver for 2.2.x by anonymous
14 * (at your option) any later version.
16 * See Documentation/usb/usb-serial.txt for more information on using this driver
18 - * Added line error reporting support. Hopefully it is correct...
22 + * ported 2.6.8 pl2303.c to 2.4.20 format
23 + * (HX model works fine now, ID table should be brought up to date)
24 + * Gregor Schaffrath <gschaff@ran-dom.org>
27 + * allowed driver to work properly if there is no tty assigned to a port
28 + * (this happens for serial console devices.)
31 * Added RTS and DTR line control. Thanks to joe@bndlg.de for parts of it.
39 #include <linux/config.h>
40 #include <linux/kernel.h>
41 #include <linux/errno.h>
43 #include <linux/spinlock.h>
44 #include <asm/uaccess.h>
45 #include <linux/usb.h>
47 -#ifdef CONFIG_USB_SERIAL_DEBUG
48 - static int debug = 1;
53 #include "usb-serial.h"
59 -#define DRIVER_VERSION "v0.10"
60 +#define DRIVER_VERSION "v0.11"
61 #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
65 static struct usb_device_id id_table [] = {
66 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
67 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
68 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
69 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
70 - { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
71 { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
72 { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
73 { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
74 - { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) },
75 - { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
76 - { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
77 - { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
78 - { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
79 + { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) },
80 + { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
81 + { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
82 + { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
83 + { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
84 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) },
85 + { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
86 { } /* Terminating entry */
89 MODULE_DEVICE_TABLE (usb, id_table);
92 +static struct usb_driver pl2303_driver = {
93 + .owner = THIS_MODULE,
95 + .probe = usb_serial_probe,
96 + .disconnect = usb_serial_disconnect,
97 + .id_table = id_table,
101 #define SET_LINE_REQUEST_TYPE 0x21
102 #define SET_LINE_REQUEST 0x20
104 static int pl2303_write (struct usb_serial_port *port, int from_user,
105 const unsigned char *buf, int count);
106 static void pl2303_break_ctl(struct usb_serial_port *port,int break_state);
107 +static int pl2303_tiocmget (struct usb_serial_port *port, struct file *file);
108 +static int pl2303_tiocmset (struct usb_serial_port *port, struct file *file,
109 + unsigned int set, unsigned int clear);
110 static int pl2303_startup (struct usb_serial *serial);
111 static void pl2303_shutdown (struct usb_serial *serial);
113 @@ -149,27 +164,48 @@
114 .ioctl = pl2303_ioctl,
115 .break_ctl = pl2303_break_ctl,
116 .set_termios = pl2303_set_termios,
117 + //.tiocmget = pl2303_tiocmget,
118 + //.tiocmset = pl2303_tiocmset,
119 .read_bulk_callback = pl2303_read_bulk_callback,
120 .read_int_callback = pl2303_read_int_callback,
121 .write_bulk_callback = pl2303_write_bulk_callback,
122 + //.attach = pl2303_startup,
123 .startup = pl2303_startup,
124 .shutdown = pl2303_shutdown,
128 + type_0, /* don't know the difference between type 0 and */
129 + type_1, /* type 1, until someone from prolific tells us... */
130 + HX, /* HX version of the pl2303 chip */
133 struct pl2303_private {
135 wait_queue_head_t delta_msr_wait;
138 u8 termios_initialized;
139 + enum pl2303_type type;
143 static int pl2303_startup (struct usb_serial *serial)
145 struct pl2303_private *priv;
146 + enum pl2303_type type = type_0;
149 + if (serial->dev->descriptor.bDeviceClass == 0x02)
151 + else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
153 + else if (serial->dev->descriptor.bDeviceClass == 0x00)
155 + else if (serial->dev->descriptor.bDeviceClass == 0xFF)
157 + dbg("device type: %d", type);
159 for (i = 0; i < serial->num_ports; ++i) {
160 priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL);
163 memset (priv, 0x00, sizeof (struct pl2303_private));
164 spin_lock_init(&priv->lock);
165 init_waitqueue_head(&priv->delta_msr_wait);
166 - usb_set_serial_port_data(&serial->port[i], priv);
168 + serial->port[i].private = priv;
172 @@ -215,13 +252,13 @@
173 memcpy (port->write_urb->transfer_buffer, buf, count);
176 - usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
177 + usb_serial_debug_data(__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
179 port->write_urb->transfer_buffer_length = count;
180 port->write_urb->dev = port->serial->dev;
181 result = usb_submit_urb (port->write_urb);
183 - err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
184 + err("%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
189 static void pl2303_set_termios (struct usb_serial_port *port, struct termios *old_termios)
191 struct usb_serial *serial = port->serial;
192 - struct pl2303_private *priv = usb_get_serial_port_data(port);
193 + struct pl2303_private *priv = port->private;
201 - dbg("%s - port %d, initialized = %d", __FUNCTION__, port->number,
202 - priv->termios_initialized);
203 + dbg("%s - port %d", __FUNCTION__, port->number);
205 if ((!port->tty) || (!port->tty->termios)) {
206 dbg("%s - no tty structures", __FUNCTION__);
209 buf = kmalloc (7, GFP_KERNEL);
211 - err("%s - out of memory.", __FUNCTION__);
212 + err("%s - out of memory.\n", __FUNCTION__);
215 memset (buf, 0x00, 0x07);
217 case B230400: baud = 230400; break;
218 case B460800: baud = 460800; break;
220 - err ("pl2303 driver does not support the baudrate requested (fix it)");
221 + err("pl2303 driver does not support the baudrate requested (fix it)\n");
224 dbg("%s - baud = %d", __FUNCTION__, baud);
225 @@ -380,26 +416,30 @@
226 buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
228 if (cflag & CRTSCTS) {
229 - i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
230 - VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
231 - 0x0, 0x41, NULL, 0, 100);
232 - dbg ("0x40:0x1:0x0:0x41 %d", i);
234 + if (priv->type == HX)
238 + i = usb_control_msg(serial->dev,
239 + usb_sndctrlpipe(serial->dev, 0),
240 + VENDOR_WRITE_REQUEST,
241 + VENDOR_WRITE_REQUEST_TYPE,
242 + 0x0, index, NULL, 0, 100);
243 + dbg ("0x40:0x1:0x0:0x%x %d", index, i);
251 static int pl2303_open (struct usb_serial_port *port, struct file *filp)
253 struct termios tmp_termios;
254 struct usb_serial *serial = port->serial;
255 + struct pl2303_private *priv = port->private;
259 - if (port_paranoia_check (port, __FUNCTION__))
262 dbg("%s - port %d", __FUNCTION__, port->number);
264 usb_clear_halt(serial->dev, port->write_urb->pipe);
266 SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
267 FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
268 FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
269 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
270 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0);
272 + if (priv->type == HX) {
274 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x44);
275 + /* reset upstream data pipes */
276 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 8, 0);
277 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 9, 0);
279 + SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x24);
285 port->read_urb->dev = serial->dev;
286 result = usb_submit_urb (port->read_urb);
288 - err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
289 + err("%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
290 pl2303_close (port, NULL);
294 port->interrupt_in_urb->dev = serial->dev;
295 result = usb_submit_urb (port->interrupt_in_urb);
297 - err("%s - failed submitting interrupt urb, error %d", __FUNCTION__, result);
298 + err("%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
299 pl2303_close (port, NULL);
302 @@ -460,125 +512,103 @@
304 static void pl2303_close (struct usb_serial_port *port, struct file *filp)
306 - struct usb_serial *serial;
307 struct pl2303_private *priv;
309 unsigned int c_cflag;
312 - if (port_paranoia_check (port, __FUNCTION__))
314 - serial = get_usb_serial (port, __FUNCTION__);
318 dbg("%s - port %d", __FUNCTION__, port->number);
322 - c_cflag = port->tty->termios->c_cflag;
323 - if (c_cflag & HUPCL) {
324 - /* drop DTR and RTS */
325 - priv = usb_get_serial_port_data(port);
326 - spin_lock_irqsave(&priv->lock, flags);
327 - priv->line_control = 0;
328 - spin_unlock_irqrestore (&priv->lock, flags);
329 - set_control_lines (port->serial->dev, 0);
332 + /* shutdown our urbs */
333 + dbg("%s - shutting down urbs", __FUNCTION__);
334 + result = usb_unlink_urb (port->write_urb);
336 + dbg("%s - usb_unlink_urb (write_urb)"
337 + " failed with reason: %d", __FUNCTION__,
340 - /* shutdown our urbs */
341 - dbg("%s - shutting down urbs", __FUNCTION__);
342 - result = usb_unlink_urb (port->write_urb);
344 - dbg("%s - usb_unlink_urb (write_urb)"
345 - " failed with reason: %d", __FUNCTION__,
347 + result = usb_unlink_urb (port->read_urb);
349 + dbg("%s - usb_unlink_urb (read_urb) "
350 + "failed with reason: %d", __FUNCTION__,
353 - result = usb_unlink_urb (port->read_urb);
355 - dbg("%s - usb_unlink_urb (read_urb) "
356 - "failed with reason: %d", __FUNCTION__,
358 + result = usb_unlink_urb (port->interrupt_in_urb);
360 + dbg("%s - usb_unlink_urb (interrupt_in_urb)"
361 + " failed with reason: %d", __FUNCTION__,
364 - result = usb_unlink_urb (port->interrupt_in_urb);
366 - dbg("%s - usb_unlink_urb (interrupt_in_urb)"
367 - " failed with reason: %d", __FUNCTION__,
370 + c_cflag = port->tty->termios->c_cflag;
371 + if (c_cflag & HUPCL) {
372 + /* drop DTR and RTS */
373 + priv = port->private;
374 + spin_lock_irqsave(&priv->lock, flags);
375 + priv->line_control = 0;
376 + spin_unlock_irqrestore (&priv->lock, flags);
377 + set_control_lines (port->serial->dev, 0);
383 +/* taken from 2.4.20 driver */
384 static int set_modem_info (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
386 - struct pl2303_private *priv = usb_get_serial_port_data(port);
387 - unsigned long flags;
391 - if (copy_from_user(&arg, value, sizeof(int)))
394 - spin_lock_irqsave (&priv->lock, flags);
397 - if (arg & TIOCM_RTS)
398 - priv->line_control |= CONTROL_RTS;
399 - if (arg & TIOCM_DTR)
400 - priv->line_control |= CONTROL_DTR;
404 - if (arg & TIOCM_RTS)
405 - priv->line_control &= ~CONTROL_RTS;
406 - if (arg & TIOCM_DTR)
407 - priv->line_control &= ~CONTROL_DTR;
409 + struct pl2303_private *priv = port->private;
413 - /* turn off RTS and DTR and then only turn
414 - on what was asked to */
415 - priv->line_control &= ~(CONTROL_RTS | CONTROL_DTR);
416 - priv->line_control |= ((arg & TIOCM_RTS) ? CONTROL_RTS : 0);
417 - priv->line_control |= ((arg & TIOCM_DTR) ? CONTROL_DTR : 0);
420 - control = priv->line_control;
421 - spin_unlock_irqrestore (&priv->lock, flags);
423 - return set_control_lines (port->serial->dev, control);
424 + if (copy_from_user(&arg, value, sizeof(int)))
429 + if (arg & TIOCM_RTS)
430 + priv->line_control |= CONTROL_RTS;
431 + if (arg & TIOCM_DTR)
432 + priv->line_control |= CONTROL_DTR;
436 + if (arg & TIOCM_RTS)
437 + priv->line_control &= ~CONTROL_RTS;
438 + if (arg & TIOCM_DTR)
439 + priv->line_control &= ~CONTROL_DTR;
443 + /* turn off RTS and DTR and then only turn
444 + on what was asked to */
445 + priv->line_control &= ~(CONTROL_RTS | CONTROL_DTR);
446 + priv->line_control |= ((arg & TIOCM_RTS) ? CONTROL_RTS : 0);
447 + priv->line_control |= ((arg & TIOCM_DTR) ? CONTROL_DTR : 0);
451 + return set_control_lines (port->serial->dev, priv->line_control);
454 static int get_modem_info (struct usb_serial_port *port, unsigned int *value)
456 - struct pl2303_private *priv = usb_get_serial_port_data(port);
457 - unsigned long flags;
459 - unsigned int status;
460 - unsigned int result;
462 - spin_lock_irqsave (&priv->lock, flags);
463 - mcr = priv->line_control;
464 - status = priv->line_status;
465 - spin_unlock_irqrestore (&priv->lock, flags);
467 - result = ((mcr & CONTROL_DTR) ? TIOCM_DTR : 0)
468 - | ((mcr & CONTROL_RTS) ? TIOCM_RTS : 0)
469 - | ((status & UART_CTS) ? TIOCM_CTS : 0)
470 - | ((status & UART_DSR) ? TIOCM_DSR : 0)
471 - | ((status & UART_RING) ? TIOCM_RI : 0)
472 - | ((status & UART_DCD) ? TIOCM_CD : 0);
474 - dbg("%s - result = %x", __FUNCTION__, result);
476 - if (copy_to_user(value, &result, sizeof(int)))
479 + struct pl2303_private *priv = port->private;
480 + unsigned int mcr = priv->line_control;
481 + unsigned int result;
483 + result = ((mcr & CONTROL_DTR) ? TIOCM_DTR : 0)
484 + | ((mcr & CONTROL_RTS) ? TIOCM_RTS : 0);
486 + dbg("%s - result = %x", __FUNCTION__, result);
488 + if (copy_to_user(value, &result, sizeof(int)))
492 +/* end of 2.4.20 kernel part - grsch */
494 static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
496 - struct pl2303_private *priv = usb_get_serial_port_data(port);
497 + struct pl2303_private *priv = port->private;
499 unsigned int prevstatus;
501 @@ -617,21 +647,10 @@
502 dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
507 - dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
508 - return get_modem_info (port, (unsigned int *)arg);
513 - dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, port->number);
514 - return set_modem_info(port, cmd, (unsigned int *) arg);
517 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number);
518 return wait_modem_info(port, arg);
522 dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
528 - dbg("%s - turning break %s", __FUNCTION__, state==BREAK_OFF ? "off" : "on");
529 + dbg("%s - turning break %s", state==BREAK_OFF ? "off" : "on", __FUNCTION__);
531 result = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
532 BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
534 dbg("%s", __FUNCTION__);
536 for (i = 0; i < serial->num_ports; ++i) {
537 - kfree (usb_get_serial_port_data(&serial->port[i]));
538 - usb_set_serial_port_data(&serial->port[i], NULL);
539 + kfree (serial->port[i].private);
540 + serial->port[i].private = NULL;
544 @@ -678,16 +697,14 @@
545 static void pl2303_read_int_callback (struct urb *urb)
547 struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
548 - struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
549 - struct pl2303_private *priv = usb_get_serial_port_data(port);
550 + struct pl2303_private *priv = port->private;
551 unsigned char *data = urb->transfer_buffer;
556 dbg("%s (%d)", __FUNCTION__, port->number);
558 - /* ints auto restart... */
560 switch (urb->status) {
563 @@ -700,17 +717,14 @@
566 dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
575 - usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
576 + usb_serial_debug_data(__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
578 if (urb->actual_length < UART_STATE)
582 /* Save off the uart status for others to look at */
583 uart_state = data[UART_STATE];
584 @@ -718,17 +732,19 @@
585 uart_state |= (priv->line_status & UART_STATE_TRANSIENT_MASK);
586 priv->line_status = uart_state;
587 spin_unlock_irqrestore(&priv->lock, flags);
588 - wake_up_interruptible (&priv->delta_msr_wait);
593 + status = usb_submit_urb (urb);
595 + err("%s - usb_submit_urb failed with result %d\n",
596 + __FUNCTION__, status);
600 static void pl2303_read_bulk_callback (struct urb *urb)
602 struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
603 - struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
604 - struct pl2303_private *priv = usb_get_serial_port_data(port);
605 + struct pl2303_private *priv = port->private;
606 struct tty_struct *tty;
607 unsigned char *data = urb->transfer_buffer;
613 - if (port_paranoia_check (port, __FUNCTION__))
616 dbg("%s - port %d", __FUNCTION__, port->number);
619 - dbg("%s - bad serial pointer, exiting", __FUNCTION__);
624 dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
625 if (!port->open_count) {
626 @@ -757,17 +765,17 @@
627 /* PL2303 mysteriously fails with -EPROTO reschedule the read */
628 dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__);
630 - urb->dev = serial->dev;
631 + urb->dev = port->serial->dev;
632 result = usb_submit_urb(urb);
634 - err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
635 + err("%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
638 dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
642 - usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
643 + usb_serial_debug_data(__FILE__, __FUNCTION__, urb->actual_length, data);
645 /* get tty_flag from status */
646 tty_flag = TTY_NORMAL;
648 status = priv->line_status;
649 priv->line_status &= ~UART_STATE_TRANSIENT_MASK;
650 spin_unlock_irqrestore(&priv->lock, flags);
651 - wake_up_interruptible (&priv->delta_msr_wait); //AF from 2.6
652 + wake_up_interruptible (&priv->delta_msr_wait);
654 /* break takes precedence over parity, */
655 /* which takes precedence over framing errors */
656 @@ -805,10 +813,10 @@
658 /* Schedule the next read _if_ we are still open */
659 if (port->open_count) {
660 - urb->dev = serial->dev;
661 + urb->dev = port->serial->dev;
662 result = usb_submit_urb(urb);
664 - err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
665 + err("%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
669 @@ -821,44 +829,32 @@
670 struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
673 - if (port_paranoia_check (port, __FUNCTION__))
676 dbg("%s - port %d", __FUNCTION__, port->number);
679 /* error in the urb, so we have to resubmit it */
680 - if (serial_paranoia_check (port->serial, __FUNCTION__)) {
683 dbg("%s - Overflow in write", __FUNCTION__);
684 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
685 port->write_urb->transfer_buffer_length = 1;
686 port->write_urb->dev = port->serial->dev;
687 result = usb_submit_urb (port->write_urb);
689 - err("%s - failed resubmitting write urb, error %d", __FUNCTION__, result);
690 + err("%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
695 - queue_task(&port->tqueue, &tq_immediate);
696 - mark_bh(IMMEDIATE_BH);
699 + queue_task(&port->tqueue, &tq_immediate);
700 + mark_bh(IMMEDIATE_BH);
704 static int __init pl2303_init (void)
707 - retval = usb_serial_register(&pl2303_device);
709 - goto failed_usb_serial_register;
710 + usb_serial_register(&pl2303_device);
711 info(DRIVER_DESC " " DRIVER_VERSION);
713 -failed_usb_serial_register:
719 MODULE_PARM(debug, "i");
720 MODULE_PARM_DESC(debug, "Debug enabled or not");
723 diff -rNu linux-2.4.29.old/drivers/usb/serial/pl2303.h linux-2.4.29/drivers/usb/serial/pl2303.h
724 --- linux-2.4.29.old/drivers/usb/serial/pl2303.h 2005-03-22 14:48:04.000000000 +0100
725 +++ linux-2.4.29/drivers/usb/serial/pl2303.h 2005-03-22 15:33:05.758939856 +0100
728 #define SITECOM_VENDOR_ID 0x6189
729 #define SITECOM_PRODUCT_ID 0x2068
731 +/* Alcatel OT535/735 USB cable */
732 +#define ALCATEL_VENDOR_ID 0x11f7
733 +#define ALCATEL_PRODUCT_ID 0x02df
735 +/* Samsung I330 phone cradle */
736 +#define SAMSUNG_VENDOR_ID 0x04e8
737 +#define SAMSUNG_PRODUCT_ID 0x8001