mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Linux 4.4-rc6
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWd0J7AAoJEHm+PkMAQRiGm+cIAIWUlh9PQY5nH2C8Jta4HyTq u/MNLCoKM1LUjG7ZBryFxFG3X6BBMpfzUF011Nv5XC7oQj845dYxWK6f+lIKTq6N 8KsQkVrSv5SJ48o5Vj/ZTTrNt4rN54l0Camuwk8YXdtq6r6FSGzEkn33PQvQArAz z3Jln+dZod7NE7QhQqZHbTKvQTNuG0dkV/sEHHW4OoMo5Ag4KutZtlheQc9XdM9F jz0uEu4Nc3yHQM+DpuQ5qp3wSsUXoqcYRbsdpxwdeGgWXPqbkNBVgwlr68RsjQ0g HqIn2Bln7mJvJ7iZCWvniMHVrYHOPKceHjOsYgXRDUEav/2mA7Dyjj6ttbmNuOg= =5AQv -----END PGP SIGNATURE----- Merge tag 'v4.4-rc6' into devel Linux 4.4-rc6
This commit is contained in:
commit
0529357f10
1309 changed files with 16347 additions and 11897 deletions
|
|
@ -169,7 +169,7 @@ static inline int tty_copy_to_user(struct tty_struct *tty,
|
|||
{
|
||||
struct n_tty_data *ldata = tty->disc_data;
|
||||
|
||||
tty_audit_add_data(tty, to, n, ldata->icanon);
|
||||
tty_audit_add_data(tty, from, n, ldata->icanon);
|
||||
return copy_to_user(to, from, n);
|
||||
}
|
||||
|
||||
|
|
@ -2054,13 +2054,13 @@ static int canon_copy_from_read_buf(struct tty_struct *tty,
|
|||
size_t eol;
|
||||
size_t tail;
|
||||
int ret, found = 0;
|
||||
bool eof_push = 0;
|
||||
|
||||
/* N.B. avoid overrun if nr == 0 */
|
||||
n = min(*nr, smp_load_acquire(&ldata->canon_head) - ldata->read_tail);
|
||||
if (!n)
|
||||
if (!*nr)
|
||||
return 0;
|
||||
|
||||
n = min(*nr + 1, smp_load_acquire(&ldata->canon_head) - ldata->read_tail);
|
||||
|
||||
tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1);
|
||||
size = min_t(size_t, tail + n, N_TTY_BUF_SIZE);
|
||||
|
||||
|
|
@ -2081,12 +2081,11 @@ static int canon_copy_from_read_buf(struct tty_struct *tty,
|
|||
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",
|
||||
|
|
@ -2116,7 +2115,7 @@ static int canon_copy_from_read_buf(struct tty_struct *tty,
|
|||
ldata->push = 0;
|
||||
tty_audit_push(tty);
|
||||
}
|
||||
return eof_push ? -EAGAIN : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern ssize_t redirected_tty_write(struct file *, const char __user *,
|
||||
|
|
@ -2273,10 +2272,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
|
|||
|
||||
if (ldata->icanon && !L_EXTPROC(tty)) {
|
||||
retval = canon_copy_from_read_buf(tty, &b, &nr);
|
||||
if (retval == -EAGAIN) {
|
||||
retval = 0;
|
||||
continue;
|
||||
} else if (retval)
|
||||
if (retval)
|
||||
break;
|
||||
} else {
|
||||
int uncopied;
|
||||
|
|
|
|||
|
|
@ -60,3 +60,4 @@ int fsl8250_handle_irq(struct uart_port *port)
|
|||
spin_unlock_irqrestore(&up->port.lock, flags);
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl8250_handle_irq);
|
||||
|
|
|
|||
|
|
@ -115,12 +115,16 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
|
|||
*/
|
||||
static int uniphier_serial_dl_read(struct uart_8250_port *up)
|
||||
{
|
||||
return readl(up->port.membase + UNIPHIER_UART_DLR);
|
||||
int offset = UNIPHIER_UART_DLR << up->port.regshift;
|
||||
|
||||
return readl(up->port.membase + offset);
|
||||
}
|
||||
|
||||
static void uniphier_serial_dl_write(struct uart_8250_port *up, int value)
|
||||
{
|
||||
writel(value, up->port.membase + UNIPHIER_UART_DLR);
|
||||
int offset = UNIPHIER_UART_DLR << up->port.regshift;
|
||||
|
||||
writel(value, up->port.membase + offset);
|
||||
}
|
||||
|
||||
static int uniphier_of_serial_setup(struct device *dev, struct uart_port *port,
|
||||
|
|
|
|||
|
|
@ -373,6 +373,7 @@ config SERIAL_8250_MID
|
|||
depends on SERIAL_8250 && PCI
|
||||
select HSU_DMA if SERIAL_8250_DMA
|
||||
select HSU_DMA_PCI if X86_INTEL_MID
|
||||
select RATIONAL
|
||||
help
|
||||
Selecting this option will enable handling of the extra features
|
||||
present on the UART found on Intel Medfield SOC and various other
|
||||
|
|
|
|||
|
|
@ -1539,7 +1539,6 @@ config SERIAL_FSL_LPUART
|
|||
tristate "Freescale lpuart serial port support"
|
||||
depends on HAS_DMA
|
||||
select SERIAL_CORE
|
||||
select SERIAL_EARLYCON
|
||||
help
|
||||
Support for the on-chip lpuart on some Freescale SOCs.
|
||||
|
||||
|
|
@ -1547,6 +1546,7 @@ config SERIAL_FSL_LPUART_CONSOLE
|
|||
bool "Console on Freescale lpuart serial port"
|
||||
depends on SERIAL_FSL_LPUART=y
|
||||
select SERIAL_CORE_CONSOLE
|
||||
select SERIAL_EARLYCON
|
||||
help
|
||||
If you have enabled the lpuart serial port on the Freescale SoCs,
|
||||
you can make it the console by answering Y to this option.
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ static int bcm_uart_startup(struct uart_port *port)
|
|||
|
||||
/* register irq and enable rx interrupts */
|
||||
ret = request_irq(port->irq, bcm_uart_interrupt, 0,
|
||||
bcm_uart_type(port), port);
|
||||
dev_name(port->dev), port);
|
||||
if (ret)
|
||||
return ret;
|
||||
bcm_uart_writel(port, UART_RX_INT_MASK, UART_IR_REG);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
|
|||
if (buf && !parse_options(&early_console_dev, buf))
|
||||
buf = NULL;
|
||||
|
||||
spin_lock_init(&port->lock);
|
||||
port->uartclk = BASE_BAUD * 16;
|
||||
if (port->mapbase)
|
||||
port->membase = earlycon_map(port->mapbase, 64);
|
||||
|
|
@ -202,6 +203,7 @@ int __init of_setup_earlycon(unsigned long addr,
|
|||
int err;
|
||||
struct uart_port *port = &early_console_dev.port;
|
||||
|
||||
spin_lock_init(&port->lock);
|
||||
port->iotype = UPIO_MEM;
|
||||
port->mapbase = addr;
|
||||
port->uartclk = BASE_BAUD * 16;
|
||||
|
|
|
|||
|
|
@ -894,7 +894,7 @@ static int etraxfs_uart_probe(struct platform_device *pdev)
|
|||
up->regi_ser = of_iomap(np, 0);
|
||||
up->port.dev = &pdev->dev;
|
||||
|
||||
up->gpios = mctrl_gpio_init(&pdev->dev, 0);
|
||||
up->gpios = mctrl_gpio_init_noauto(&pdev->dev, 0);
|
||||
if (IS_ERR(up->gpios))
|
||||
return PTR_ERR(up->gpios);
|
||||
|
||||
|
|
|
|||
|
|
@ -1437,7 +1437,7 @@ static void sci_request_dma(struct uart_port *port)
|
|||
sg_init_table(sg, 1);
|
||||
s->rx_buf[i] = buf;
|
||||
sg_dma_address(sg) = dma;
|
||||
sg->length = s->buf_len_rx;
|
||||
sg_dma_len(sg) = s->buf_len_rx;
|
||||
|
||||
buf += s->buf_len_rx;
|
||||
dma += s->buf_len_rx;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ static struct tty_audit_buf *tty_audit_buf_get(struct tty_struct *tty,
|
|||
*
|
||||
* Audit @data of @size from @tty, if necessary.
|
||||
*/
|
||||
void tty_audit_add_data(struct tty_struct *tty, unsigned char *data,
|
||||
void tty_audit_add_data(struct tty_struct *tty, const void *data,
|
||||
size_t size, unsigned icanon)
|
||||
{
|
||||
struct tty_audit_buf *buf;
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ receive_buf(struct tty_struct *tty, struct tty_buffer *head, int count)
|
|||
count = disc->ops->receive_buf2(tty, p, f, count);
|
||||
else {
|
||||
count = min_t(int, count, tty->receive_room);
|
||||
if (count)
|
||||
if (count && disc->ops->receive_buf)
|
||||
disc->ops->receive_buf(tty, p, f, count);
|
||||
}
|
||||
return count;
|
||||
|
|
|
|||
|
|
@ -1282,18 +1282,22 @@ int tty_send_xchar(struct tty_struct *tty, char ch)
|
|||
int was_stopped = tty->stopped;
|
||||
|
||||
if (tty->ops->send_xchar) {
|
||||
down_read(&tty->termios_rwsem);
|
||||
tty->ops->send_xchar(tty, ch);
|
||||
up_read(&tty->termios_rwsem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (tty_write_lock(tty, 0) < 0)
|
||||
return -ERESTARTSYS;
|
||||
|
||||
down_read(&tty->termios_rwsem);
|
||||
if (was_stopped)
|
||||
start_tty(tty);
|
||||
tty->ops->write(tty, &ch, 1);
|
||||
if (was_stopped)
|
||||
stop_tty(tty);
|
||||
up_read(&tty->termios_rwsem);
|
||||
tty_write_unlock(tty);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1147,16 +1147,12 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
|
|||
spin_unlock_irq(&tty->flow_lock);
|
||||
break;
|
||||
case TCIOFF:
|
||||
down_read(&tty->termios_rwsem);
|
||||
if (STOP_CHAR(tty) != __DISABLED_CHAR)
|
||||
retval = tty_send_xchar(tty, STOP_CHAR(tty));
|
||||
up_read(&tty->termios_rwsem);
|
||||
break;
|
||||
case TCION:
|
||||
down_read(&tty->termios_rwsem);
|
||||
if (START_CHAR(tty) != __DISABLED_CHAR)
|
||||
retval = tty_send_xchar(tty, START_CHAR(tty));
|
||||
up_read(&tty->termios_rwsem);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)
|
|||
|
||||
/* Restart the work queue in case no characters kick it off. Safe if
|
||||
already running */
|
||||
schedule_work(&tty->port->buf.work);
|
||||
tty_buffer_restart_work(tty->port);
|
||||
|
||||
tty_unlock(tty);
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Reference in a new issue