aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 15:58:40 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 15:58:40 -0700
commita60387ba3114fe087349df23fa82e5ad9d5b6ff2 (patch)
tree4cfdaf4d03da8cff76913b4a4de090e2cd99871a /drivers/usb/serial/pl2303.c
parent0e81bef05e3b90f8319e79bf36e61341f7b6e189 (diff)
parentd5d1ceac2a47645780bd07fd7a670b14c4d995db (diff)
downloadkernel_samsung_smdk4412-a60387ba3114fe087349df23fa82e5ad9d5b6ff2.tar.gz
kernel_samsung_smdk4412-a60387ba3114fe087349df23fa82e5ad9d5b6ff2.tar.bz2
kernel_samsung_smdk4412-a60387ba3114fe087349df23fa82e5ad9d5b6ff2.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (40 commits) USB: open disconnect race in usblcd USB: disconnect open race in legousbtower USB: open disconnect race in iowarrior USB: missing error check in emi62 USB: missing error check in emi26 USB: usb_serial_resume bug fix USB: remove new OHCI build warnings USB: amd5536udc - remove set_mwi() compiler warning USB: usbserial - fix potential deadlock between write() and IRQ usb: serial/pl2303: support for IO Data Device RSAQ5 USB: fix read vs. disconnect race in cytherm driver USB: fix locking in idmouse USB: fix interface sysfs file-creation bug USB: fix ssb_ohci_probe() build bug USB: pl2303: remove can't happen checks, set speed properly and report baud rate USB: mos7840: Clean up old checks and stuff USB rio500.c: fix check-after-use USB iowarrior.c: fix check-after-use USB: add URB_FREE_BUFFER to permissible flags USB: isd200: sort out USB/IDE dependancy mess ...
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1da57fd9ea2..2cd3f1d4b68 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -56,6 +56,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
+ { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
{ USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
{ USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
@@ -470,16 +471,13 @@ static void pl2303_set_termios(struct usb_serial_port *port,
dbg("%s - port %d", __FUNCTION__, port->number);
- if ((!port->tty) || (!port->tty->termios)) {
- dbg("%s - no tty structures", __FUNCTION__);
- return;
- }
-
spin_lock_irqsave(&priv->lock, flags);
if (!priv->termios_initialized) {
*(port->tty->termios) = tty_std_termios;
port->tty->termios->c_cflag = B9600 | CS8 | CREAD |
HUPCL | CLOCAL;
+ port->tty->termios->c_ispeed = 9600;
+ port->tty->termios->c_ospeed = 9600;
priv->termios_initialized = 1;
}
spin_unlock_irqrestore(&priv->lock, flags);
@@ -596,6 +594,10 @@ static void pl2303_set_termios(struct usb_serial_port *port,
dbg ("0x40:0x1:0x0:0x0 %d", i);
}
+ /* FIXME: Need to read back resulting baud rate */
+ if (baud)
+ tty_encode_baud_rate(port->tty, baud, baud);
+
kfree(buf);
}