summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/mac/if_gm.c12
-rw-r--r--sys/arch/powerpc/mac/mesh.c9
2 files changed, 13 insertions, 8 deletions
diff --git a/sys/arch/powerpc/mac/if_gm.c b/sys/arch/powerpc/mac/if_gm.c
index 33395a8956b..107d1eb4386 100644
--- a/sys/arch/powerpc/mac/if_gm.c
+++ b/sys/arch/powerpc/mac/if_gm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gm.c,v 1.17 2001/07/10 02:16:11 fgsch Exp $ */
+/* $OpenBSD: if_gm.c,v 1.18 2001/08/08 21:08:33 miod Exp $ */
/* $NetBSD: if_gm.c,v 1.2 2000/03/04 11:17:00 tsubai Exp $ */
/*-
@@ -94,6 +94,7 @@ struct gmac_softc {
caddr_t sc_txbuf[NTXBUF];
caddr_t sc_rxbuf[NRXBUF];
struct mii_data sc_mii;
+ struct timeout sc_tmo;
};
@@ -323,6 +324,7 @@ gmac_attach(parent, self, aux)
mii->mii_readreg = gmac_mii_readreg;
mii->mii_writereg = gmac_mii_writereg;
mii->mii_statchg = gmac_mii_statchg;
+ timeout_set(&sc->sc_tmo, gmac_mii_tick, sc);
ifmedia_init(&mii->mii_media, 0, gmac_mediachange, gmac_mediastatus);
#ifdef __NetBSD__
@@ -694,7 +696,7 @@ gmac_stop(sc)
s = splnet();
- untimeout(gmac_mii_tick, sc);
+ timeout_del(&sc->sc_tmo);
#ifndef __OenBSD__
mii_down(&sc->sc_mii);
#endif
@@ -890,8 +892,8 @@ gmac_init(sc)
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
- untimeout(gmac_mii_tick, sc);
- timeout(gmac_mii_tick, sc, 1);
+ timeout_del(&sc->sc_tmo);
+ timeout_add(&sc->sc_tmo, 1);
gmac_start(ifp);
}
@@ -1131,7 +1133,7 @@ gmac_mii_tick(v)
mii_tick(&sc->sc_mii);
splx(s);
- timeout(gmac_mii_tick, sc, hz);
+ timeout_add(&sc->sc_tmo, hz);
}
void
diff --git a/sys/arch/powerpc/mac/mesh.c b/sys/arch/powerpc/mac/mesh.c
index fee9cf66108..2d68d3740f7 100644
--- a/sys/arch/powerpc/mac/mesh.c
+++ b/sys/arch/powerpc/mac/mesh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mesh.c,v 1.2 2001/07/04 08:38:51 niklas Exp $ */
+/* $OpenBSD: mesh.c,v 1.3 2001/08/08 21:08:33 miod Exp $ */
/* $NetBSD: mesh.c,v 1.1 1999/02/19 13:06:03 tsubai Exp $ */
/*-
@@ -128,6 +128,8 @@ struct mesh_softc {
TAILQ_HEAD(, mesh_scb) free_scb;
TAILQ_HEAD(, mesh_scb) ready_scb;
struct mesh_scb sc_scb[16];
+
+ struct timeout sc_tmo;
};
/* mesh_msgout() values */
@@ -260,6 +262,7 @@ mesh_attach(parent, self, aux)
TAILQ_INSERT_TAIL(&sc->free_scb, &sc->sc_scb[i], chain);
sc->sc_dmacmd = dbdma_alloc(sizeof(dbdma_command_t) * 20);
+ timeout_set(&sc->sc_tmo, mesh_timeout, scb);
mesh_reset(sc);
mesh_bus_reset(sc);
@@ -497,7 +500,7 @@ mesh_select(sc, scb)
sc->sc_prevphase = MESH_SELECTING;
sc->sc_nextstate = MESH_IDENTIFY;
- timeout(mesh_timeout, scb, 10*hz);
+ timeout_add(&sc->sc_tmo, 10*hz);
}
void
@@ -1065,7 +1068,7 @@ mesh_done(sc, scb)
sc->sc_nextstate = MESH_BUSFREE;
sc->sc_nexus = NULL;
- untimeout(mesh_timeout, scb);
+ timeout_del(&sc->sc_tmo);
if (scb->status == SCSI_BUSY) {
xs->error = XS_BUSY;