[PATCH 0/2] serial: sc16is7xx: fix TX inter-frame gaps on SPI UARTs
From: Paul Mbewe
Date: Tue Jun 23 2026 - 07:24:16 EST
This series fixes two related TX path issues in the sc16is7xx SPI UART
driver that cause visible inter-frame gaps on the wire, breaking Modbus
RTU communication.
Patch 1 fixes a data loss / gap caused by kfifo_out_linear_ptr() only
returning one contiguous segment of the circular buffer. When TX data
wraps around the kfifo boundary, the remainder is delayed until the next
TX interrupt, producing a silence gap that violates the Modbus 1.5
character-time limit.
Patch 2 raises the TX FIFO trigger level from 8 to 32 free spaces via
the TLR register. The default trigger of 8 causes excessive SPI
round-trips on slow single-core hosts, leading to TX FIFO underruns
between bursts.
Tested on SC16IS752 (SPI, 1 MHz) on i.MX6ULL driving RS-485 at 115200
baud. Oscilloscope confirmed both gap types are eliminated after the
fix.
Paul Mbewe (2):
serial: sc16is7xx: fix TX gap caused by kfifo circular buffer
wrap-around
serial: sc16is7xx: set TX FIFO trigger level to half FIFO to prevent
underruns
drivers/tty/serial/sc16is7xx.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
--
2.43.0