Page MenuHomeFreeBSD

Export a sysctl count of RX FIFO overrun events.
ClosedPublic

Authored by jhb on Apr 10 2020, 4:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 8:51 AM
Unknown Object (File)
Oct 16 2024, 6:31 AM
Unknown Object (File)
Oct 16 2024, 6:31 AM
Unknown Object (File)
Oct 16 2024, 6:31 AM
Unknown Object (File)
Oct 16 2024, 6:31 AM
Unknown Object (File)
Oct 16 2024, 6:00 AM
Unknown Object (File)
Oct 4 2024, 3:46 AM
Unknown Object (File)
Sep 27 2024, 1:29 PM
Subscribers
None

Details

Summary

uart(4) backends currently detect RX FIFO overrun errors and report
them to the uart(4) core layer. They are then reported to the generic
TTY layer which promptly ignores them. As a result, there is
currently no good way to determine if a uart is experiencing RX FIFO
overruns. One could add a generic per-tty counter, but there did not
appear to be a good way to export those. Instead, add a sysctl under
the uart(4) sysctl tree to export the count of overruns.

Test Plan
  • use a uart(4) which is known to drop characters. The sysctl increments when pasting a 20k text file over the uart.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/uart/uart_core.c
749 โ†—(On Diff #70410)

Do we need to remove it in detach?

sys/dev/uart/uart_core.c
749 โ†—(On Diff #70410)

No, new-bus auto-deletes sysctls associated with the device sysctl context returned by device_get_sysctl_ctx() during detach.

This revision is now accepted and ready to land.Apr 10 2020, 8:09 PM
This revision was automatically updated to reflect the committed changes.