Hi Dirk, On Fri, Aug 9, 2024 at 9:27 AM Dirk Behme <dirk.behme@xxxxxxxxxxxx> wrote: > short: What is the sh-sci rx DMA hrtimer configured to rx_timeout good for? > > Long story: > > Using drivers/tty/serial/sh-sci.c (on 4.14.x Renesas BSP) what is quite > similar to [1] we got reports about data loss on rx large files (test > case rx 1GB file): [...] I'll answer the short question ;-) When RX DMA is enabled, data is received in the RX FIFO. Only when the FIFO is full, an interrupt is raised, and the data is received by Linux, and passed to the next layer. So what happens if less data is received than the FIFO size? In that case, the data would be stuck in the FIFO, as no interrupt is raised. Hence a hrtimer is used to make sure Linux receives data from a partially-filled FIFO when no more data arrives soon (within rx_timeout µs). I hope this helps to understand the problem you are seeing. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds