Skip to content

Commit

Permalink
serial: fsl_lpuart: disable DMA for console and fix sysrq
Browse files Browse the repository at this point in the history
[ Upstream commit 8cac2f6 ]

SYSRQ doesn't work with DMA. This is because there is no error
indication whether a symbol had a framing error or not. Actually,
this is not completely correct, there is a bit in the data register
which is set in this case, but we'd have to read change the DMA access
to 16 bit and we'd need to post process the data, thus make the DMA
pointless in the first place.

Signed-off-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20210512141255.18277-10-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mwalle authored and gregkh committed Jul 20, 2021
1 parent c96867d commit 464ffcf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/tty/serial/fsl_lpuart.c
Expand Up @@ -1571,6 +1571,9 @@ static void lpuart_tx_dma_startup(struct lpuart_port *sport)
u32 uartbaud;
int ret;

if (uart_console(&sport->port))
goto err;

if (!sport->dma_tx_chan)
goto err;

Expand Down Expand Up @@ -1600,6 +1603,9 @@ static void lpuart_rx_dma_startup(struct lpuart_port *sport)
int ret;
unsigned char cr3;

if (uart_console(&sport->port))
goto err;

if (!sport->dma_rx_chan)
goto err;

Expand Down

0 comments on commit 464ffcf

Please sign in to comment.