All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] serial: sc16is7xx: fix TX inter-frame gaps on SPI UARTs
@ 2026-06-23 11:22 Paul Mbewe
  2026-06-23 11:22 ` [PATCH 1/2] serial: sc16is7xx: fix TX gap caused by kfifo circular buffer wrap-around Paul Mbewe
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Paul Mbewe @ 2026-06-23 11:22 UTC (permalink / raw)
  To: linux-serial, linux-kernel; +Cc: gregkh, jirislaby, hvilleneuve, Paul Mbewe

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


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-07-11  9:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 11:22 [PATCH 0/2] serial: sc16is7xx: fix TX inter-frame gaps on SPI UARTs Paul Mbewe
2026-06-23 11:22 ` [PATCH 1/2] serial: sc16is7xx: fix TX gap caused by kfifo circular buffer wrap-around Paul Mbewe
2026-06-23 11:22 ` [PATCH 2/2] serial: sc16is7xx: set TX FIFO trigger level to half FIFO to prevent underruns Paul Mbewe
2026-06-23 12:45   ` David Laight
2026-06-23 14:01     ` Paul Mbewe
2026-06-23 15:07       ` David Laight
2026-06-23 17:13         ` Paul Mbewe
2026-06-23 18:42           ` David Laight
2026-06-25 12:59             ` Maarten Brock
2026-07-01 16:40               ` Paul Mbewe
2026-07-01 17:41                 ` David Laight
2026-07-02 12:17                   ` Maarten Brock
2026-07-02 21:24                     ` David Laight
2026-07-03 18:19                       ` Paul Mbewe
2026-07-03 20:36                         ` David Laight
2026-07-07 15:03                           ` Paul Mbewe
2026-07-07 17:50                             ` David Laight
2026-07-10 12:43                               ` Paul Mbewe
2026-07-11  9:42                                 ` Maarten Brock
2026-07-10 12:11 ` [PATCH 0/2] serial: sc16is7xx: fix TX inter-frame gaps on SPI UARTs Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.