Page MenuHomeFreeBSD

ure: lock MII bus operations
Needs ReviewPublic

Authored by rkitover_gmail.com on Mar 28 2026, 10:50 PM.
Referenced Files
F160079627: D56138.diff
Sun, Jun 21, 5:18 AM
Unknown Object (File)
Thu, Jun 18, 5:57 AM
Unknown Object (File)
Sun, Jun 7, 9:19 AM
Unknown Object (File)
Thu, Jun 4, 1:44 PM
Unknown Object (File)
Sat, May 30, 8:25 AM
Unknown Object (File)
May 15 2026, 9:49 AM
Unknown Object (File)
May 15 2026, 6:15 AM
Unknown Object (File)
May 15 2026, 4:11 AM
Subscribers

Details

Summary

A race condition in the MII layer causes spurious events, see:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252165

. Use a lock to serialize access to MII operations and drop ticks when
MII is locked.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>

Diff Detail

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

Event Timeline

I'd be happy to review this, but I need reproduction steps.

Hi @pouria.

I can reproduce below steps

Device: Raspberry Pi Zero 2W(arm64)
OS: 15.0-RELEASE + (D55682) (maybe also -current)
Setup : CARP configured on the ure interface.
Dongle: Lenovo USB-C to LAN

Steps:
Machine A (Remote): Run ping [Unassigned Local IP].
Machine B (Target): Run the route -n monitor command in four separate instances and more.

Result: NG (Failed)

and this change is fixed(I'm still testing some devices. After finish, I will report it)

Does anyone know how I can get an adapter or hub device with the C variant chip (latest revision?)

Keep only MII bus lock, it's enough.

Remove PHY checking, MII bus lock is sufficient