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

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

 



Hi,

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):

$ cat /proc/tty/driver/sci
serinfo:1.0 driver revision:
0: uart:scif mmio:0xE6E88000 irq:88 tx:40991 rx:16 RTS|CTS|DTR|DSR|CD
1: uart:hscif mmio:0xE66B0000 irq:45 tx:908 rx:1410 RTS|CTS|DTR|DSR|CD
2: uart:scif mmio:0xE6C40000 irq:89 tx:0 rx:0 CTS|DSR|CD
3: uart:scif mmio:0xE6E68000 irq:87 tx:0 rx:0 CTS|DSR|CD
4: uart:scif mmio:0xE6E60000 irq:86 tx:3506 rx:179863 oe:141 RTS|CTS|DTR|DSR|CD

See the oe (overrun error?) at uart #4.

For testing the hrtimer rx_timeout was changed (for example to 1000 by adding a sysfs interface for it) and with that the oe are reduced (again, uart #4):

$ echo 1000 > /sys/class/tty/ttySC4/device/rx_timeout
$ cat /proc/tty/driver/sci
serinfo:1.0 driver revision:
0: uart:scif mmio:0xE6E88000 irq:88 tx:41621 rx:3 RTS|CTS|DTR|DSR|CD
1: uart:hscif mmio:0xE66B0000 irq:45 tx:908 rx:1395 RTS|CTS|DTR|DSR|CD
2: uart:scif mmio:0xE6C40000 irq:89 tx:0 rx:0 CTS|DSR|CD
3: uart:scif mmio:0xE6E68000 irq:87 tx:0 rx:0 CTS|DSR|CD
4: uart:scif mmio:0xE6E60000 irq:86 tx:514 rx:688401 oe:3 RTS|CTS|DTR|DSR|CD

I'm slightly unclear, but general high system load might be involved in these tests.

Now, looking at the code, I'm slightly unclear what this hrtimer and its timeout is used for in relation to the rx DMA? It seems it controls if the DMA is finished after the rx_timeout and if not it setup a new DMA? How might changing the timeout influence the overrun errors?

Best regards

Dirk

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/sh-sci.c




[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