Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Use callout_setfunc() / callout_schedule().



details:   https://anonhg.NetBSD.org/src/rev/4027ebbf96cf
branches:  trunk
changeset: 1007110:4027ebbf96cf
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Feb 07 00:56:48 2020 +0000

description:
Use callout_setfunc() / callout_schedule().

diffstat:

 sys/dev/ic/aic6915.c   |   9 +++++----
 sys/dev/ic/elinkxl.c   |   9 +++++----
 sys/dev/ic/gem.c       |  14 ++++++++------
 sys/dev/ic/hme.c       |   9 +++++----
 sys/dev/ic/i82557.c    |   9 +++++----
 sys/dev/ic/rtl8169.c   |   9 +++++----
 sys/dev/ic/rtl81x9.c   |   9 +++++----
 sys/dev/ic/smc83c170.c |   9 +++++----
 sys/dev/ic/smc91cxx.c  |   9 +++++----
 9 files changed, 48 insertions(+), 38 deletions(-)

diffs (truncated from 411 to 300 lines):

diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/aic6915.c
--- a/sys/dev/ic/aic6915.c      Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/aic6915.c      Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic6915.c,v 1.41 2020/01/29 14:09:58 thorpej Exp $     */
+/*     $NetBSD: aic6915.c,v 1.42 2020/02/07 00:56:48 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.41 2020/01/29 14:09:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.42 2020/02/07 00:56:48 thorpej Exp $");
 
 
 #include <sys/param.h>
@@ -143,6 +143,7 @@
        uint8_t enaddr[ETHER_ADDR_LEN];
 
        callout_init(&sc->sc_tick_callout, 0);
+       callout_setfunc(&sc->sc_tick_callout, sf_tick, sc);
 
        /*
         * If we're I/O mapped, the functional register handle is
@@ -823,7 +824,7 @@
        sf_stats_update(sc);
        splx(s);
 
-       callout_reset(&sc->sc_tick_callout, hz, sf_tick, sc);
+       callout_schedule(&sc->sc_tick_callout, hz);
 }
 
 /*
@@ -1088,7 +1089,7 @@
            GEC_TxDmaEn | GEC_RxDmaEn | GEC_TransmitEn | GEC_ReceiveEn);
 
        /* Start the on second clock. */
-       callout_reset(&sc->sc_tick_callout, hz, sf_tick, sc);
+       callout_schedule(&sc->sc_tick_callout, hz);
 
        /*
         * Note that the interface is now running.
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/elinkxl.c      Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.135 2020/02/04 05:25:39 thorpej Exp $    */
+/*     $NetBSD: elinkxl.c,v 1.136 2020/02/07 00:56:48 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.135 2020/02/04 05:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.136 2020/02/07 00:56:48 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -176,6 +176,7 @@
        pmf_self_suspensor_init(sc->sc_dev, &sc->sc_suspensor, &sc->sc_qual);
 
        callout_init(&sc->ex_mii_callout, 0);
+       callout_setfunc(&sc->ex_mii_callout, ex_tick, sc);
 
        ex_reset(sc);
 
@@ -688,7 +689,7 @@
 
        GO_WINDOW(1);
 
-       callout_reset(&sc->ex_mii_callout, hz, ex_tick, sc);
+       callout_schedule(&sc->ex_mii_callout, hz);
 
  out:
        if (error) {
@@ -1546,7 +1547,7 @@
 
        splx(s);
 
-       callout_reset(&sc->ex_mii_callout, hz, ex_tick, sc);
+       callout_schedule(&sc->ex_mii_callout, hz);
 }
 
 void
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c  Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/gem.c  Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gem.c,v 1.127 2020/02/04 05:25:39 thorpej Exp $ */
+/*     $NetBSD: gem.c,v 1.128 2020/02/07 00:56:48 thorpej Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.127 2020/02/04 05:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.128 2020/02/07 00:56:48 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -616,6 +616,8 @@
 #endif
 
        callout_init(&sc->sc_tick_ch, 0);
+       callout_setfunc(&sc->sc_tick_ch, gem_tick, sc);
+
        callout_init(&sc->sc_rx_watchdog, 0);
        callout_setfunc(&sc->sc_rx_watchdog, gem_rx_watchdog, sc);
 
@@ -641,7 +643,7 @@
                s = splnet();
                mii_tick(&sc->sc_mii);
                splx(s);
-               callout_reset(&sc->sc_tick_ch, hz, gem_tick, sc);
+               callout_schedule(&sc->sc_tick_ch, hz);
        }
 }
 
@@ -1062,7 +1064,7 @@
        gem_bitwait(sc, h, GEM_MII_STATUS, 0, GEM_MII_STATUS_ANEG_CPT);
 
        /* Start the 10 second timer */
-       callout_reset(&sc->sc_tick_ch, hz * 10, gem_tick, sc);
+       callout_schedule(&sc->sc_tick_ch, hz * 10);
 }
 
 /*
@@ -1221,7 +1223,7 @@
                gem_pcs_start(sc);
        else
                /* Start the one second timer. */
