diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-01-10 18:56:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-01-10 18:56:56 +0000 |
commit | ae88d7375f2e103d85b9af709d1512ca17932ffe (patch) | |
tree | 2823f17ad4938108c059839210f6efda94f243cb /sys/dev | |
parent | 7aae5228986dc754b558a95a660bc0c343d1123a (diff) |
Disable (most) interrupts when the interface goes down.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_nep.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c index 97ce3f8350f..4d2471387db 100644 --- a/sys/dev/pci/if_nep.c +++ b/sys/dev/pci/if_nep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nep.c,v 1.14 2015/01/10 17:02:17 kettenis Exp $ */ +/* $OpenBSD: if_nep.c,v 1.15 2015/01/10 18:56:55 kettenis Exp $ */ /* * Copyright (c) 2014, 2015 Mark Kettenis * @@ -1549,6 +1549,11 @@ nep_down(struct nep_softc *sc) timeout_del(&sc->sc_tick); + /* Disable interrupts. */ + nep_write(sc, LD_IM1(LDN_MAC(sc->sc_port)), 1); + nep_write(sc, LD_IM0(LDN_RXDMA(sc->sc_port)), 1); + nep_write(sc, LD_IM0(LDN_TXDMA(sc->sc_port)), 1); + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); ifp->if_timer = 0; |