Re: serial: sh-sci: rx overrun errors and hrtimer rx_timeout?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux