Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Sync with OpenBSD r1.99:



details:   https://anonhg.NetBSD.org/src/rev/3b028dff7b9c
branches:  trunk
changeset: 980837:3b028dff7b9c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Feb 20 13:31:35 2021 +0000

description:
Sync with OpenBSD r1.99:

   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.

diffstat:

 sys/dev/pci/if_mcx.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r e8d02f71d5db -r 3b028dff7b9c sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Sat Feb 20 11:06:56 2021 +0000
+++ b/sys/dev/pci/if_mcx.c      Sat Feb 20 13:31:35 2021 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: if_mcx.c,v 1.16 2021/02/05 22:23:30 jmcneill Exp $ */
-/*     $OpenBSD: if_mcx.c,v 1.98 2021/01/27 07:46:11 dlg Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.17 2021/02/20 13:31:35 jmcneill Exp $ */
+/*     $OpenBSD: if_mcx.c,v 1.99 2021/02/15 03:42:00 dlg Exp $ */
 
 /*
  * Copyright (c) 2017 David Gwynne <dlg%openbsd.org@localhost>
@@ -23,7 +23,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.16 2021/02/05 22:23:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.17 2021/02/20 13:31:35 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -7082,9 +7082,6 @@
        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) {
                mcx_rxr_put(&rx->rx_rxr, rxfree);
                while (MBUFQ_FIRST(&mq) != NULL) {
@@ -7096,6 +7093,10 @@
                if (mcx_rxr_inuse(&rx->rx_rxr) == 0)
                        callout_schedule(&rx->rx_refill, 1);
        }
+
+       cq->cq_count++;
+       mcx_arm_cq(sc, cq, q->q_uar);
+
        if (txfree > 0) {
                tx->tx_cons += txfree;
                if_schedule_deferred_start(ifp);



Home | Main Index | Thread Index | Old Index