summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2021-02-15 03:42:01 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2021-02-15 03:42:01 +0000
commit5e132d2f9a0e878332fc4fd991ac6d51cb7591e3 (patch)
tree096ed840bfcdd0e4288a6143684e86ee1f9c3447 /sys
parent6679cdceef2d285806d58ccb28855ecc87c84dc7 (diff)
move the rearming of the cq after the refill of the rq.
this is the only real diff we have left outstanding on a box that experienced rx lockups. since adding this change it's been happy for the last 4 weeks and counting so far. ok jmatthew@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_mcx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 8d5c8864eba..75bccc03c79 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.98 2021/01/27 07:46:11 dlg Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.99 2021/02/15 03:42:00 dlg Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -6950,9 +6950,6 @@ mcx_process_cq(struct mcx_softc *sc, struct mcx_queues *q, struct mcx_cq *cq)
bus_dmamap_sync(sc->sc_dmat, MCX_DMA_MAP(&cq->cq_mem),
0, MCX_DMA_LEN(&cq->cq_mem), BUS_DMASYNC_PREREAD);
- cq->cq_count++;
- mcx_arm_cq(sc, cq, q->q_uar);
-
if (rxfree > 0) {
if_rxr_put(&rx->rx_rxr, rxfree);
if (ifiq_input(rx->rx_ifiq, &ml))
@@ -6962,6 +6959,10 @@ mcx_process_cq(struct mcx_softc *sc, struct mcx_queues *q, struct mcx_cq *cq)
if (if_rxr_inuse(&rx->rx_rxr) == 0)
timeout_add(&rx->rx_refill, 1);
}
+
+ cq->cq_count++;
+ mcx_arm_cq(sc, cq, q->q_uar);
+
if (txfree > 0) {
tx->tx_cons += txfree;
if (ifq_is_oactive(tx->tx_ifq))