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 /sys/dev/ata | |
parent | 018c61c6e3b949c9576673c6717474a911db0b30 (diff) |
Convert to new timeout API.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/wd.c | 8 |
1 files changed, 5 insertions, 3 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"); |