aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <[email protected]>2022-04-18 16:27:10 +0100
committerGreg Kroah-Hartman <[email protected]>2022-04-22 16:38:06 +0200
commit6e6eebdf5e2455f089ccd000754a0deaeb79af82 (patch)
treef8e8a24f508d93db004e3cebbfc5838af723f819
parentf4f7d63287217ba25e5c80f5faae5e4f7118790e (diff)
serial: 8250: Also set sticky MCR bits in console restoration
Sticky MCR bits are lost in console restoration if console suspending has been disabled. This currently affects the AFE bit, which works in combination with RTS which we set, so we want to make sure the UART retains control of its FIFO where previously requested. Also specific drivers may need other bits in the future. Signed-off-by: Maciej W. Rozycki <[email protected]> Fixes: 4516d50aabed ("serial: 8250: Use canary to restart console after suspend") Cc: [email protected] # v4.0+ Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/tty/serial/8250/8250_port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 26f9330094bc..1fbd5bf264be 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3329,7 +3329,7 @@ static void serial8250_console_restore(struct uart_8250_port *up)
serial8250_set_divisor(port, baud, quot, frac);
serial_port_out(port, UART_LCR, up->lcr);
- serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
+ serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
}
/*