Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Set 0 to txr_{prod,cons} and rxr_{prod,cons} whe...



details:   https://anonhg.NetBSD.org/src/rev/c4d9a02e68ac
branches:  trunk
changeset: 969629:c4d9a02e68ac
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Tue Feb 25 07:17:19 2020 +0000

description:
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

diffstat:

 sys/dev/pci/if_ixl.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 0a8f7f6ce25a -r c4d9a02e68ac sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Tue Feb 25 07:10:10 2020 +0000
+++ b/sys/dev/pci/if_ixl.c      Tue Feb 25 07:17:19 2020 +0000
@@ -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 @@
                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 @@
 
        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 @@
 
        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



Home | Main Index | Thread Index | Old Index