Module Name:    src
Committed By:   yamaguchi
Date:           Tue Feb 25 07:17:19 UTC 2020

Modified Files:
        src/sys/dev/pci: if_ixl.c

Log Message:
Set 0 to txr_{prod,cons} and rxr_{prod,cons} when HMC objects
are cleared

Those values should be the same as head and tail in an HMC object


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_ixl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.45 src/sys/dev/pci/if_ixl.c:1.46
--- src/sys/dev/pci/if_ixl.c:1.45	Tue Feb 25 07:10:10 2020
+++ src/sys/dev/pci/if_ixl.c	Tue Feb 25 07:17:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.45 2020/02/25 07:10:10 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.46 2020/02/25 07:17:19 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.45 2020/02/25 07:10:10 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.46 2020/02/25 07:17:19 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2021,9 +2021,6 @@ ixl_reinit(struct ixl_softc *sc)
 		txr = sc->sc_qps[i].qp_txr;
 		rxr = sc->sc_qps[i].qp_rxr;
 
-		txr->txr_cons = txr->txr_prod = 0;
-		rxr->rxr_cons = rxr->rxr_prod = 0;
-
 		ixl_txr_config(sc, txr);
 		ixl_rxr_config(sc, rxr);
 	}
@@ -2507,6 +2504,7 @@ ixl_txr_unconfig(struct ixl_softc *sc, s
 
 	hmc = ixl_hmc_kva(sc, IXL_HMC_LAN_TX, txr->txr_qid);
 	memset(hmc, 0, ixl_hmc_len(sc, IXL_HMC_LAN_TX));
+	txr->txr_cons = txr->txr_prod = 0;
 }
 
 static void
@@ -3127,6 +3125,7 @@ ixl_rxr_unconfig(struct ixl_softc *sc, s
 
 	hmc = ixl_hmc_kva(sc, IXL_HMC_LAN_RX, rxr->rxr_qid);
 	memset(hmc, 0, ixl_hmc_len(sc, IXL_HMC_LAN_RX));
+	rxr->rxr_cons = rxr->rxr_prod = 0;
 }
 
 static void

Reply via email to