diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-23 23:49:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-23 23:49:46 +0000 |
commit | b11a20d63831ec2053d98d10cc75652f24e38bdc (patch) | |
tree | 0ff93cdda35498d87f9c0ee39672028d24796085 /sys | |
parent | 4940646a8462a627b7f9a58eb7d5ad1642687b8c (diff) |
in detach, get rid of powerhook before doing sleeping operations
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index a8e3a906527..a1ec817781f 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.67 2009/08/10 20:29:54 deraadt Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.68 2009/11/23 23:49:45 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1415,6 +1415,9 @@ rl_detach(struct rl_softc *sc) /* Unhook our tick handler. */ timeout_del(&sc->sc_tick_tmo); + if (sc->sc_pwrhook != NULL) + powerhook_disestablish(sc->sc_pwrhook); + /* Detach any PHYs we might have. */ if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL) mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); @@ -1425,9 +1428,6 @@ rl_detach(struct rl_softc *sc) ether_ifdetach(ifp); if_detach(ifp); - if (sc->sc_pwrhook != NULL) - powerhook_disestablish(sc->sc_pwrhook); - return (0); } |