Commit 3a537430 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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.xmit_fifo_size != state->xmit_fifo_size) ||
		    ((new_serial.flags & ~ASYNC_USR_MASK) !=
		     (port->flags & ~ASYNC_USR_MASK)))
		     (port->flags & ~ASYNC_USR_MASK))) {
			tty_unlock();
			return -EPERM;
		}
		port->flags = ((port->flags & ~ASYNC_USR_MASK) |
			       (new_serial.flags & ASYNC_USR_MASK));
		state->custom_divisor = new_serial.custom_divisor;
+8 −6
Original line number Diff line number Diff line
@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
		port->x_char = 0;
		return IRQ_HANDLED;
	}
	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
		clps711xuart_stop_tx(port);
		return IRQ_HANDLED;
	}

	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
		goto disable_tx_irq;

	count = port->fifosize >> 1;
	do {
@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
		uart_write_wakeup(port);

	if (uart_circ_empty(xmit))
		clps711xuart_stop_tx(port);
	if (uart_circ_empty(xmit)) {
	disable_tx_irq:
		disable_irq_nosync(TX_IRQ(port));
		tx_enabled(port) = 0;
	}

	return IRQ_HANDLED;
}
+3 −1
Original line number Diff line number Diff line
@@ -1447,9 +1447,11 @@ static int pch_uart_verify_port(struct uart_port *port,
			__func__);
		return -EOPNOTSUPP;
#endif
		priv->use_dma = 1;
		priv->use_dma_flag = 1;
		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;