HomeFreeBSD

e6000sw: fix incorrect locking

Description

e6000sw: fix incorrect locking

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().

Reviewed by: Hubert Mazur <hum@semihalf.com>
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36117

Details

Provenance
kpAuthored on Aug 10 2022, 1:57 PM
Differential Revision
D36117: e6000sw: fix incorrect locking
Parents
rG820bafd0bc14: unix/dgram: don't panic if socket buffer has negative space
Branches
Unknown
Tags
Unknown