freebsd_amp_hwpstate/sys/dev/etherswitch/e6000sw
Mark Johnston 725962a9f4 e6000sw: Fix locking in miibus_{read,write}reg implementations
Commit 4692906480 made e6000sw's
implementation of miibus_(read|write)reg assume that the softc lock is
held.  I presume that is to avoid lock recursion in e6000sw_attach() ->
e6000sw_attach_miibus() -> mii_attach() -> MIIBUS_READREG().

However, the lock assertion in e6000sw_readphy_locked() can fail if a
different driver uses the interface to probe registers.  Work around the
problem by providing implementations which lock the softc if it is not
already locked.

PR:		274795
Fixes:		4692906480 ("e6000sw: add readphy and writephy wrappers")
Reviewed by:	kp, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42466
2023-11-06 14:57:56 -05:00
..
e6000sw.c
e6000swreg.h
e6060sw.c