tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Remove ASSERT_SLEEPABLE() in mii_phy_auto()
Hi.
A driver uses a spin mutex for mii/ifmedia lock.
When I modified the MDIO access to be sleepable using with
workqueue and kpause(), the following assert() fired:
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index b469387c051b..ec7d7130b2be 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -271,7 +271,7 @@ mii_phy_auto(struct mii_softc *sc)
* delays all the time while the system is running!
*/
if (sc->mii_flags & MIIF_AUTOTSLEEP) {
- ASSERT_SLEEPABLE();
+// ASSERT_SLEEPABLE();
sc->mii_flags |= MIIF_DOINGAUTO;
kpause("miiaut", false, hz >> 1, mii->mii_media.ifm_lock);
mii_phy_auto_timeout_locked(sc);
I think it's OK to remove the above ASSERT_SLEEPABLE().
Is it OK to commit?
--
-----------------------------------------------
SAITOH Masanobu (msaitoh%execsw.org@localhost
msaitoh%netbsd.org@localhost)
Home |
Main Index |
Thread Index |
Old Index