summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ata/ata_wdc.c6
-rw-r--r--sys/dev/atapiscsi/atapiscsi.c5
-rw-r--r--sys/dev/ic/wdc.c7
-rw-r--r--sys/dev/ic/wdcvar.h5
4 files changed, 13 insertions, 10 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 32147d4ecfa..dba5130af66 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -167,7 +167,7 @@ wdc_ata_bio_start(chp, xfer)
/* start timeout machinery */
if ((ata_bio->flags & ATA_POLL) == 0)
- timeout(wdctimeout, chp, ATA_DELAY / 1000 * hz);
+ timeout_add(&chp->ch_timo, ATA_DELAY / 1000 * hz);
_wdc_ata_bio_start(chp, xfer);
}
@@ -517,7 +517,7 @@ wdc_ata_bio_kill_xfer(chp, xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
- untimeout(wdctimeout, chp);
+ timeout_del(&chp->ch_timo);
/* remove this command from xfer queue */
wdc_free_xfer(chp, xfer);
@@ -544,7 +544,7 @@ wdc_ata_bio_done(chp, xfer)
(u_int)xfer->c_flags),
DEBUG_XFERS);
- untimeout(wdctimeout, chp);
+ timeout_del(&chp->ch_timo);
if (ata_bio->error == NOERROR)
drvp->n_dmaerrs = 0;
else if (drvp->n_dmaerrs >= NERRS_MAX) {
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c
index d8a5aab4215..c500d94a866 100644
--- a/sys/dev/atapiscsi/atapiscsi.c
+++ b/sys/dev/atapiscsi/atapiscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiscsi.c,v 1.25 2000/04/10 07:06:17 csapuntz Exp $ */
+/* $OpenBSD: atapiscsi.c,v 1.26 2000/06/30 01:03:40 art Exp $ */
/*
* This code is derived from code with the copyright below.
@@ -695,8 +695,7 @@ wdc_atapi_the_machine(chp, xfer, ctxt)
if (xfer->expect_irq) {
chp->ch_flags |= WDCF_IRQ_WAIT;
xfer->expect_irq = 0;
- timeout(wdctimeout, chp, xfer->endticks - ticks);
-
+ timeout_add(&chp->ch_timo, xfer->endticks - ticks);
return (claim_irq);
}
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index dcbd9e82cb8..44fcbda7bfc 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.17 2000/06/13 04:12:02 chris Exp $ */
+/* $OpenBSD: wdc.c,v 1.18 2000/06/30 01:03:41 art Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
@@ -506,6 +506,7 @@ wdcattach(chp)
inited++;
}
TAILQ_INIT(&chp->ch_queue->sc_xfer);
+ timeout_set(&chp->ch_timo, wdctimeout, chp);
for (i = 0; i < 2; i++) {
chp->ch_drive[i].chnl_softc = chp;
@@ -759,7 +760,7 @@ wdcintr(arg)
}
WDCDEBUG_PRINT(("wdcintr\n"), DEBUG_INTR);
- untimeout(wdctimeout, chp);
+ timeout_del(&chp->ch_timo);
chp->ch_flags &= ~WDCF_IRQ_WAIT;
xfer = chp->ch_queue->sc_xfer.tqh_first;
ret = xfer->c_intr(chp, xfer, 1);
@@ -1408,7 +1409,7 @@ __wdccommand_start(chp, xfer)
wdc_c->r_sector, wdc_c->r_count, wdc_c->r_precomp);
if ((wdc_c->flags & AT_POLL) == 0) {
chp->ch_flags |= WDCF_IRQ_WAIT; /* wait for interrupt */
- timeout(wdctimeout, chp, wdc_c->timeout / 1000 * hz);
+ timeout_add(&chp->ch_timo, wdc_c->timeout / 1000 * hz);
return;
}
/*
diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h
index 3aedbec42b0..d0c41794354 100644
--- a/sys/dev/ic/wdcvar.h
+++ b/sys/dev/ic/wdcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdcvar.h,v 1.8 2000/04/10 07:06:15 csapuntz Exp $ */
+/* $OpenBSD: wdcvar.h,v 1.9 2000/06/30 01:03:41 art Exp $ */
/* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */
/*-
@@ -37,6 +37,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/timeout.h>
+
#define WAITTIME (10 * hz) /* time to wait for a completion */
/* this is a lot for hard drives, but not for cdroms */
@@ -76,6 +78,7 @@ struct channel_softc { /* Per channel data */
* are not independants
*/
struct channel_queue *ch_queue;
+ struct timeout ch_timo;
};
/*