From 203b1b650f3e2066ec54a882bcad653dac343780 Mon Sep 17 00:00:00 2001 From: dlg Date: Thu, 21 Dec 2017 03:58:27 +0000 Subject: [PATCH] add some ifq and ifiq barriers in ixl_down. move rxfill in ixl_up so the qtail is only written once. --- sys/dev/pci/if_ixl.c | 9 +++++---- 1 file 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); } -- 2.20.1