Files
openwrt-master/target/linux/bcm27xx/patches-6.6/950-1195-tty-serial-pl011-restrict-RX-burst-FIFO-threshold.patch
domenico c06fb25d1f
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 14:35:53 +02:00

31 lines
1.1 KiB
Diff

From f3cb675102a2a5a330038c4e748f02b02cec989e Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Mon, 22 Jul 2024 09:30:54 +0100
Subject: [PATCH 1195/1215] tty/serial: pl011: restrict RX burst FIFO threshold
If the associated DMA controller has lower burst length support than the
level the FIFO is set to, then bytes will be left in the RX FIFO at the
end of a DMA block - requiring a round-trip through the timeout interrupt
handler rather than an end-of-block DMA interrupt.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
drivers/tty/serial/amba-pl011.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -487,6 +487,12 @@ static void pl011_dma_probe(struct uart_
"RX DMA disabled - no residue processing\n");
return;
}
+ /*
+ * DMA controllers with smaller burst capabilities than 1/4
+ * the FIFO depth will leave more bytes than expected in the
+ * RX FIFO if mismatched.
+ */
+ rx_conf.src_maxburst = min(caps.max_burst, rx_conf.src_maxburst);
}
dmaengine_slave_config(chan, &rx_conf);
uap->dmarx.chan = chan;