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

Commit 82b35f37 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial driver fixes from Greg KH:
 "Here are a number of small serial and tty fixes for reported issues.

  All have been in linux-next successfully"

* tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()
  serial: core: Fix crashes while echoing when closing
  m32r: Add ioreadXX/iowriteXX big-endian mmio accessors
  Revert "serial: imx: initialized DMA w/o HW flow enabled"
  sc16is7xx: fix FIFO address of secondary UART
  sc16is7xx: fix Kconfig dependencies
  serial: etraxfs-uart: Fix release etraxfs_uart_ports
  tty/vt: Fix the memory leak in visual_init
  serial: amba-pl011: Fix devm_ioremap_resource return value check
  n_tty: signal and flush atomically
parents b0de415a 61e86cc9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -174,6 +174,11 @@ static inline void _writel(unsigned long l, unsigned long addr)
#define iowrite16 writew
#define iowrite32 writel

#define ioread16be(addr)	be16_to_cpu(readw(addr))
#define ioread32be(addr)	be32_to_cpu(readl(addr))
#define iowrite16be(v, addr)	writew(cpu_to_be16(v), (addr))
#define iowrite32be(v, addr)	writel(cpu_to_be32(v), (addr))

#define mmiowb()

#define flush_write_buffers() do { } while (0)  /* M32R_FIXME */
+13 −3
Original line number Diff line number Diff line
@@ -1108,19 +1108,29 @@ static void eraser(unsigned char c, struct tty_struct *tty)
 *	Locking: ctrl_lock
 */

static void isig(int sig, struct tty_struct *tty)
static void __isig(int sig, struct tty_struct *tty)
{
	struct n_tty_data *ldata = tty->disc_data;
	struct pid *tty_pgrp = tty_get_pgrp(tty);
	if (tty_pgrp) {
		kill_pgrp(tty_pgrp, sig, 1);
		put_pid(tty_pgrp);
	}
}

	if (!L_NOFLSH(tty)) {
static void isig(int sig, struct tty_struct *tty)
{
	struct n_tty_data *ldata = tty->disc_data;

	if (L_NOFLSH(tty)) {
		/* signal only */
		__isig(sig, tty);

	} else { /* signal and flush */
		up_read(&tty->termios_rwsem);
		down_write(&tty->termios_rwsem);

		__isig(sig, tty);

		/* clear echo buffer */
		mutex_lock(&ldata->output_lock);
		ldata->echo_head = ldata->echo_tail = 0;
+1 −1
Original line number Diff line number Diff line
@@ -1185,7 +1185,7 @@ config SERIAL_SC16IS7XX_CORE
config SERIAL_SC16IS7XX
        tristate "SC16IS7xx serial support"
        select SERIAL_CORE
        depends on I2C || SPI_MASTER
        depends on (SPI_MASTER && !I2C) || I2C
        help
          This selects support for SC16IS7xx serial ports.
          Supported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752,
+2 −2
Original line number Diff line number Diff line
@@ -2310,8 +2310,8 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
	void __iomem *base;

	base = devm_ioremap_resource(dev, mmiobase);
	if (!base)
		return -ENOMEM;
	if (IS_ERR(base))
		return PTR_ERR(base);

	index = pl011_probe_dt_alias(index, dev);

+1 −1
Original line number Diff line number Diff line
@@ -950,7 +950,7 @@ static int etraxfs_uart_remove(struct platform_device *pdev)

	port = platform_get_drvdata(pdev);
	uart_remove_one_port(&etraxfs_uart_driver, port);
	etraxfs_uart_ports[pdev->id] = NULL;
	etraxfs_uart_ports[port->line] = NULL;

	return 0;
}
Loading