From: kettenis Date: Wed, 18 Jan 2023 23:31:37 +0000 (+0000) Subject: These days bge_stop() calls intr_barrier(9). So in bge_detach() we need X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=82b2348ed51d59bf64f5058a2053062240a3613d;p=openbsd These days bge_stop() calls intr_barrier(9). So in bge_detach() we need to disestablish the interrupt *after* calling bge_stop(). ok deraadt@ --- diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index f86088f4720..3b0f4261d61 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.399 2022/10/09 02:32:02 kevlo Exp $ */ +/* $OpenBSD: if_bge.c,v 1.400 2023/01/18 23:31:37 kettenis Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -3160,11 +3160,11 @@ bge_detach(struct device *self, int flags) struct bge_softc *sc = (struct bge_softc *)self; struct ifnet *ifp = &sc->arpcom.ac_if; + bge_stop(sc, 1); + if (sc->bge_intrhand) pci_intr_disestablish(sc->bge_pa.pa_pc, sc->bge_intrhand); - bge_stop(sc, 1); - /* Detach any PHYs we might have. */ if (LIST_FIRST(&sc->bge_mii.mii_phys) != NULL) mii_detach(&sc->bge_mii, MII_PHY_ANY, MII_OFFSET_ANY);