Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open"
commitf28c1d0a78a8c6a217ac5362cb719efa169ae2a7
authorDave Martin <Dave.Martin@arm.com>
Mon, 27 Apr 2015 15:49:04 +0000 (27 16:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:26:56 +0000 (6 22:26 +0200)
tree791fbd7d101451c024e11a907d4080fc89c6fcc0
parent5ebe6afaf0057ac3eaeb98defd5456894b446d22
Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open"

This reverts commit f2ee6dfa0e8597eea8b98d240b0033994e20d215.

Jakub KiciƄski observed that this patch can cause the pl011
driver to hang if if the only process with a pl011 port open is
killed by a signal, pl011_shutdown() can get called with an
arbitrary amount of data still in the FIFO.

Calling _shutdown() with the TX FIFO non-empty is questionable
behaviour and my itself be a bug.

Since the affected patch was speculative anyway, and brings limited
benefit, the simplest course is to remove the assumption that TXIS
will always be left asserted after the port is shut down.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c