Page MenuHomeFreeBSD

ure: lock MII bus operations
Needs ReviewPublic

Authored by rkitover_gmail.com on Mar 28 2026, 10:50 PM.
Referenced Files
Unknown Object (File)
Fri, May 15, 9:49 AM
Unknown Object (File)
Fri, May 15, 6:15 AM
Unknown Object (File)
Fri, May 15, 4:11 AM
Unknown Object (File)
Thu, May 14, 9:09 PM
Unknown Object (File)
Tue, May 12, 3:12 PM
Unknown Object (File)
Mon, Apr 27, 4:17 PM
Unknown Object (File)
Sat, Apr 25, 11:06 AM
Unknown Object (File)
Mon, Apr 20, 9:58 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 71897
Build 68780: 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?)