diff options
Diffstat (limited to 'drivers/tty')
| -rw-r--r-- | drivers/tty/amiserial.c | 3 | ||||
| -rw-r--r-- | drivers/tty/n_tty.c | 22 | ||||
| -rw-r--r-- | drivers/tty/serial/8250/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 3 | ||||
| -rw-r--r-- | drivers/tty/serial/sh-sci.c | 2 | ||||
| -rw-r--r-- | drivers/tty/tty_io.c | 1 |
6 files changed, 23 insertions, 10 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 2b86f8e0fb58..71630a2af42c 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
| @@ -1855,6 +1855,9 @@ static struct console sercons = { | |||
| 1855 | */ | 1855 | */ |
| 1856 | static int __init amiserial_console_init(void) | 1856 | static int __init amiserial_console_init(void) |
| 1857 | { | 1857 | { |
| 1858 | if (!MACH_IS_AMIGA) | ||
| 1859 | return -ENODEV; | ||
| 1860 | |||
| 1858 | register_console(&sercons); | 1861 | register_console(&sercons); |
| 1859 | return 0; | 1862 | return 0; |
| 1860 | } | 1863 | } |
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 7cdd1eb9406c..268b62768f2b 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
| @@ -768,7 +768,7 @@ static size_t __process_echoes(struct tty_struct *tty) | |||
| 768 | * data at the tail to prevent a subsequent overrun */ | 768 | * data at the tail to prevent a subsequent overrun */ |
| 769 | while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) { | 769 | while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) { |
| 770 | if (echo_buf(ldata, tail) == ECHO_OP_START) { | 770 | if (echo_buf(ldata, tail) == ECHO_OP_START) { |
| 771 | if (echo_buf(ldata, tail) == ECHO_OP_ERASE_TAB) | 771 | if (echo_buf(ldata, tail + 1) == ECHO_OP_ERASE_TAB) |
| 772 | tail += 3; | 772 | tail += 3; |
| 773 | else | 773 | else |
| 774 | tail += 2; | 774 | tail += 2; |
| @@ -810,7 +810,8 @@ static void process_echoes(struct tty_struct *tty) | |||
| 810 | struct n_tty_data *ldata = tty->disc_data; | 810 | struct n_tty_data *ldata = tty->disc_data; |
| 811 | size_t echoed; | 811 | size_t echoed; |
| 812 | 812 | ||
| 813 | if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_tail) | 813 | if ((!L_ECHO(tty) && !L_ECHONL(tty)) || |
| 814 | ldata->echo_commit == ldata->echo_tail) | ||
| 814 | return; | 815 | return; |
| 815 | 816 | ||
| 816 | mutex_lock(&ldata->output_lock); | 817 | mutex_lock(&ldata->output_lock); |
| @@ -825,7 +826,8 @@ static void flush_echoes(struct tty_struct *tty) | |||
| 825 | { | 826 | { |
| 826 | struct n_tty_data *ldata = tty->disc_data; | 827 | struct n_tty_data *ldata = tty->disc_data; |
| 827 | 828 | ||
| 828 | if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_head) | 829 | if ((!L_ECHO(tty) && !L_ECHONL(tty)) || |
| 830 | ldata->echo_commit == ldata->echo_head) | ||
| 829 | return; | 831 | return; |
| 830 | 832 | ||
| 831 | mutex_lock(&ldata->output_lock); | 833 | mutex_lock(&ldata->output_lock); |
| @@ -1998,7 +2000,10 @@ static int canon_copy_from_read_buf(struct tty_struct *tty, | |||
| 1998 | found = 1; | 2000 | found = 1; |
| 1999 | 2001 | ||
| 2000 | size = N_TTY_BUF_SIZE - tail; | 2002 | size = N_TTY_BUF_SIZE - tail; |
| 2001 | n = (found + eol + size) & (N_TTY_BUF_SIZE - 1); | 2003 | n = eol - tail; |
| 2004 | if (n > 4096) | ||
| 2005 | n += 4096; | ||
| 2006 | n += found; | ||
| 2002 | c = n; | 2007 | c = n; |
| 2003 | 2008 | ||
| 2004 | if (found && read_buf(ldata, eol) == __DISABLED_CHAR) { | 2009 | if (found && read_buf(ldata, eol) == __DISABLED_CHAR) { |
| @@ -2243,18 +2248,19 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, | |||
| 2243 | if (time) | 2248 | if (time) |
| 2244 | timeout = time; | 2249 | timeout = time; |
| 2245 | } | 2250 | } |
| 2246 | mutex_unlock(&ldata->atomic_read_lock); | 2251 | n_tty_set_room(tty); |
| 2247 | remove_wait_queue(&tty->read_wait, &wait); | 2252 | up_read(&tty->termios_rwsem); |
| 2248 | 2253 | ||
| 2254 | remove_wait_queue(&tty->read_wait, &wait); | ||
| 2249 | if (!waitqueue_active(&tty->read_wait)) | 2255 | if (!waitqueue_active(&tty->read_wait)) |
| 2250 | ldata->minimum_to_wake = minimum; | 2256 | ldata->minimum_to_wake = minimum; |
| 2251 | 2257 | ||
| 2258 | mutex_unlock(&ldata->atomic_read_lock); | ||
| 2259 | |||
| 2252 | __set_current_state(TASK_RUNNING); | 2260 | __set_current_state(TASK_RUNNING); |
| 2253 | if (b - buf) | 2261 | if (b - buf) |
| 2254 | retval = b - buf; | 2262 | retval = b - buf; |
| 2255 | 2263 | ||
| 2256 | n_tty_set_room(tty); | ||
| 2257 | up_read(&tty->termios_rwsem); | ||
| 2258 | return retval; | 2264 | return retval; |
| 2259 | } | 2265 | } |
| 2260 | 2266 | ||
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index f3b306efaa59..23329918f229 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig | |||
| @@ -41,7 +41,7 @@ config SERIAL_8250_DEPRECATED_OPTIONS | |||
| 41 | accept kernel parameters in both forms like 8250_core.nr_uarts=4 and | 41 | accept kernel parameters in both forms like 8250_core.nr_uarts=4 and |
| 42 | 8250.nr_uarts=4. We now renamed the module back to 8250, but if | 42 | 8250.nr_uarts=4. We now renamed the module back to 8250, but if |
| 43 | anybody noticed in 3.7 and changed their userspace we still have to | 43 | anybody noticed in 3.7 and changed their userspace we still have to |
| 44 | keep the 8350_core.* options around until they revert the changes | 44 | keep the 8250_core.* options around until they revert the changes |
| 45 | they already did. | 45 | they already did. |
| 46 | 46 | ||
| 47 | If 8250 is built as a module, this adds 8250_core alias instead. | 47 | If 8250 is built as a module, this adds 8250_core alias instead. |
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 481b781b26e3..e9d420ff3931 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
| @@ -2052,6 +2052,9 @@ static int __init pmz_console_init(void) | |||
| 2052 | /* Probe ports */ | 2052 | /* Probe ports */ |
| 2053 | pmz_probe(); | 2053 | pmz_probe(); |
| 2054 | 2054 | ||
| 2055 | if (pmz_ports_count == 0) | ||
| 2056 | return -ENODEV; | ||
| 2057 | |||
| 2055 | /* TODO: Autoprobe console based on OF */ | 2058 | /* TODO: Autoprobe console based on OF */ |
| 2056 | /* pmz_console.index = i; */ | 2059 | /* pmz_console.index = i; */ |
| 2057 | register_console(&pmz_console); | 2060 | register_console(&pmz_console); |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 537750261aaa..7d8103cd3e2e 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
| @@ -1433,7 +1433,7 @@ static void work_fn_rx(struct work_struct *work) | |||
| 1433 | desc = s->desc_rx[new]; | 1433 | desc = s->desc_rx[new]; |
| 1434 | 1434 | ||
| 1435 | if (dma_async_is_tx_complete(s->chan_rx, s->active_rx, NULL, NULL) != | 1435 | if (dma_async_is_tx_complete(s->chan_rx, s->active_rx, NULL, NULL) != |
| 1436 | DMA_SUCCESS) { | 1436 | DMA_COMPLETE) { |
| 1437 | /* Handle incomplete DMA receive */ | 1437 | /* Handle incomplete DMA receive */ |
| 1438 | struct dma_chan *chan = s->chan_rx; | 1438 | struct dma_chan *chan = s->chan_rx; |
| 1439 | struct shdma_desc *sh_desc = container_of(desc, | 1439 | struct shdma_desc *sh_desc = container_of(desc, |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3a1a01af9a80..c74a00ad7add 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
| @@ -2086,6 +2086,7 @@ retry_open: | |||
| 2086 | filp->f_op = &tty_fops; | 2086 | filp->f_op = &tty_fops; |
| 2087 | goto retry_open; | 2087 | goto retry_open; |
| 2088 | } | 2088 | } |
| 2089 | clear_bit(TTY_HUPPED, &tty->flags); | ||
| 2089 | tty_unlock(tty); | 2090 | tty_unlock(tty); |
| 2090 | 2091 | ||
| 2091 | 2092 | ||
