Page MenuHomeFreeBSD

e6000sw: fix incorrect locking
ClosedPublic

Authored by kp on Aug 10 2022, 4:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 2:24 AM
Unknown Object (File)
Tue, Oct 14, 2:24 AM
Unknown Object (File)
Tue, Oct 14, 2:23 AM
Unknown Object (File)
Mon, Oct 13, 12:54 PM
Unknown Object (File)
Sun, Sep 28, 8:37 AM
Unknown Object (File)
Sep 14 2025, 2:27 AM
Unknown Object (File)
Sep 10 2025, 4:57 AM
Unknown Object (File)
Sep 4 2025, 8:18 PM
Subscribers

Details

Summary

During attach we release the lock to call e6000sw_attach_miibus(), which
calls mii_attach(). The mii_attach() function calls miibus_readreg() /
miibus_writereg(). However, these are set to be
e6000sw_readphy_locked().

That is, the read/write phy functions do not acquire the lock, but
expect to be called while locked. Simply do not unlock and relock while
calling mii_attach().

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Aug 10 2022, 4:40 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 19 2022, 9:10 PM
This revision was automatically updated to reflect the committed changes.