Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Use callout_setfunc() / callout_schedule().
details: https://anonhg.NetBSD.org/src/rev/44907d1193bf
branches: trunk
changeset: 1007108:44907d1193bf
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Feb 07 00:04:28 2020 +0000
description:
Use callout_setfunc() / callout_schedule().
diffstat:
sys/dev/pci/if_bce.c | 9 +++++----
sys/dev/pci/if_bge.c | 9 +++++----
sys/dev/pci/if_bnx.c | 9 +++++----
sys/dev/pci/if_cas.c | 9 +++++----
sys/dev/pci/if_ena.c | 9 ++++-----
sys/dev/pci/if_jme.c | 9 +++++----
sys/dev/pci/if_pcn.c | 9 +++++----
sys/dev/pci/if_sip.c | 9 +++++----
sys/dev/pci/if_ste.c | 9 +++++----
sys/dev/pci/if_stge.c | 9 +++++----
sys/dev/pci/if_vr.c | 9 +++++----
sys/dev/pci/if_vte.c | 9 +++++----
12 files changed, 59 insertions(+), 49 deletions(-)
diffs (truncated from 522 to 300 lines):
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_bce.c
--- a/sys/dev/pci/if_bce.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_bce.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bce.c,v 1.57 2020/01/30 13:56:48 thorpej Exp $ */
+/* $NetBSD: if_bce.c,v 1.58 2020/02/07 00:04:28 thorpej Exp $ */
/*
* Copyright (c) 2003 Clifford Wright. All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.57 2020/01/30 13:56:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.58 2020/02/07 00:04:28 thorpej Exp $");
#include "vlan.h"
@@ -475,6 +475,7 @@
rnd_attach_source(&sc->rnd_source, device_xname(self),
RND_TYPE_NET, RND_FLAG_DEFAULT);
callout_init(&sc->bce_timeout, 0);
+ callout_setfunc(&sc->bce_timeout, bce_tick, sc);
if (pmf_device_register(self, NULL, bce_resume))
pmf_class_network_register(self, ifp);
@@ -998,7 +999,7 @@
BCE_ENET_CTL) | EC_EE);
/* start timer */
- callout_reset(&sc->bce_timeout, hz, bce_tick, sc);
+ callout_schedule(&sc->bce_timeout, hz);
/* mark as running, and no outputs active */
ifp->if_flags |= IFF_RUNNING;
@@ -1487,5 +1488,5 @@
mii_tick(&sc->bce_mii);
splx(s);
- callout_reset(&sc->bce_timeout, hz, bce_tick, sc);
+ callout_schedule(&sc->bce_timeout, hz);
}
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_bge.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.344 2020/02/04 05:44:14 thorpej Exp $ */
+/* $NetBSD: if_bge.c,v 1.345 2020/02/07 00:04:28 thorpej Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.344 2020/02/04 05:44:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.345 2020/02/07 00:04:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -4010,6 +4010,7 @@
#endif /* BGE_EVENT_COUNTERS */
DPRINTFN(5, ("callout_init\n"));
callout_init(&sc->bge_timeout, 0);
+ callout_setfunc(&sc->bge_timeout, bge_tick, sc);
if (pmf_device_register(self, NULL, NULL))
pmf_class_network_register(self, ifp);
@@ -4802,7 +4803,7 @@
bge_asf_driver_up(sc);
if (!sc->bge_detaching)
- callout_reset(&sc->bge_timeout, hz, bge_tick, sc);
+ callout_schedule(&sc->bge_timeout, hz);
splx(s);
}
@@ -5693,7 +5694,7 @@
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
- callout_reset(&sc->bge_timeout, hz, bge_tick, sc);
+ callout_schedule(&sc->bge_timeout, hz);
out:
sc->bge_if_flags = ifp->if_flags;
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_bnx.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bnx.c,v 1.91 2020/02/04 05:44:14 thorpej Exp $ */
+/* $NetBSD: if_bnx.c,v 1.92 2020/02/07 00:04:28 thorpej Exp $ */
/* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */
/*-
@@ -35,7 +35,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
#endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.91 2020/02/04 05:44:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.92 2020/02/07 00:04:28 thorpej Exp $");
/*
* The following controllers are supported by this driver:
@@ -912,6 +912,7 @@
ether_ifattach(ifp, sc->eaddr);
callout_init(&sc->bnx_timeout, 0);
+ callout_setfunc(&sc->bnx_timeout, bnx_tick, sc);
/* Hookup IRQ last. */
sc->bnx_intrhand = pci_intr_establish_xname(pc, ih, IPL_NET, bnx_intr,
@@ -5065,7 +5066,7 @@
SET(ifp->if_flags, IFF_RUNNING);
CLR(ifp->if_flags, IFF_OACTIVE);
- callout_reset(&sc->bnx_timeout, hz, bnx_tick, sc);
+ callout_schedule(&sc->bnx_timeout, hz);
bnx_init_exit:
DBPRINT(sc, BNX_VERBOSE_RESET, "Exiting %s()\n", __func__);
@@ -5894,7 +5895,7 @@
/* Schedule the next tick. */
if (!sc->bnx_detaching)
- callout_reset(&sc->bnx_timeout, hz, bnx_tick, sc);
+ callout_schedule(&sc->bnx_timeout, hz);
if (sc->bnx_link)
goto bnx_tick_exit;
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_cas.c
--- a/sys/dev/pci/if_cas.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_cas.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cas.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $ */
+/* $NetBSD: if_cas.c,v 1.40 2020/02/07 00:04:28 thorpej Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.40 2020/02/07 00:04:28 thorpej Exp $");
#ifndef _MODULE
#include "opt_inet.h"
@@ -732,6 +732,7 @@
NULL, device_xname(sc->sc_dev), "interrupts");
callout_init(&sc->sc_tick_ch, 0);
+ callout_setfunc(&sc->sc_tick_ch, cas_tick, sc);
return;
}
@@ -875,7 +876,7 @@
mii_tick(&sc->sc_mii);
splx(s);
- callout_reset(&sc->sc_tick_ch, hz, cas_tick, sc);
+ callout_schedule(&sc->sc_tick_ch, hz);
}
int
@@ -1277,7 +1278,7 @@
bus_space_write_4(t, h, CAS_RX_KICK2, 4);
/* Start the one second timer. */
- callout_reset(&sc->sc_tick_ch, hz, cas_tick, sc);
+ callout_schedule(&sc->sc_tick_ch, hz);
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_ena.c
--- a/sys/dev/pci/if_ena.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_ena.c Fri Feb 07 00:04:28 2020 +0000
@@ -31,7 +31,7 @@
#if 0
__FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
#endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.21 2020/02/04 05:44:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.22 2020/02/07 00:04:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2261,8 +2261,7 @@
if_setdrvflagbits(adapter->ifp, IFF_RUNNING,
IFF_OACTIVE);
- callout_reset(&adapter->timer_service, hz,
- ena_timer_service, (void *)adapter);
+ callout_schedule(&adapter->timer_service, hz);
adapter->up = true;
@@ -3629,8 +3628,7 @@
}
}
- callout_reset(&adapter->timer_service, hz,
- ena_timer_service, (void *)adapter);
+ callout_schedule(&adapter->timer_service, hz);
rw_exit(&adapter->ioctl_sx);
@@ -3800,6 +3798,7 @@
}
callout_init(&adapter->timer_service, CALLOUT_MPSAFE);
+ callout_setfunc(&adapter->timer_service, ena_timer_service, adapter);
/* Initialize reset task queue */
rc = workqueue_create(&adapter->reset_tq, "ena_reset_enq",
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_jme.c
--- a/sys/dev/pci/if_jme.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_jme.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_jme.c,v 1.47 2020/01/30 05:42:00 thorpej Exp $ */
+/* $NetBSD: if_jme.c,v 1.48 2020/02/07 00:04:28 thorpej Exp $ */
/*
* Copyright (c) 2008 Manuel Bouyer. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.47 2020/01/30 05:42:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.48 2020/02/07 00:04:28 thorpej Exp $");
#include <sys/param.h>
@@ -280,6 +280,7 @@
sc->jme_dev = self;
aprint_normal("\n");
callout_init(&sc->jme_tick_ch, 0);
+ callout_setfunc(&sc->jme_tick_ch, jme_ticks, sc);
jp = jme_lookup_product(pa->pa_id);
if (jp == NULL)
@@ -962,7 +963,7 @@
sc->jme_txcsr | TXCSR_TX_ENB);
/* start ticks calls */
- callout_reset(&sc->jme_tick_ch, hz, jme_ticks, sc);
+ callout_schedule(&sc->jme_tick_ch, hz);
sc->jme_if.if_flags |= IFF_RUNNING;
sc->jme_if.if_flags &= ~IFF_OACTIVE;
splx(s);
@@ -1756,7 +1757,7 @@
mii_tick(&sc->jme_mii);
/* every seconds */
- callout_reset(&sc->jme_tick_ch, hz, jme_ticks, sc);
+ callout_schedule(&sc->jme_tick_ch, hz);
splx(s);
}
diff -r 769be3541328 -r 44907d1193bf sys/dev/pci/if_pcn.c
--- a/sys/dev/pci/if_pcn.c Thu Feb 06 23:30:19 2020 +0000
+++ b/sys/dev/pci/if_pcn.c Fri Feb 07 00:04:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pcn.c,v 1.73 2020/01/29 06:46:58 thorpej Exp $ */
+/* $NetBSD: if_pcn.c,v 1.74 2020/02/07 00:04:28 thorpej Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.73 2020/01/29 06:46:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.74 2020/02/07 00:04:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -582,6 +582,7 @@
sc->sc_dev = self;
callout_init(&sc->sc_tick_ch, 0);
+ callout_setfunc(&sc->sc_tick_ch, pcn_tick, sc);
aprint_normal(": AMD PCnet-PCI Ethernet\n");
@@ -1567,7 +1568,7 @@
mii_tick(&sc->sc_mii);
splx(s);
- callout_reset(&sc->sc_tick_ch, hz, pcn_tick, sc);
+ callout_schedule(&sc->sc_tick_ch, hz);
}
/*
@@ -1811,7 +1812,7 @@
if (sc->sc_flags & PCN_F_HAS_MII) {
/* Start the one second MII clock. */
- callout_reset(&sc->sc_tick_ch, hz, pcn_tick, sc);
+ callout_schedule(&sc->sc_tick_ch, hz);
}
Home |
Main Index |
Thread Index |
Old Index