summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-12-21 03:58:28 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-12-21 03:58:28 +0000
commit5fbe00379b3bfb771fab3d8f3a4014aa64924bee (patch)
treefc8087754e8f8b951114ed4cdba9c59c9634d2bd /sys
parent4279d6e8e3359b6f8d2e14d89f481f70735d16b6 (diff)
add some ifq and ifiq barriers in ixl_down.
move rxfill in ixl_up so the qtail is only written once.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ixl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c
index ce2afc1811f..106e30f7f3a 100644
--- a/sys/dev/pci/if_ixl.c
+++ b/sys/dev/pci/if_ixl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ixl.c,v 1.6 2017/12/21 01:55:44 dlg Exp $ */
+/* $OpenBSD: if_ixl.c,v 1.7 2017/12/21 03:58:27 dlg Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -1738,8 +1738,6 @@ ixl_up(struct ixl_softc *sc)
rxr = ifp->if_iqs[i]->ifiq_softc;
txr = ifp->if_ifqs[i]->ifq_softc;
- ixl_rxfill(sc, rxr);
-
ixl_txr_qdis(sc, txr, 1);
ixl_rxr_config(sc, rxr);
@@ -1749,7 +1747,7 @@ ixl_up(struct ixl_softc *sc)
(sc->sc_pf_id << I40E_QTX_CTL_PF_INDX_SHIFT));
ixl_wr(sc, rxr->rxr_tail, 0);
- ixl_wr(sc, rxr->rxr_tail, rxr->rxr_prod);
+ ixl_rxfill(sc, rxr);
reg = ixl_rd(sc, I40E_QRX_ENA(i));
SET(reg, I40E_QRX_ENA_QENA_REQ_MASK);
@@ -1905,6 +1903,9 @@ ixl_down(struct ixl_softc *sc)
ixl_txr_qdis(sc, txr, 0);
+ ifiq_barrier(ifp->if_iqs[i]);
+ ifq_barrier(ifp->if_ifqs[i]);
+
if (!timeout_del(&rxr->rxr_refill))
timeout_barrier(&rxr->rxr_refill);
}