From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/tty/serial/8250/8250_core.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/kernel/drivers/tty/serial/8250/8250_core.c b/kernel/drivers/tty/serial/8250/8250_core.c
index bd52f7e..0a29e86 100644
--- a/kernel/drivers/tty/serial/8250/8250_core.c
+++ b/kernel/drivers/tty/serial/8250/8250_core.c
@@ -275,8 +275,10 @@
* Must disable interrupts or else we risk racing with the interrupt
* based handler.
*/
- if (up->port.irq)
- ier = serial8250_clear_IER(up);
+ if (up->port.irq) {
+ ier = serial_in(up, UART_IER);
+ serial_out(up, UART_IER, 0);
+ }
iir = serial_in(up, UART_IIR);
@@ -299,7 +301,7 @@
serial8250_tx_chars(up);
if (up->port.irq)
- serial8250_set_IER(up, ier);
+ serial_out(up, UART_IER, ier);
spin_unlock_irqrestore(&up->port.lock, flags);
@@ -582,14 +584,6 @@
#ifdef CONFIG_SERIAL_8250_CONSOLE
-static void univ8250_console_write_atomic(struct console *co, const char *s,
- unsigned int count)
-{
- struct uart_8250_port *up = &serial8250_ports[co->index];
-
- serial8250_console_write_atomic(up, s, count);
-}
-
static void univ8250_console_write(struct console *co, const char *s,
unsigned int count)
{
@@ -683,7 +677,6 @@
static struct console univ8250_console = {
.name = "ttyS",
- .write_atomic = univ8250_console_write_atomic,
.write = univ8250_console_write,
.device = uart_console_device,
.setup = univ8250_console_setup,
@@ -1170,6 +1163,7 @@
uart->port.type = PORT_UNKNOWN;
uart->port.dev = &serial8250_isa_devs->dev;
uart->capabilities = 0;
+ serial8250_init_port(uart);
serial8250_apply_quirks(uart);
uart_add_one_port(&serial8250_reg, &uart->port);
} else {
--
Gitblit v1.6.2