Skip to content

Commit 2bcacc1

Browse files
Kartik Rajputgregkh
authored andcommitted
serial: amba-pl011: Fix RX stall when DMA is used
Function pl011_throttle_rx() calls pl011_stop_rx() to disable RX, which also disables the RX DMA by clearing the RXDMAE bit of the DMACR register. However, to properly unthrottle RX when DMA is used, the function pl011_unthrottle_rx() is expected to set the RXDMAE bit of the DMACR register, which it currently lacks. This causes RX to stall after the throttle API is called. Set RXDMAE bit in the DMACR register while unthrottling RX if RX DMA is used. Fixes: 211565b ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle") Cc: [email protected] Signed-off-by: Kartik Rajput <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 635a9fc commit 2bcacc1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/tty/serial/amba-pl011.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,6 +1819,11 @@ static void pl011_unthrottle_rx(struct uart_port *port)
18191819

18201820
pl011_write(uap->im, uap, REG_IMSC);
18211821

1822+
if (uap->using_rx_dma) {
1823+
uap->dmacr |= UART011_RXDMAE;
1824+
pl011_write(uap->dmacr, uap, REG_DMACR);
1825+
}
1826+
18221827
uart_port_unlock_irqrestore(&uap->port, flags);
18231828
}
18241829

0 commit comments

Comments
 (0)