-               callout_reset(&sc->sc_tick_ch, hz, gem_tick, sc);
+               callout_schedule(&sc->sc_tick_ch, hz);
 
        sc->sc_flags &= ~GEM_LINK;
        ifp->if_flags |= IFF_RUNNING;
@@ -2163,7 +2165,7 @@
                gem_statuschange(sc);
 
                /* Start the 10 second timer */
-               callout_reset(&sc->sc_tick_ch, hz * 10, gem_tick, sc);
+               callout_schedule(&sc->sc_tick_ch, hz * 10);
        }
        return 1;
 }
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/hme.c
--- a/sys/dev/ic/hme.c  Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/hme.c  Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hme.c,v 1.106 2020/01/29 14:47:08 thorpej Exp $        */
+/*     $NetBSD: hme.c,v 1.107 2020/02/07 00:56:48 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.106 2020/01/29 14:47:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.107 2020/02/07 00:56:48 thorpej Exp $");
 
 /* #define HMEDEBUG */
 
@@ -315,6 +315,7 @@
                          RND_TYPE_NET, RND_FLAG_DEFAULT);
 
        callout_init(&sc->sc_tick_ch, 0);
+       callout_setfunc(&sc->sc_tick_ch, hme_tick, sc);
 }
 
 void
@@ -327,7 +328,7 @@
        mii_tick(&sc->sc_mii);
        splx(s);
 
-       callout_reset(&sc->sc_tick_ch, hz, hme_tick, sc);
+       callout_schedule(&sc->sc_tick_ch, hz);
 }
 
 void
@@ -635,7 +636,7 @@
                return rc;
 
        /* Start the one second timer. */
-       callout_reset(&sc->sc_tick_ch, hz, hme_tick, sc);
+       callout_schedule(&sc->sc_tick_ch, hz);
 
        ifp->if_flags |= IFF_RUNNING;
        ifp->if_flags &= ~IFF_OACTIVE;
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/i82557.c       Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.158 2020/02/04 05:25:39 thorpej Exp $     */
+/*     $NetBSD: i82557.c,v 1.159 2020/02/07 00:56:48 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.158 2020/02/04 05:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.159 2020/02/07 00:56:48 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -260,6 +260,7 @@
        struct fxp_phytype *fp;
 
        callout_init(&sc->sc_callout, 0);
+       callout_setfunc(&sc->sc_callout, fxp_tick, sc);
 
         /*
         * Enable use of extended RFDs and IPCBs for 82550 and later chips.
@@ -1566,7 +1567,7 @@
        /*
         * Schedule another timeout one second from now.
         */
-       callout_reset(&sc->sc_callout, hz, fxp_tick, sc);
+       callout_schedule(&sc->sc_callout, hz);
 }
 
 /*
@@ -2006,7 +2007,7 @@
        /*
         * Start the one second timer.
         */
-       callout_reset(&sc->sc_callout, hz, fxp_tick, sc);
+       callout_schedule(&sc->sc_callout, hz);
 
        /*
         * Attempt to start output on the interface.
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c      Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/rtl8169.c      Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl8169.c,v 1.163 2020/02/04 05:25:39 thorpej Exp $    */
+/*     $NetBSD: rtl8169.c,v 1.164 2020/02/07 00:56:48 thorpej Exp $    */
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.163 2020/02/04 05:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.164 2020/02/07 00:56:48 thorpej Exp $");
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -873,6 +873,7 @@
        IFQ_SET_READY(&ifp->if_snd);
 
        callout_init(&sc->rtk_tick_ch, 0);
+       callout_setfunc(&sc->rtk_tick_ch, re_tick, sc);
 
        /* Do MII setup */
        mii->mii_ifp = ifp;
@@ -1470,7 +1471,7 @@
        mii_tick(&sc->mii);
        splx(s);
 
-       callout_reset(&sc->rtk_tick_ch, hz, re_tick, sc);
+       callout_schedule(&sc->rtk_tick_ch, hz);
 }
 
 int
@@ -2031,7 +2032,7 @@
        ifp->if_flags |= IFF_RUNNING;
        ifp->if_flags &= ~IFF_OACTIVE;
 
-       callout_reset(&sc->rtk_tick_ch, hz, re_tick, sc);
+       callout_schedule(&sc->rtk_tick_ch, hz);
 
  out:
        if (error) {
diff -r 588803f6003a -r 4027ebbf96cf sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Fri Feb 07 00:35:00 2020 +0000
+++ b/sys/dev/ic/rtl81x9.c      Fri Feb 07 00:56:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.109 2020/02/04 05:25:39 thorpej Exp $    */
+/*     $NetBSD: rtl81x9.c,v 1.110 2020/02/07 00:56:48 thorpej Exp $    */
 
 /*
  * Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.109 2020/02/04 05:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.110 2020/02/07 00:56:48 thorpej Exp $");
 
 



Home | Main Index | Thread Index | Old Index