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)
Dec 20 2023, 5:22 AM
Unknown Object (File)
Aug 30 2023, 3:52 AM
Unknown Object (File)
Aug 30 2023, 3:51 AM
Unknown Object (File)
Aug 30 2023, 3:48 AM
Unknown Object (File)
Aug 30 2023, 3:46 AM
Unknown Object (File)
Aug 26 2023, 10:01 PM
Unknown Object (File)
May 28 2023, 9:15 AM
Unknown Object (File)
Apr 8 2023, 1:54 AM
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.