Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/tty/serial/8250/8250_port.c | 7 ++++++-
+ drivers/tty/serial/8250/8250_port.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
-diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
-index 4a0793e1ba61..ecd2b3d252ec 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -3289,8 +3289,13 @@ static void serial8250_console_restore(struct uart_8250_port *up)
+@@ -3288,8 +3288,13 @@ static void serial8250_console_restore(s
unsigned int baud, quot, frac = 0;
termios.c_cflag = port->cons->cflag;
baud = serial8250_get_baud_rate(port, &termios, NULL);
quot = serial8250_get_divisor(port, baud, &frac);
---
-2.35.1
-
+++ /dev/null
-From 9906890c89e4dbd900ed87ad3040080339a7f411 Mon Sep 17 00:00:00 2001
-From: "Maciej W. Rozycki" <macro@orcam.me.uk>
-Date: Wed, 21 Sep 2022 00:35:32 +0100
-Subject: serial: 8250: Let drivers request full 16550A feature probing
-
-From: Maciej W. Rozycki <macro@orcam.me.uk>
-
-commit 9906890c89e4dbd900ed87ad3040080339a7f411 upstream.
-
-A SERIAL_8250_16550A_VARIANTS configuration option has been recently
-defined that lets one request the 8250 driver not to probe for 16550A
-device features so as to reduce the driver's device startup time in
-virtual machines.
-
-Some actual hardware devices require these features to have been fully
-determined however for their driver to work correctly, so define a flag
-to let drivers request full 16550A feature probing on a device-by-device
-basis if required regardless of the SERIAL_8250_16550A_VARIANTS option
-setting chosen.
-
-Fixes: dc56ecb81a0a ("serial: 8250: Support disabling mdelay-filled probes of 16550A variants")
-Cc: stable@vger.kernel.org # v5.6+
-Reported-by: Anders Blomdell <anders.blomdell@control.lth.se>
-Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
-Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209202357520.41633@angie.orcam.me.uk
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/serial/8250/8250_port.c | 3 ++-
- include/linux/serial_core.h | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
---- a/drivers/tty/serial/8250/8250_port.c
-+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -1021,7 +1021,8 @@ static void autoconfig_16550a(struct uar
- up->port.type = PORT_16550A;
- up->capabilities |= UART_CAP_FIFO;
-
-- if (!IS_ENABLED(CONFIG_SERIAL_8250_16550A_VARIANTS))
-+ if (!IS_ENABLED(CONFIG_SERIAL_8250_16550A_VARIANTS) &&
-+ !(up->port.flags & UPF_FULL_PROBE))
- return;
-
- /*
---- a/include/linux/serial_core.h
-+++ b/include/linux/serial_core.h
-@@ -100,7 +100,7 @@ struct uart_icount {
- __u32 buf_overrun;
- };
-
--typedef unsigned int __bitwise upf_t;
-+typedef u64 __bitwise upf_t;
- typedef unsigned int __bitwise upstat_t;
-
- struct uart_port {
-@@ -207,6 +207,7 @@ struct uart_port {
- #define UPF_FIXED_PORT ((__force upf_t) (1 << 29))
- #define UPF_DEAD ((__force upf_t) (1 << 30))
- #define UPF_IOREMAP ((__force upf_t) (1 << 31))
-+#define UPF_FULL_PROBE ((__force upf_t) (1ULL << 32))
-
- #define __UPF_CHANGE_MASK 0x17fff
- #define UPF_CHANGE_MASK ((__force upf_t) __UPF_CHANGE_MASK)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/tty/serial/8250/8250_core.c | 16 +++++++++++-----
- drivers/tty/serial/8250/8250_port.c | 8 +++++---
- include/linux/serial_8250.h | 1 +
+ drivers/tty/serial/8250/8250_core.c | 16 +++++++++++-----
+ drivers/tty/serial/8250/8250_port.c | 8 +++++---
+ include/linux/serial_8250.h | 1 +
3 files changed, 17 insertions(+), 8 deletions(-)
-diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
-index aae9d26ce4f4..0a7e9491b4d1 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
-@@ -310,10 +310,9 @@ static void serial8250_backup_timeout(struct timer_list *t)
+@@ -310,10 +310,9 @@ static void serial8250_backup_timeout(st
jiffies + uart_poll_timeout(&up->port) + HZ / 5);
}
/*
* The above check will only give an accurate result the first time
-@@ -334,10 +333,16 @@ static int univ8250_setup_irq(struct uart_8250_port *up)
+@@ -334,10 +333,16 @@ static int univ8250_setup_irq(struct uar
*/
if (!port->irq)
mod_timer(&up->timer, jiffies + uart_poll_timeout(port));
- else
- retval = serial_link_irq_chain(up);
+}
-
-- return retval;
++
+static int univ8250_setup_irq(struct uart_8250_port *up)
+{
+ struct uart_port *port = &up->port;
+
+ if (port->irq)
+ return serial_link_irq_chain(up);
-+
+
+- return retval;
+ return 0;
}
static void univ8250_release_irq(struct uart_8250_port *up)
-@@ -393,6 +398,7 @@ static struct uart_ops univ8250_port_ops;
+@@ -393,6 +398,7 @@ static struct uart_ops univ8250_port_ops
static const struct uart_8250_ops univ8250_driver_ops = {
.setup_irq = univ8250_setup_irq,
.release_irq = univ8250_release_irq,
};
static struct uart_8250_port serial8250_ports[UART_NR];
-diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
-index 6de188b121d7..4a0793e1ba61 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -2277,6 +2277,10 @@ int serial8250_do_startup(struct uart_port *port)
+@@ -2276,6 +2276,10 @@ int serial8250_do_startup(struct uart_po
if (port->irq && (up->port.flags & UPF_SHARE_IRQ))
up->port.irqflags |= IRQF_SHARED;
if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
unsigned char iir1;
-@@ -2319,9 +2323,7 @@ int serial8250_do_startup(struct uart_port *port)
+@@ -2318,9 +2322,7 @@ int serial8250_do_startup(struct uart_po
}
}
/*
* Now, initialize the UART
-diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
-index 2b70f736b091..92f3b778d8c2 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -74,6 +74,7 @@ struct uart_8250_port;
};
struct uart_8250_em485 {
---
-2.35.1
-
block-fix-inflight-statistics-of-part0.patch
mm-mmap-undo-mmap-when-arch_validate_flags-fails.patch
pci-sanitise-firmware-bar-assignments-behind-a-pci-pci-bridge.patch
-serial-8250-let-drivers-request-full-16550a-feature-probing.patch
powercap-intel_rapl-use-standard-energy-unit-for-spr-dram-rapl-domain.patch
powerpc-boot-explicitly-disable-usage-of-spe-instructions.patch
scsi-qedf-populate-sysfs-attributes-for-vport.patch