Skip to content

Commit 7492ffc

Browse files
ecsvgregkh
authored andcommitted
tty: serial: msm_serial: Deactivate RX DMA for polling support
The CONSOLE_POLLING mode is used for tools like k(g)db. In this kind of setup, it is often sharing a serial device with the normal system console. This is usually no problem because the polling helpers can consume input values directly (when in kgdb context) and the normal Linux handlers can only consume new input values after kgdb switched back. This is not true anymore when RX DMA is enabled for UARTDM controllers. Single input values can no longer be received correctly. Instead following seems to happen: * on 1. input, some old input is read (continuously) * on 2. input, two old inputs are read (continuously) * on 3. input, three old input values are read (continuously) * on 4. input, 4 previous inputs are received This repeats then for each group of 4 input values. This behavior changes slightly depending on what state the controller was when the first input was received. But this makes working with kgdb basically impossible because control messages are always corrupted when kgdboc tries to parse them. RX DMA should therefore be off when CONSOLE_POLLING is enabled to avoid these kind of problems. No such problem was noticed for TX DMA. Fixes: 9969394 ("tty: serial: msm: Add RX DMA support") Cc: [email protected] Signed-off-by: Sven Eckelmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ac442a0 commit 7492ffc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/tty/serial/msm_serial.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ static void msm_start_rx_dma(struct msm_port *msm_port)
598598
u32 val;
599599
int ret;
600600

601+
if (IS_ENABLED(CONFIG_CONSOLE_POLL))
602+
return;
603+
601604
if (!dma->chan)
602605
return;
603606

0 commit comments

Comments
 (0)