summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bnxt.c
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2024-01-04 07:08:48 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2024-01-04 07:08:48 +0000
commitb8675e52eed21d865ef5a67ecce4c8ca02aab5d7 (patch)
tree00d358751da13391739248d0f4c5c358c43a233e /sys/dev/pci/if_bnxt.c
parentc27ba9ff155c3425688258d6745af10552cf1e65 (diff)
fix up barriers in bnxt_down() - use barriers for all interrupts and
for the rx refill timeouts. tested by hrvoje ok bluhm@
Diffstat (limited to 'sys/dev/pci/if_bnxt.c')
-rw-r--r--sys/dev/pci/if_bnxt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c
index 6e9c5b616f8..f60b3ade1c3 100644
--- a/sys/dev/pci/if_bnxt.c
+++ b/sys/dev/pci/if_bnxt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnxt.c,v 1.39 2023/11/10 15:51:20 bluhm Exp $ */
+/* $OpenBSD: if_bnxt.c,v 1.40 2024/01/04 07:08:47 jmatthew Exp $ */
/*-
* Broadcom NetXtreme-C/E network driver.
*
@@ -1158,12 +1158,16 @@ bnxt_down(struct bnxt_softc *sc)
CLR(ifp->if_flags, IFF_RUNNING);
+ intr_barrier(sc->sc_ih);
+
for (i = 0; i < sc->sc_nqueues; i++) {
ifq_clr_oactive(ifp->if_ifqs[i]);
ifq_barrier(ifp->if_ifqs[i]);
- /* intr barrier? */
- timeout_del(&sc->sc_queues[i].q_rx.rx_refill);
+ timeout_del_barrier(&sc->sc_queues[i].q_rx.rx_refill);
+
+ if (sc->sc_intrmap != NULL)
+ intr_barrier(sc->sc_queues[i].q_ihc);
}
bnxt_hwrm_free_filter(sc, &sc->sc_vnic);