aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/spcp8x5.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/serial/spcp8x5.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r--drivers/usb/serial/spcp8x5.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index 329d311a35d9..180ea6c7911c 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -133,7 +133,7 @@ struct spcp8x5_usb_ctrl_arg {
133 133
134/* how come ??? */ 134/* how come ??? */
135#define UART_STATE 0x08 135#define UART_STATE 0x08
136#define UART_STATE_TRANSIENT_MASK 0x74 136#define UART_STATE_TRANSIENT_MASK 0x75
137#define UART_DCD 0x01 137#define UART_DCD 0x01
138#define UART_DSR 0x02 138#define UART_DSR 0x02
139#define UART_BREAK_ERROR 0x04 139#define UART_BREAK_ERROR 0x04
@@ -441,7 +441,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
441 spcp8x5_set_workMode(serial->dev, 0x000a, 441 spcp8x5_set_workMode(serial->dev, 0x000a,
442 SET_WORKING_MODE_U2C, priv->type); 442 SET_WORKING_MODE_U2C, priv->type);
443 } 443 }
444 return;
445} 444}
446 445
447/* open the serial port. do some usb system call. set termios and get the line 446/* open the serial port. do some usb system call. set termios and get the line
@@ -526,6 +525,10 @@ static void spcp8x5_process_read_urb(struct urb *urb)
526 /* overrun is special, not associated with a char */ 525 /* overrun is special, not associated with a char */
527 if (status & UART_OVERRUN_ERROR) 526 if (status & UART_OVERRUN_ERROR)
528 tty_insert_flip_char(tty, 0, TTY_OVERRUN); 527 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
528
529 if (status & UART_DCD)
530 usb_serial_handle_dcd_change(port, tty,
531 priv->line_status & MSR_STATUS_LINE_DCD);
529 } 532 }
530 533
531 tty_insert_flip_string_fixed_flag(tty, data, tty_flag, 534 tty_insert_flip_string_fixed_flag(tty, data, tty_flag,
@@ -573,7 +576,7 @@ static int spcp8x5_wait_modem_info(struct usb_serial_port *port,
573 return 0; 576 return 0;
574} 577}
575 578
576static int spcp8x5_ioctl(struct tty_struct *tty, struct file *file, 579static int spcp8x5_ioctl(struct tty_struct *tty,
577 unsigned int cmd, unsigned long arg) 580 unsigned int cmd, unsigned long arg)
578{ 581{
579 struct usb_serial_port *port = tty->driver_data; 582 struct usb_serial_port *port = tty->driver_data;
@@ -592,7 +595,7 @@ static int spcp8x5_ioctl(struct tty_struct *tty, struct file *file,
592 return -ENOIOCTLCMD; 595 return -ENOIOCTLCMD;
593} 596}
594 597
595static int spcp8x5_tiocmset(struct tty_struct *tty, struct file *file, 598static int spcp8x5_tiocmset(struct tty_struct *tty,
596 unsigned int set, unsigned int clear) 599 unsigned int set, unsigned int clear)
597{ 600{
598 struct usb_serial_port *port = tty->driver_data; 601 struct usb_serial_port *port = tty->driver_data;
@@ -615,7 +618,7 @@ static int spcp8x5_tiocmset(struct tty_struct *tty, struct file *file,
615 return spcp8x5_set_ctrlLine(port->serial->dev, control , priv->type); 618 return spcp8x5_set_ctrlLine(port->serial->dev, control , priv->type);
616} 619}
617 620
618static int spcp8x5_tiocmget(struct tty_struct *tty, struct file *file) 621static int spcp8x5_tiocmget(struct tty_struct *tty)
619{ 622{
620 struct usb_serial_port *port = tty->driver_data; 623 struct usb_serial_port *port = tty->driver_data;
621 struct spcp8x5_private *priv = usb_get_serial_port_data(port); 624 struct spcp8x5_private *priv = usb_get_serial_port_data(port);
@@ -646,6 +649,7 @@ static struct usb_serial_driver spcp8x5_device = {
646 .name = "SPCP8x5", 649 .name = "SPCP8x5",
647 }, 650 },
648 .id_table = id_table, 651 .id_table = id_table,
652 .usb_driver = &spcp8x5_driver,
649 .num_ports = 1, 653 .num_ports = 1,
650 .open = spcp8x5_open, 654 .open = spcp8x5_open,
651 .dtr_rts = spcp8x5_dtr_rts, 655 .dtr_rts = spcp8x5_dtr_rts,