summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-04-23 21:24:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-04-23 21:24:15 +0000
commit082f9c74d0f6286abd61ff6ac2d1eaa106472703 (patch)
treeaf74368e61d5e62b8270ba82e138f07fb1e848e4 /sys/dev/ic
parent39d7a3c9fb961726129ce6ec77f73d1bffb29ab8 (diff)
Clear IFF_RUNNING and IFF_OACTIVE flags and cancel watchdog timer in
hme_stop(). From Brad.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/hme.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index 26454224776..fb4bd9ab7d5 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.55 2009/04/17 20:20:18 kettenis Exp $ */
+/* $OpenBSD: hme.c,v 1.56 2009/04/23 21:24:14 kettenis Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -362,11 +362,19 @@ void
hme_stop(sc)
struct hme_softc *sc;
{
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
bus_space_tag_t t = sc->sc_bustag;
bus_space_handle_t seb = sc->sc_seb;
int n;
timeout_del(&sc->sc_tick_ch);
+
+ /*
+ * Mark the interface down and cancel the watchdog timer.
+ */
+ ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ifp->if_timer = 0;
+
mii_down(&sc->sc_mii);
/* Mask all interrupts */
@@ -1303,7 +1311,6 @@ hme_ioctl(ifp, cmd, data)
* stop it.
*/
hme_stop(sc);
- ifp->if_flags &= ~IFF_RUNNING;
} else if ((ifp->if_flags & IFF_UP) != 0 &&
(ifp->if_flags & IFF_RUNNING) == 0) {
/*