Commit 3a537430 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 1cd653a6 d3a7b83f
...@@ -1073,8 +1073,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state, ...@@ -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) ...@@ -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) ...@@ -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, ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment