]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: amba-pl011: Fix RX stall when DMA is used
authorKartik Rajput <kkartik@nvidia.com>
Wed, 13 Nov 2024 09:26:29 +0000 (14:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:29 +0000 (19:51 +0100)
commit3cbde9287469ae02c9a205364be8c5db83106833
tree6ae73cd819f0c5f8064ad4edf9704a600d6501bc
parente3769d2b62d0f62456a7d78a626b2db300c4214a
serial: amba-pl011: Fix RX stall when DMA is used

[ Upstream commit 2bcacc1c87acf9a8ebc17de18cb2b3cfeca547cf ]

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: 211565b10099 ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle")
Cc: stable@vger.kernel.org
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241113092629.60226-1-kkartik@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/amba-pl011.c