diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-30 06:56:25 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-30 06:56:25 +0000 |
commit | cc0cdf0c1cdbb40090dc40b4e113f7ba313d5ef8 (patch) | |
tree | b73c03897939e51e9b6a153e509e1c31dd87f9ff | |
parent | 018c61c6e3b949c9576673c6717474a911db0b30 (diff) |
Convert to new timeout API.
-rw-r--r-- | sys/dev/ata/wd.c | 8 | ||||
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 6aa3eb0d250..f9da3dd32cc 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.12 2000/04/10 07:06:16 csapuntz Exp $ */ +/* $OpenBSD: wd.c,v 1.13 2000/06/30 06:56:24 art Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -162,6 +162,7 @@ struct wd_softc { #if NRND > 0 rndsource_element_t rnd_source; #endif + struct timeout sc_restart_timeout; void *sc_sdhook; }; @@ -383,6 +384,7 @@ wdattach(parent, self, aux) rnd_attach_source(&wd->rnd_source, wd->sc_dev.dv_xname, RND_TYPE_DISK, 0); #endif + timeout_set(&wd->sc_restart_timeout, wdrestart, wd); } int @@ -586,7 +588,7 @@ __wdstart(wd, bp) disk_busy(&wd->sc_dk); switch (wdc_ata_bio(wd->drvp, &wd->sc_wdc_bio)) { case WDC_TRY_AGAIN: - timeout(wdrestart, wd, hz); + timeout_add(&wd->sc_restart_timeout, hz); break; case WDC_QUEUED: break; @@ -637,7 +639,7 @@ retry: wd->sc_wdc_bio.blkdone, wd->sc_dk.dk_label); if (wd->retries++ < WDIORETRIES) { printf(", retrying\n"); - timeout(wdrestart, wd, RECOVERYTIME); + timeout_add(&wd->sc_restart_timeout, RECOVERYTIME); return; } printf("\n"); diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index c500d94a866..246a0ec2a43 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.26 2000/06/30 01:03:40 art Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.27 2000/06/30 06:56:24 art Exp $ */ /* * This code is derived from code with the copyright below. @@ -713,7 +713,7 @@ wdc_atapi_the_machine(chp, xfer, ctxt) case DONE: if (xfer->c_flags & C_POLL_MACHINE) - untimeout (wdc_atapi_timer_handler, xfer); + untimeout(wdc_atapi_timer_handler, xfer); wdc_free_xfer(chp, xfer); wdcstart(chp); |