diff options
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 1da57fd9ea23..2cd3f1d4b687 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -56,6 +56,7 @@ static struct usb_device_id id_table [] = { | |||
56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, | 56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, |
57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, | 57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, |
58 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, | 58 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, |
59 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, | ||
59 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, | 60 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, |
60 | { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, | 61 | { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, |
61 | { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, | 62 | { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, |
@@ -470,16 +471,13 @@ static void pl2303_set_termios(struct usb_serial_port *port, | |||
470 | 471 | ||
471 | dbg("%s - port %d", __FUNCTION__, port->number); | 472 | dbg("%s - port %d", __FUNCTION__, port->number); |
472 | 473 | ||
473 | if ((!port->tty) || (!port->tty->termios)) { | ||
474 | dbg("%s - no tty structures", __FUNCTION__); | ||
475 | return; | ||
476 | } | ||
477 | |||
478 | spin_lock_irqsave(&priv->lock, flags); | 474 | spin_lock_irqsave(&priv->lock, flags); |
479 | if (!priv->termios_initialized) { | 475 | if (!priv->termios_initialized) { |
480 | *(port->tty->termios) = tty_std_termios; | 476 | *(port->tty->termios) = tty_std_termios; |
481 | port->tty->termios->c_cflag = B9600 | CS8 | CREAD | | 477 | port->tty->termios->c_cflag = B9600 | CS8 | CREAD | |
482 | HUPCL | CLOCAL; | 478 | HUPCL | CLOCAL; |
479 | port->tty->termios->c_ispeed = 9600; | ||
480 | port->tty->termios->c_ospeed = 9600; | ||
483 | priv->termios_initialized = 1; | 481 | priv->termios_initialized = 1; |
484 | } | 482 | } |
485 | spin_unlock_irqrestore(&priv->lock, flags); | 483 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -596,6 +594,10 @@ static void pl2303_set_termios(struct usb_serial_port *port, | |||
596 | dbg ("0x40:0x1:0x0:0x0 %d", i); | 594 | dbg ("0x40:0x1:0x0:0x0 %d", i); |
597 | } | 595 | } |
598 | 596 | ||
597 | /* FIXME: Need to read back resulting baud rate */ | ||
598 | if (baud) | ||
599 | tty_encode_baud_rate(port->tty, baud, baud); | ||
600 | |||
599 | kfree(buf); | 601 | kfree(buf); |
600 | } | 602 | } |
601 | 603 | ||