Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3cb500e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial bugfixes from Greg KH:
 "Here are some tty / serial driver bugfixes for 3.16-rc2 that resolve
  some reported issues.  The samsung driver build error itself has been
  reported by a bunch of people, sorry about that one.  The others are
  all tiny and everyone seems to like them in linux-next so far"

* tag 'tty-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty/serial: fix 8250 early console option passing to regular console
  tty: Correct INPCK handling
  serial: Fix IGNBRK handling
  serial: samsung: Fix build error
parents 564fbee9 60efcf04
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -1214,15 +1214,16 @@ static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c)
{
	struct n_tty_data *ldata = tty->disc_data;

	if (I_INPCK(tty)) {
		if (I_IGNPAR(tty))
			return;
		if (I_PARMRK(tty)) {
			put_tty_queue('\377', ldata);
			put_tty_queue('\0', ldata);
			put_tty_queue(c, ldata);
	} else	if (I_INPCK(tty))
		} else
			put_tty_queue('\0', ldata);
	else
	} else
		put_tty_queue(c, ldata);
	if (waitqueue_active(&tty->read_wait))
		wake_up_interruptible(&tty->read_wait);
+1 −1
Original line number Diff line number Diff line
@@ -2357,7 +2357,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
	port->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
	if (termios->c_iflag & INPCK)
		port->read_status_mask |= UART_LSR_FE | UART_LSR_PE;
	if (termios->c_iflag & (BRKINT | PARMRK))
	if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))
		port->read_status_mask |= UART_LSR_BI;

	/*
+4 −1
Original line number Diff line number Diff line
@@ -144,8 +144,11 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
	if (!(device->port.membase || device->port.iobase))
		return 0;

	if (!device->baud)
	if (!device->baud) {
		device->baud = probe_baud(&device->port);
		snprintf(device->options, sizeof(device->options), "%u",
			 device->baud);
	}

	init_port(device);

+6 −0
Original line number Diff line number Diff line
@@ -185,6 +185,12 @@ static void altera_uart_set_termios(struct uart_port *port,
	uart_update_timeout(port, termios->c_cflag, baud);
	altera_uart_writel(port, baudclk, ALTERA_UART_DIVISOR_REG);
	spin_unlock_irqrestore(&port->lock, flags);

	/*
	 * FIXME: port->read_status_mask and port->ignore_status_mask
	 * need to be initialized based on termios settings for
	 * INPCK, IGNBRK, IGNPAR, PARMRK, BRKINT
	 */
}

static void altera_uart_rx_chars(struct altera_uart *pp)
+1 −1
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
	uap->port.read_status_mask = UART01x_RSR_OE;
	if (termios->c_iflag & INPCK)
		uap->port.read_status_mask |= UART01x_RSR_FE | UART01x_RSR_PE;
	if (termios->c_iflag & (BRKINT | PARMRK))
	if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))
		uap->port.read_status_mask |= UART01x_RSR_BE;

	/*
Loading