Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci guard statistics gathering callout with #ifdef



details:   https://anonhg.NetBSD.org/src/rev/418e733f0465
branches:  trunk
changeset: 1014385:418e733f0465
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Sun Sep 20 20:15:11 2020 +0000

description:
guard statistics gathering callout with #ifdef

diffstat:

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

diffs (45 lines):

diff -r e8d2cfc70a9f -r 418e733f0465 sys/dev/pci/if_kse.c
--- a/sys/dev/pci/if_kse.c      Sun Sep 20 20:14:50 2020 +0000
+++ b/sys/dev/pci/if_kse.c      Sun Sep 20 20:15:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kse.c,v 1.54 2020/09/20 17:59:42 nisimura Exp $     */
+/*     $NetBSD: if_kse.c,v 1.55 2020/09/20 20:15:11 nisimura Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.54 2020/09/20 17:59:42 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.55 2020/09/20 20:15:11 nisimura Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -236,7 +236,6 @@
        int sc_flowflags;               /* 802.3x PAUSE flow control */
 
        callout_t  sc_tick_ch;          /* MII tick callout */
-       callout_t  sc_stat_ch;          /* statistics counter callout */
 
        bus_dmamap_t sc_cddmamap;       /* control data DMA map */
 #define sc_cddma       sc_cddmamap->dm_segs[0].ds_addr
@@ -261,6 +260,7 @@
        uint32_t sc_chip;
 
 #ifdef KSE_EVENT_COUNTERS
+       callout_t  sc_stat_ch;          /* statistics counter callout */
        struct ksext {
                char evcntname[3][8];
                struct evcnt pev[3][34];
@@ -869,8 +869,9 @@
 
        if (sc->sc_chip == 0x8841)
                callout_stop(&sc->sc_tick_ch);
+#ifdef KSE_EVENT_COUNTERS
        callout_stop(&sc->sc_stat_ch);
-
+#endif
        sc->sc_txc &= ~TXC_TEN;
        sc->sc_rxc &= ~RXC_REN;
        CSR_WRITE_4(sc, MDTXC, sc->sc_txc);



Home | Main Index | Thread Index | Old Index