summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-06-18 08:15:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-18 13:10:02 +0200
commitaaa28e9f250ca0a63b69b7125a10d49e1c264f85 (patch)
treee1030a8a9088bcf3e6fa3926293e13219abf47f0 /drivers/tty
parent265ceff7aeaa1001b4bea810e1b832d138352b3f (diff)
mxser: decrypt FCR values
Currently, some of the values written to FCR are magic constants. But they are composed of well-defined bits. Use these named macros in place of the constants. No changes in objdump -d. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210618061516.662-62-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/mxser.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 1a8698e58b1c..c8ba062d8824 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1580,7 +1580,9 @@ static u8 mxser_receive_chars_old(struct tty_struct *tty,
ch = inb(port->ioaddr + UART_RX);
if (hwid && (status & UART_LSR_OE))
- outb(0x23, port->ioaddr + UART_FCR);
+ outb(UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR |
+ MOXA_MUST_FCR_GDA_MODE_ENABLE,
+ port->ioaddr + UART_FCR);
status &= port->read_status_mask;
if (status & port->ignore_status_mask) {
if (++ignored > 100)
@@ -1693,7 +1695,9 @@ static bool mxser_port_isr(struct mxser_port *port)
tty = tty_port_tty_get(&port->port);
if (!tty || port->closing || !tty_port_initialized(&port->port)) {
status = inb(port->ioaddr + UART_LSR);
- outb(0x27, port->ioaddr + UART_FCR);
+ outb(MOXA_MUST_FCR_GDA_MODE_ENABLE | UART_FCR_ENABLE_FIFO |
+ UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
+ port->ioaddr + UART_FCR);
inb(port->ioaddr + UART_MSR);
error = true;