Commit 82776f6c authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman

tty: serial: 21285: fix lockup on open

Commit 293f8995 ("tty: serial: 21285: stop using the unused[]
variable from struct uart_port") introduced a bug which stops the
transmit interrupt being disabled when there are no characters to
transmit - disabling the transmit interrupt at the interrupt controller
is the only way to stop an interrupt storm. If this interrupt is not
disabled when there are no transmit characters, we end up with an
interrupt storm which prevents the machine making forward progress.

Fixes: 293f8995 ("tty: serial: 21285: stop using the unused[] variable from struct uart_port")
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/E1kU4GS-0006lE-OO@rmk-PC.armlinux.org.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3650b228
......@@ -50,25 +50,25 @@ static const char serial21285_name[] = "Footbridge UART";
static bool is_enabled(struct uart_port *port, int bit)
{
unsigned long private_data = (unsigned long)port->private_data;
unsigned long *private_data = (unsigned long *)&port->private_data;
if (test_bit(bit, &private_data))
if (test_bit(bit, private_data))
return true;
return false;
}
static void enable(struct uart_port *port, int bit)
{
unsigned long private_data = (unsigned long)port->private_data;
unsigned long *private_data = (unsigned long *)&port->private_data;
set_bit(bit, &private_data);
set_bit(bit, private_data);
}
static void disable(struct uart_port *port, int bit)
{
unsigned long private_data = (unsigned long)port->private_data;
unsigned long *private_data = (unsigned long *)&port->private_data;
clear_bit(bit, &private_data);
clear_bit(bit, private_data);
}
#define is_tx_enabled(port) is_enabled(port, tx_enabled_bit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment