Page MenuHomeFreeBSD

e6000sw: fix incorrect locking
ClosedPublic

Authored by kp on Aug 10 2022, 4:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 30 2024, 9:08 AM
Unknown Object (File)
Sep 28 2024, 5:27 PM
Unknown Object (File)
Sep 26 2024, 2:36 PM
Unknown Object (File)
Sep 26 2024, 2:35 PM
Unknown Object (File)
Sep 26 2024, 2:35 PM
Unknown Object (File)
Sep 26 2024, 2:22 PM
Unknown Object (File)
Sep 23 2024, 10:43 AM
Unknown Object (File)
Sep 23 2024, 3:09 AM
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.