From: Greg Kroah-Hartman Date: Tue, 29 Apr 2025 06:36:57 +0000 (+0200) Subject: drop msm serial patch that broke the build from 5.X kernels X-Git-Tag: v5.4.293~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=260c006dafdcb04347bb27dc7056a20a4b105066;p=thirdparty%2Fkernel%2Fstable-queue.git drop msm serial patch that broke the build from 5.X kernels --- diff --git a/queue-5.10/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch b/queue-5.10/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch deleted file mode 100644 index 9c3f221be7..0000000000 --- a/queue-5.10/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7094832b5ac861b0bd7ed8866c93cb15ef619996 Mon Sep 17 00:00:00 2001 -From: Stephan Gerhold -Date: Tue, 8 Apr 2025 19:22:47 +0200 -Subject: serial: msm: Configure correct working mode before starting earlycon - -From: Stephan Gerhold - -commit 7094832b5ac861b0bd7ed8866c93cb15ef619996 upstream. - -The MSM UART DM controller supports different working modes, e.g. DMA or -the "single-character mode", where all reads/writes operate on a single -character rather than 4 chars (32-bit) at once. When using earlycon, -__msm_console_write() always writes 4 characters at a time, but we don't -know which mode the bootloader was using and we don't set the mode either. - -This causes garbled output if the bootloader was using the single-character -mode, because only every 4th character appears in the serial console, e.g. - - "[ 00oni pi 000xf0[ 00i s 5rm9(l)l s 1 1 SPMTA 7:C 5[ 00A ade k d[ - 00ano:ameoi .Q1B[ 00ac _idaM00080oo'" - -If the bootloader was using the DMA ("DM") mode, output would likely fail -entirely. Later, when the full serial driver probes, the port is -re-initialized and output works as expected. - -Fix this also for earlycon by clearing the DMEN register and -reset+re-enable the transmitter to apply the change. This ensures the -transmitter is in the expected state before writing any output. - -Cc: stable -Fixes: 0efe72963409 ("tty: serial: msm: Add earlycon support") -Signed-off-by: Stephan Gerhold -Reviewed-by: Neil Armstrong -Link: https://lore.kernel.org/r/20250408-msm-serial-earlycon-v1-1-429080127530@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/tty/serial/msm_serial.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/tty/serial/msm_serial.c -+++ b/drivers/tty/serial/msm_serial.c -@@ -1737,6 +1737,12 @@ msm_serial_early_console_setup_dm(struct - if (!device->port.membase) - return -ENODEV; - -+ /* Disable DM / single-character modes */ -+ msm_write(&device->port, 0, UARTDM_DMEN); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_RX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_TX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_TX_ENABLE, MSM_UART_CR); -+ - device->con->write = msm_serial_early_write_dm; - return 0; - } diff --git a/queue-5.10/series b/queue-5.10/series index 696ac0720c..0f56df788d 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -246,7 +246,6 @@ mcb-fix-a-double-free-bug-in-chameleon_parse_gdd.patch usb-storage-quirk-for-adata-portable-hdd-ch94.patch mei-me-add-panther-lake-h-did.patch kvm-x86-reset-irte-to-host-control-if-new-route-isn-t-postable.patch -serial-msm-configure-correct-working-mode-before-starting-earlycon.patch serial-sifive-lock-port-in-startup-shutdown-callbacks.patch usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch usb-serial-option-add-sierra-wireless-em9291.patch diff --git a/queue-5.15/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch b/queue-5.15/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch deleted file mode 100644 index c44cd29ff9..0000000000 --- a/queue-5.15/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7094832b5ac861b0bd7ed8866c93cb15ef619996 Mon Sep 17 00:00:00 2001 -From: Stephan Gerhold -Date: Tue, 8 Apr 2025 19:22:47 +0200 -Subject: serial: msm: Configure correct working mode before starting earlycon - -From: Stephan Gerhold - -commit 7094832b5ac861b0bd7ed8866c93cb15ef619996 upstream. - -The MSM UART DM controller supports different working modes, e.g. DMA or -the "single-character mode", where all reads/writes operate on a single -character rather than 4 chars (32-bit) at once. When using earlycon, -__msm_console_write() always writes 4 characters at a time, but we don't -know which mode the bootloader was using and we don't set the mode either. - -This causes garbled output if the bootloader was using the single-character -mode, because only every 4th character appears in the serial console, e.g. - - "[ 00oni pi 000xf0[ 00i s 5rm9(l)l s 1 1 SPMTA 7:C 5[ 00A ade k d[ - 00ano:ameoi .Q1B[ 00ac _idaM00080oo'" - -If the bootloader was using the DMA ("DM") mode, output would likely fail -entirely. Later, when the full serial driver probes, the port is -re-initialized and output works as expected. - -Fix this also for earlycon by clearing the DMEN register and -reset+re-enable the transmitter to apply the change. This ensures the -transmitter is in the expected state before writing any output. - -Cc: stable -Fixes: 0efe72963409 ("tty: serial: msm: Add earlycon support") -Signed-off-by: Stephan Gerhold -Reviewed-by: Neil Armstrong -Link: https://lore.kernel.org/r/20250408-msm-serial-earlycon-v1-1-429080127530@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/tty/serial/msm_serial.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/tty/serial/msm_serial.c -+++ b/drivers/tty/serial/msm_serial.c -@@ -1732,6 +1732,12 @@ msm_serial_early_console_setup_dm(struct - if (!device->port.membase) - return -ENODEV; - -+ /* Disable DM / single-character modes */ -+ msm_write(&device->port, 0, UARTDM_DMEN); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_RX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_TX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_TX_ENABLE, MSM_UART_CR); -+ - device->con->write = msm_serial_early_write_dm; - return 0; - } diff --git a/queue-5.15/series b/queue-5.15/series index 24741547e7..9a6fde626c 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -303,7 +303,6 @@ mcb-fix-a-double-free-bug-in-chameleon_parse_gdd.patch usb-storage-quirk-for-adata-portable-hdd-ch94.patch mei-me-add-panther-lake-h-did.patch kvm-x86-reset-irte-to-host-control-if-new-route-isn-t-postable.patch -serial-msm-configure-correct-working-mode-before-starting-earlycon.patch serial-sifive-lock-port-in-startup-shutdown-callbacks.patch usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch usb-serial-option-add-sierra-wireless-em9291.patch diff --git a/queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch b/queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch deleted file mode 100644 index 82f9622b1f..0000000000 --- a/queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7094832b5ac861b0bd7ed8866c93cb15ef619996 Mon Sep 17 00:00:00 2001 -From: Stephan Gerhold -Date: Tue, 8 Apr 2025 19:22:47 +0200 -Subject: serial: msm: Configure correct working mode before starting earlycon - -From: Stephan Gerhold - -commit 7094832b5ac861b0bd7ed8866c93cb15ef619996 upstream. - -The MSM UART DM controller supports different working modes, e.g. DMA or -the "single-character mode", where all reads/writes operate on a single -character rather than 4 chars (32-bit) at once. When using earlycon, -__msm_console_write() always writes 4 characters at a time, but we don't -know which mode the bootloader was using and we don't set the mode either. - -This causes garbled output if the bootloader was using the single-character -mode, because only every 4th character appears in the serial console, e.g. - - "[ 00oni pi 000xf0[ 00i s 5rm9(l)l s 1 1 SPMTA 7:C 5[ 00A ade k d[ - 00ano:ameoi .Q1B[ 00ac _idaM00080oo'" - -If the bootloader was using the DMA ("DM") mode, output would likely fail -entirely. Later, when the full serial driver probes, the port is -re-initialized and output works as expected. - -Fix this also for earlycon by clearing the DMEN register and -reset+re-enable the transmitter to apply the change. This ensures the -transmitter is in the expected state before writing any output. - -Cc: stable -Fixes: 0efe72963409 ("tty: serial: msm: Add earlycon support") -Signed-off-by: Stephan Gerhold -Reviewed-by: Neil Armstrong -Link: https://lore.kernel.org/r/20250408-msm-serial-earlycon-v1-1-429080127530@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/tty/serial/msm_serial.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/tty/serial/msm_serial.c -+++ b/drivers/tty/serial/msm_serial.c -@@ -1723,6 +1723,12 @@ msm_serial_early_console_setup_dm(struct - if (!device->port.membase) - return -ENODEV; - -+ /* Disable DM / single-character modes */ -+ msm_write(&device->port, 0, UARTDM_DMEN); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_RX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_CMD_RESET_TX, MSM_UART_CR); -+ msm_write(&device->port, MSM_UART_CR_TX_ENABLE, MSM_UART_CR); -+ - device->con->write = msm_serial_early_write_dm; - return 0; - } diff --git a/queue-5.4/series b/queue-5.4/series index 5f8ac47164..8e268d1c6a 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -146,7 +146,6 @@ net_sched-hfsc-fix-a-potential-uaf-in-hfsc_dequeue-t.patch virtio_console-fix-missing-byte-order-handling-for-cols-and-rows.patch mcb-fix-a-double-free-bug-in-chameleon_parse_gdd.patch usb-storage-quirk-for-adata-portable-hdd-ch94.patch -serial-msm-configure-correct-working-mode-before-starting-earlycon.patch serial-sifive-lock-port-in-startup-shutdown-callbacks.patch usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch usb-serial-option-add-sierra-wireless-em9291.patch