Page MenuHomeFreeBSD

uart: Add primitive noise filtering on RX
ClosedPublic

Authored by jhibbits on Nov 20 2024, 5:43 PM.
Tags
None
Referenced Files
F132608156: D47685.id146755.diff
Sat, Oct 18, 9:32 AM
Unknown Object (File)
Thu, Oct 2, 3:47 PM
Unknown Object (File)
Thu, Sep 18, 8:35 PM
Unknown Object (File)
Sep 15 2025, 4:40 PM
Unknown Object (File)
Sep 13 2025, 11:01 PM
Unknown Object (File)
Aug 30 2025, 7:59 AM
Unknown Object (File)
Aug 8 2025, 4:28 AM
Unknown Object (File)
Jul 25 2025, 9:38 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.