Merge 4.4-rc6 into tty-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 19:06:07 +0000 (11:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 19:06:07 +0000 (11:06 -0800)
We want the serial/tty fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1  2 
drivers/tty/n_tty.c
drivers/tty/serial/8250/8250_uniphier.c
drivers/tty/serial/earlycon.c

index f2f64252814f9bfb07ced7f090e6301fde2f831d,e49c2bce551d31db115b97f0a12807339258b69b..d9a5fc28fef4bbfe56850e258b726ca3464fd82b
@@@ -2087,18 -2080,25 +2087,17 @@@ static int canon_copy_from_read_buf(str
        n = eol - tail;
        if (n > N_TTY_BUF_SIZE)
                n += N_TTY_BUF_SIZE;
-       n += found;
-       c = n;
+       c = n + found;
  
-       if (found && !ldata->push && read_buf(ldata, eol) == __DISABLED_CHAR) {
-               n--;
-               eof_push = !n && ldata->read_tail != ldata->line_start;
+       if (!found || read_buf(ldata, eol) != __DISABLED_CHAR) {
+               c = min(*nr, c);
+               n = c;
        }
  
 -      n_tty_trace("%s: eol:%zu found:%d n:%zu c:%zu size:%zu more:%zu\n",
 -                  __func__, eol, found, n, c, size, more);
 -
 -      if (n > size) {
 -              ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), size);
 -              if (ret)
 -                      return -EFAULT;
 -              ret = tty_copy_to_user(tty, *b + size, ldata->read_buf, n - size);
 -      } else
 -              ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), n);
 +      n_tty_trace("%s: eol:%zu found:%d n:%zu c:%zu tail:%zu more:%zu\n",
 +                  __func__, eol, found, n, c, tail, more);
  
 +      ret = tty_copy_to_user(tty, *b, tail, n);
        if (ret)
                return -EFAULT;
        *b += n;
Simple merge
This page took 0.03023 seconds and 5 git commands to generate.