mirror of https://gitee.com/openkylin/linux.git
TTY fixes for 3.4-rc4
Here are 3 tiny bugfixes for 3.4-rc4. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEABECAAYFAk+RmIIACgkQMUfUDdst+yl9swCgyW6z7hga+MgBFmZHDISTX6B+ VcMAniQywDirSgalPRI8ztX3wbgD1IIs =eP8N -----END PGP SIGNATURE----- Merge tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull 3 tiny tty bugfixes from Greg Kroah-Hartman. * tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: drivers/tty/amiserial.c: add missing tty_unlock pch_uart: Fix dma channel unallocated issue ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
This commit is contained in:
commit
3a53743039
|
@ -1073,8 +1073,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
|
||||||
(new_serial.close_delay != port->close_delay) ||
|
(new_serial.close_delay != port->close_delay) ||
|
||||||
(new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
|
(new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
|
||||||
((new_serial.flags & ~ASYNC_USR_MASK) !=
|
((new_serial.flags & ~ASYNC_USR_MASK) !=
|
||||||
(port->flags & ~ASYNC_USR_MASK)))
|
(port->flags & ~ASYNC_USR_MASK))) {
|
||||||
|
tty_unlock();
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
}
|
||||||
port->flags = ((port->flags & ~ASYNC_USR_MASK) |
|
port->flags = ((port->flags & ~ASYNC_USR_MASK) |
|
||||||
(new_serial.flags & ASYNC_USR_MASK));
|
(new_serial.flags & ASYNC_USR_MASK));
|
||||||
state->custom_divisor = new_serial.custom_divisor;
|
state->custom_divisor = new_serial.custom_divisor;
|
||||||
|
|
|
@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
|
||||||
port->x_char = 0;
|
port->x_char = 0;
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
|
|
||||||
clps711xuart_stop_tx(port);
|
if (uart_circ_empty(xmit) || uart_tx_stopped(port))
|
||||||
return IRQ_HANDLED;
|
goto disable_tx_irq;
|
||||||
}
|
|
||||||
|
|
||||||
count = port->fifosize >> 1;
|
count = port->fifosize >> 1;
|
||||||
do {
|
do {
|
||||||
|
@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
|
||||||
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
|
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
|
||||||
uart_write_wakeup(port);
|
uart_write_wakeup(port);
|
||||||
|
|
||||||
if (uart_circ_empty(xmit))
|
if (uart_circ_empty(xmit)) {
|
||||||
clps711xuart_stop_tx(port);
|
disable_tx_irq:
|
||||||
|
disable_irq_nosync(TX_IRQ(port));
|
||||||
|
tx_enabled(port) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1447,9 +1447,11 @@ static int pch_uart_verify_port(struct uart_port *port,
|
||||||
__func__);
|
__func__);
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
#endif
|
#endif
|
||||||
priv->use_dma = 1;
|
|
||||||
priv->use_dma_flag = 1;
|
priv->use_dma_flag = 1;
|
||||||
dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
|
dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
|
||||||
|
if (!priv->use_dma)
|
||||||
|
pch_request_dma(port);
|
||||||
|
priv->use_dma = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue