diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/serial/io_ti.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r-- | drivers/usb/serial/io_ti.c | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index a7cfc5952937..0aac00afb5c8 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -433,7 +433,7 @@ static int write_i2c_mem(struct edgeport_serial *serial, | |||
433 | 433 | ||
434 | /* We can only send a maximum of 1 aligned byte page at a time */ | 434 | /* We can only send a maximum of 1 aligned byte page at a time */ |
435 | 435 | ||
436 | /* calulate the number of bytes left in the first page */ | 436 | /* calculate the number of bytes left in the first page */ |
437 | write_length = EPROM_PAGE_SIZE - | 437 | write_length = EPROM_PAGE_SIZE - |
438 | (start_address & (EPROM_PAGE_SIZE - 1)); | 438 | (start_address & (EPROM_PAGE_SIZE - 1)); |
439 | 439 | ||
@@ -1571,8 +1571,6 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 msr) | |||
1571 | } | 1571 | } |
1572 | } | 1572 | } |
1573 | tty_kref_put(tty); | 1573 | tty_kref_put(tty); |
1574 | |||
1575 | return; | ||
1576 | } | 1574 | } |
1577 | 1575 | ||
1578 | static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data, | 1576 | static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data, |
@@ -2424,7 +2422,6 @@ static void change_port_settings(struct tty_struct *tty, | |||
2424 | dbg("%s - error %d when trying to write config to device", | 2422 | dbg("%s - error %d when trying to write config to device", |
2425 | __func__, status); | 2423 | __func__, status); |
2426 | kfree(config); | 2424 | kfree(config); |
2427 | return; | ||
2428 | } | 2425 | } |
2429 | 2426 | ||
2430 | static void edge_set_termios(struct tty_struct *tty, | 2427 | static void edge_set_termios(struct tty_struct *tty, |
@@ -2445,10 +2442,9 @@ static void edge_set_termios(struct tty_struct *tty, | |||
2445 | return; | 2442 | return; |
2446 | /* change the port settings to the new ones specified */ | 2443 | /* change the port settings to the new ones specified */ |
2447 | change_port_settings(tty, edge_port, old_termios); | 2444 | change_port_settings(tty, edge_port, old_termios); |
2448 | return; | ||
2449 | } | 2445 | } |
2450 | 2446 | ||
2451 | static int edge_tiocmset(struct tty_struct *tty, struct file *file, | 2447 | static int edge_tiocmset(struct tty_struct *tty, |
2452 | unsigned int set, unsigned int clear) | 2448 | unsigned int set, unsigned int clear) |
2453 | { | 2449 | { |
2454 | struct usb_serial_port *port = tty->driver_data; | 2450 | struct usb_serial_port *port = tty->driver_data; |
@@ -2481,7 +2477,7 @@ static int edge_tiocmset(struct tty_struct *tty, struct file *file, | |||
2481 | return 0; | 2477 | return 0; |
2482 | } | 2478 | } |
2483 | 2479 | ||
2484 | static int edge_tiocmget(struct tty_struct *tty, struct file *file) | 2480 | static int edge_tiocmget(struct tty_struct *tty) |
2485 | { | 2481 | { |
2486 | struct usb_serial_port *port = tty->driver_data; | 2482 | struct usb_serial_port *port = tty->driver_data; |
2487 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 2483 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
@@ -2510,6 +2506,27 @@ static int edge_tiocmget(struct tty_struct *tty, struct file *file) | |||
2510 | return result; | 2506 | return result; |
2511 | } | 2507 | } |
2512 | 2508 | ||
2509 | static int edge_get_icount(struct tty_struct *tty, | ||
2510 | struct serial_icounter_struct *icount) | ||
2511 | { | ||
2512 | struct usb_serial_port *port = tty->driver_data; | ||
2513 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | ||
2514 | struct async_icount *ic = &edge_port->icount; | ||
2515 | |||
2516 | icount->cts = ic->cts; | ||
2517 | icount->dsr = ic->dsr; | ||
2518 | icount->rng = ic->rng; | ||
2519 | icount->dcd = ic->dcd; | ||
2520 | icount->tx = ic->tx; | ||
2521 | icount->rx = ic->rx; | ||
2522 | icount->frame = ic->frame; | ||
2523 | icount->parity = ic->parity; | ||
2524 | icount->overrun = ic->overrun; | ||
2525 | icount->brk = ic->brk; | ||
2526 | icount->buf_overrun = ic->buf_overrun; | ||
2527 | return 0; | ||
2528 | } | ||
2529 | |||
2513 | static int get_serial_info(struct edgeport_port *edge_port, | 2530 | static int get_serial_info(struct edgeport_port *edge_port, |
2514 | struct serial_struct __user *retinfo) | 2531 | struct serial_struct __user *retinfo) |
2515 | { | 2532 | { |
@@ -2535,7 +2552,7 @@ static int get_serial_info(struct edgeport_port *edge_port, | |||
2535 | return 0; | 2552 | return 0; |
2536 | } | 2553 | } |
2537 | 2554 | ||
2538 | static int edge_ioctl(struct tty_struct *tty, struct file *file, | 2555 | static int edge_ioctl(struct tty_struct *tty, |
2539 | unsigned int cmd, unsigned long arg) | 2556 | unsigned int cmd, unsigned long arg) |
2540 | { | 2557 | { |
2541 | struct usb_serial_port *port = tty->driver_data; | 2558 | struct usb_serial_port *port = tty->driver_data; |
@@ -2572,13 +2589,6 @@ static int edge_ioctl(struct tty_struct *tty, struct file *file, | |||
2572 | } | 2589 | } |
2573 | /* not reached */ | 2590 | /* not reached */ |
2574 | break; | 2591 | break; |
2575 | case TIOCGICOUNT: | ||
2576 | dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__, | ||
2577 | port->number, edge_port->icount.rx, edge_port->icount.tx); | ||
2578 | if (copy_to_user((void __user *)arg, &edge_port->icount, | ||
2579 | sizeof(edge_port->icount))) | ||
2580 | return -EFAULT; | ||
2581 | return 0; | ||
2582 | } | 2592 | } |
2583 | return -ENOIOCTLCMD; | 2593 | return -ENOIOCTLCMD; |
2584 | } | 2594 | } |
@@ -2758,6 +2768,7 @@ static struct usb_serial_driver edgeport_1port_device = { | |||
2758 | .set_termios = edge_set_termios, | 2768 | .set_termios = edge_set_termios, |
2759 | .tiocmget = edge_tiocmget, | 2769 | .tiocmget = edge_tiocmget, |
2760 | .tiocmset = edge_tiocmset, | 2770 | .tiocmset = edge_tiocmset, |
2771 | .get_icount = edge_get_icount, | ||
2761 | .write = edge_write, | 2772 | .write = edge_write, |
2762 | .write_room = edge_write_room, | 2773 | .write_room = edge_write_room, |
2763 | .chars_in_buffer = edge_chars_in_buffer, | 2774 | .chars_in_buffer = edge_chars_in_buffer, |