]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Mar 2023 09:15:48 +0000 (10:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Mar 2023 09:15:48 +0000 (10:15 +0100)
added patches:
revert-tty-serial-fsl_lpuart-adjust-serial_fsl_lpuart_console-config-dependency.patch
serial-8250-aspeed_vuart-select-regmap-instead-of-depending-on-it.patch
serial-8250_em-fix-uart-port-type.patch
serial-8250_fsl-fix-handle_irq-locking.patch
tty-serial-fsl_lpuart-skip-waiting-for-transmission-complete-when-uartctrl_sbk-is-asserted.patch
tty-serial-qcom-geni-serial-stop-operations-in-progress-at-shutdown.patch

queue-6.1/revert-tty-serial-fsl_lpuart-adjust-serial_fsl_lpuart_console-config-dependency.patch [new file with mode: 0644]
queue-6.1/serial-8250-aspeed_vuart-select-regmap-instead-of-depending-on-it.patch [new file with mode: 0644]
queue-6.1/serial-8250_em-fix-uart-port-type.patch [new file with mode: 0644]
queue-6.1/serial-8250_fsl-fix-handle_irq-locking.patch [new file with mode: 0644]
queue-6.1/series
queue-6.1/tty-serial-fsl_lpuart-skip-waiting-for-transmission-complete-when-uartctrl_sbk-is-asserted.patch [new file with mode: 0644]
queue-6.1/tty-serial-qcom-geni-serial-stop-operations-in-progress-at-shutdown.patch [new file with mode: 0644]

diff --git a/queue-6.1/revert-tty-serial-fsl_lpuart-adjust-serial_fsl_lpuart_console-config-dependency.patch b/queue-6.1/revert-tty-serial-fsl_lpuart-adjust-serial_fsl_lpuart_console-config-dependency.patch
new file mode 100644 (file)
index 0000000..3f34a0f
--- /dev/null
@@ -0,0 +1,46 @@
+From 2d638be71155b2e036aca1966b6129e2d661e91f Mon Sep 17 00:00:00 2001
+From: Tom Rix <trix@redhat.com>
+Date: Sun, 26 Feb 2023 12:38:46 -0500
+Subject: Revert "tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency"
+
+From: Tom Rix <trix@redhat.com>
+
+commit 2d638be71155b2e036aca1966b6129e2d661e91f upstream.
+
+This reverts commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30.
+
+This results in a link error of
+
+ld: drivers/tty/serial/earlycon.o: in function `parse_options':
+drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
+
+When the config is in this state
+
+CONFIG_SERIAL_CORE=m
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_EARLYCON=y
+CONFIG_SERIAL_FSL_LPUART=m
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+
+Fixes: 5779a072c248 ("tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Tom Rix <trix@redhat.com>
+Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
+Acked-by: Jiri Slaby <jirislaby@kernel.org>
+Link: https://lore.kernel.org/r/20230226173846.236691-1-trix@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/Kconfig
++++ b/drivers/tty/serial/Kconfig
+@@ -1311,7 +1311,7 @@ config SERIAL_FSL_LPUART
+ config SERIAL_FSL_LPUART_CONSOLE
+       bool "Console on Freescale lpuart serial port"
+-      depends on SERIAL_FSL_LPUART
++      depends on SERIAL_FSL_LPUART=y
+       select SERIAL_CORE_CONSOLE
+       select SERIAL_EARLYCON
+       help
diff --git a/queue-6.1/serial-8250-aspeed_vuart-select-regmap-instead-of-depending-on-it.patch b/queue-6.1/serial-8250-aspeed_vuart-select-regmap-instead-of-depending-on-it.patch
new file mode 100644 (file)
index 0000000..b93a461
--- /dev/null
@@ -0,0 +1,43 @@
+From f8086d1a65ac693e3fd863128352b4b11ee7324d Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <rdunlap@infradead.org>
+Date: Sat, 25 Feb 2023 21:39:53 -0800
+Subject: serial: 8250: ASPEED_VUART: select REGMAP instead of depending on it
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+commit f8086d1a65ac693e3fd863128352b4b11ee7324d upstream.
+
+REGMAP is a hidden (not user visible) symbol. Users cannot set it
+directly thru "make *config", so drivers should select it instead of
+depending on it if they need it.
+
+Consistently using "select" or "depends on" can also help reduce
+Kconfig circular dependency issues.
+
+Therefore, change the use of "depends on REGMAP" to "select REGMAP".
+
+Fixes: 8d310c9107a2 ("drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Oskar Senft <osk@google.com>
+Cc: linux-serial@vger.kernel.org
+Link: https://lore.kernel.org/r/20230226053953.4681-9-rdunlap@infradead.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/Kconfig |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/8250/Kconfig
++++ b/drivers/tty/serial/8250/Kconfig
+@@ -253,8 +253,9 @@ config SERIAL_8250_ASPEED_VUART
+       tristate "Aspeed Virtual UART"
+       depends on SERIAL_8250
+       depends on OF
+-      depends on REGMAP && MFD_SYSCON
++      depends on MFD_SYSCON
+       depends on ARCH_ASPEED || COMPILE_TEST
++      select REGMAP
+       help
+         If you want to use the virtual UART (VUART) device on Aspeed
+         BMC platforms, enable this option. This enables the 16550A-
diff --git a/queue-6.1/serial-8250_em-fix-uart-port-type.patch b/queue-6.1/serial-8250_em-fix-uart-port-type.patch
new file mode 100644 (file)
index 0000000..abf7b13
--- /dev/null
@@ -0,0 +1,36 @@
+From 32e293be736b853f168cd065d9cbc1b0c69f545d Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Mon, 27 Feb 2023 11:41:46 +0000
+Subject: serial: 8250_em: Fix UART port type
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit 32e293be736b853f168cd065d9cbc1b0c69f545d upstream.
+
+As per HW manual for  EMEV2 "R19UH0040EJ0400 Rev.4.00", the UART
+IP found on EMMA mobile SoC is Register-compatible with the
+general-purpose 16750 UART chip. Fix UART port type as 16750 and
+enable 64-bytes fifo support.
+
+Fixes: 22886ee96895 ("serial8250-em: Emma Mobile UART driver V2")
+Cc: stable@vger.kernel.org
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Link: https://lore.kernel.org/r/20230227114152.22265-2-biju.das.jz@bp.renesas.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_em.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_em.c
++++ b/drivers/tty/serial/8250/8250_em.c
+@@ -106,8 +106,8 @@ static int serial8250_em_probe(struct pl
+       memset(&up, 0, sizeof(up));
+       up.port.mapbase = regs->start;
+       up.port.irq = irq;
+-      up.port.type = PORT_UNKNOWN;
+-      up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_IOREMAP;
++      up.port.type = PORT_16750;
++      up.port.flags = UPF_FIXED_PORT | UPF_IOREMAP | UPF_FIXED_TYPE;
+       up.port.dev = &pdev->dev;
+       up.port.private_data = priv;
diff --git a/queue-6.1/serial-8250_fsl-fix-handle_irq-locking.patch b/queue-6.1/serial-8250_fsl-fix-handle_irq-locking.patch
new file mode 100644 (file)
index 0000000..4f3c7ef
--- /dev/null
@@ -0,0 +1,50 @@
+From 6e01f9a594ee0f69fb52cc8d11971612b4817f0b Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 27 Feb 2023 09:50:46 +0100
+Subject: serial: 8250_fsl: fix handle_irq locking
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 6e01f9a594ee0f69fb52cc8d11971612b4817f0b upstream.
+
+The 8250 handle_irq callback is not just called from the interrupt
+handler but also from a timer callback when polling (e.g. for ports
+without an interrupt line). Consequently the callback must explicitly
+disable interrupts to avoid a potential deadlock with another interrupt
+in polled mode.
+
+Fix up the two paths in the freescale callback that failed to re-enable
+interrupts when polling.
+
+Fixes: 853a9ae29e97 ("serial: 8250: fix handle_irq locking")
+Cc: stable@vger.kernel.org     # 5.13
+Reported-by: Dan Carpenter <error27@gmail.com>
+Link: https://lore.kernel.org/r/Y/xYzqp4ogmOF5t0@kili
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Acked-by: Jiri Slaby <jirislaby@kernel.org>
+Link: https://lore.kernel.org/r/20230227085046.24282-1-johan@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_fsl.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_fsl.c
++++ b/drivers/tty/serial/8250/8250_fsl.c
+@@ -34,7 +34,7 @@ int fsl8250_handle_irq(struct uart_port
+       iir = port->serial_in(port, UART_IIR);
+       if (iir & UART_IIR_NO_INT) {
+-              spin_unlock(&up->port.lock);
++              spin_unlock_irqrestore(&up->port.lock, flags);
+               return 0;
+       }
+@@ -42,7 +42,7 @@ int fsl8250_handle_irq(struct uart_port
+       if (unlikely(up->lsr_saved_flags & UART_LSR_BI)) {
+               up->lsr_saved_flags &= ~UART_LSR_BI;
+               port->serial_in(port, UART_RX);
+-              spin_unlock(&up->port.lock);
++              spin_unlock_irqrestore(&up->port.lock, flags);
+               return 1;
+       }
index a76db3935d2069a468d81c5316b7b82c16b45d62..094beb1fb0e9400b1c8c534ba7a41f12ab881bc3 100644 (file)
@@ -114,3 +114,9 @@ sh-intc-avoid-spurious-sizeof-pointer-div-warning.patch
 drm-amdgpu-fix-ttm_bo-calltrace-warning-in-psp_hw_fi.patch
 drm-amd-display-fix-shift-out-of-bounds-in-calculate.patch
 ext4-fix-possible-double-unlock-when-moving-a-directory.patch
+revert-tty-serial-fsl_lpuart-adjust-serial_fsl_lpuart_console-config-dependency.patch
+tty-serial-fsl_lpuart-skip-waiting-for-transmission-complete-when-uartctrl_sbk-is-asserted.patch
+serial-8250_em-fix-uart-port-type.patch
+serial-8250_fsl-fix-handle_irq-locking.patch
+serial-8250-aspeed_vuart-select-regmap-instead-of-depending-on-it.patch
+tty-serial-qcom-geni-serial-stop-operations-in-progress-at-shutdown.patch
diff --git a/queue-6.1/tty-serial-fsl_lpuart-skip-waiting-for-transmission-complete-when-uartctrl_sbk-is-asserted.patch b/queue-6.1/tty-serial-fsl_lpuart-skip-waiting-for-transmission-complete-when-uartctrl_sbk-is-asserted.patch
new file mode 100644 (file)
index 0000000..a5df333
--- /dev/null
@@ -0,0 +1,46 @@
+From 2411fd94ceaa6e11326e95d6ebf876cbfed28d23 Mon Sep 17 00:00:00 2001
+From: Sherry Sun <sherry.sun@nxp.com>
+Date: Thu, 23 Feb 2023 17:39:41 +0800
+Subject: tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted
+
+From: Sherry Sun <sherry.sun@nxp.com>
+
+commit 2411fd94ceaa6e11326e95d6ebf876cbfed28d23 upstream.
+
+According to LPUART RM, Transmission Complete Flag becomes 0 if queuing
+a break character by writing 1 to CTRL[SBK], so here need to skip
+waiting for transmission complete when UARTCTRL_SBK is asserted,
+otherwise the kernel may stuck here.
+And actually set_termios() adds transmission completion waiting to avoid
+data loss or data breakage when changing the baud rate, but we don't
+need to worry about this when queuing break characters.
+
+Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20230223093941.31790-1-sherry.sun@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/fsl_lpuart.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/drivers/tty/serial/fsl_lpuart.c
++++ b/drivers/tty/serial/fsl_lpuart.c
+@@ -2184,9 +2184,15 @@ lpuart32_set_termios(struct uart_port *p
+       /* update the per-port timeout */
+       uart_update_timeout(port, termios->c_cflag, baud);
+-      /* wait transmit engin complete */
+-      lpuart32_write(&sport->port, 0, UARTMODIR);
+-      lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
++      /*
++       * LPUART Transmission Complete Flag may never be set while queuing a break
++       * character, so skip waiting for transmission complete when UARTCTRL_SBK is
++       * asserted.
++       */
++      if (!(old_ctrl & UARTCTRL_SBK)) {
++              lpuart32_write(&sport->port, 0, UARTMODIR);
++              lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
++      }
+       /* disable transmit and receive */
+       lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE),
diff --git a/queue-6.1/tty-serial-qcom-geni-serial-stop-operations-in-progress-at-shutdown.patch b/queue-6.1/tty-serial-qcom-geni-serial-stop-operations-in-progress-at-shutdown.patch
new file mode 100644 (file)
index 0000000..437626d
--- /dev/null
@@ -0,0 +1,33 @@
+From d8aca2f96813d51df574a811eda9a2cbed00f261 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Date: Thu, 29 Dec 2022 16:50:17 +0100
+Subject: tty: serial: qcom-geni-serial: stop operations in progress at shutdown
+
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+commit d8aca2f96813d51df574a811eda9a2cbed00f261 upstream.
+
+We don't stop transmissions in progress at shutdown. This is fine with
+FIFO SE mode but with DMA (support for which we'll introduce later) it
+causes trouble so fix it now.
+
+Fixes: e83766334f96 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown")
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Link: https://lore.kernel.org/r/20221229155030.418800-2-brgl@bgdev.pl
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/qcom_geni_serial.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/tty/serial/qcom_geni_serial.c
++++ b/drivers/tty/serial/qcom_geni_serial.c
+@@ -891,6 +891,8 @@ static int setup_fifos(struct qcom_geni_
+ static void qcom_geni_serial_shutdown(struct uart_port *uport)
+ {
+       disable_irq(uport->irq);
++      qcom_geni_serial_stop_tx(uport);
++      qcom_geni_serial_stop_rx(uport);
+ }
+ static int qcom_geni_serial_port_setup(struct uart_port *uport)