Page MenuHomeFreeBSD

uart: Add primitive noise filtering on RX
ClosedPublic

Authored by jhibbits on Nov 20 2024, 5:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 18, 10:14 AM
Unknown Object (File)
Sat, Jan 17, 3:19 AM
Unknown Object (File)
Dec 4 2025, 4:33 PM
Unknown Object (File)
Nov 28 2025, 3:14 PM
Unknown Object (File)
Nov 23 2025, 12:56 AM
Unknown Object (File)
Nov 23 2025, 12:56 AM
Unknown Object (File)
Nov 23 2025, 12:50 AM
Unknown Object (File)
Nov 21 2025, 1:25 PM
Subscribers
None

Details

Reviewers
imp
markj
andrew
Summary

A long cable attached to the UART can act as an antenna if disconnected
from the other end. This can cause noise on the receive side, possibly
as reflections from the transmit side, leading to an interrupt storm.
Filter this by adding a threshold of received characters without TX
ready, above which characters are dropped. This is disabled by default,
but has been tested with a threshold of 1000+. A high threshold is
recommended to avoid dropping characters during, for instance, a large
copy/paste from the other end.

Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60704
Build 57588: arc lint + arc unit

Event Timeline

jhibbits created this revision.

Might be worth publishing the noise count as a per-dev sysctl

This revision is now accepted and ready to land.Nov 20 2024, 7:58 PM
In D47685#1087555, @imp wrote:

Might be worth publishing the noise count as a per-dev sysctl

I'll think about that for a future enhancement.