From 5fefadf0040952304b1fc870800d232854fbc325 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 10 Jan 2015 18:56:55 +0000 Subject: [PATCH] Disable (most) interrupts when the interface goes down. --- sys/dev/pci/if_nep.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.20.1