summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2023-01-18 23:31:38 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2023-01-18 23:31:38 +0000
commitde9c5e26d936127f2c8f6c53981f4fcc16774ddb (patch)
tree8005c0b7af2128225fac102d507404ab1c6dc563 /sys
parent908637df9d1a9222c582ba68ee98ef253996467a (diff)
These days bge_stop() calls intr_barrier(9). So in bge_detach() we need
to disestablish the interrupt *after* calling bge_stop(). ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bge.c6
1 files changed, 3 insertions, 3 deletions
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);