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

Commit 98f8b83d authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

serial: sunsab: Don't enable tx if tx stopped



The serial core may call the UART driver's start_tx() even if
tx is stopped; the UART driver must verify tx should be enabled
before transmitting.

Reported-by: default avatarSam Ravnborg <sam@ravnborg.org>
cc: David S. Miller <davem@davemloft.net>
cc: <sparclinux@vger.kernel.org>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16f404e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ static void sunsab_start_tx(struct uart_port *port)
	struct circ_buf *xmit = &up->port.state->xmit;
	int i;

	if (uart_circ_empty(xmit))
	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
		return;

	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);