diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-03-05 16:04:13 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-03-05 16:04:13 +0000 |
commit | 198231f71c44cb3935875cd9d773d2a2d88150c8 (patch) | |
tree | ab90f551e12b7a0e21f7c204abf5166687f6e3bc /sys/dev/atapiscsi | |
parent | 34625e7d9165446d5330f21d83b2070b9a11dfc0 (diff) |
Convert to new timeout API. costa@ ok.
Diffstat (limited to 'sys/dev/atapiscsi')
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 2e376b609d2..539c2bba649 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.36 2001/01/30 03:16:09 csapuntz Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.37 2001/03/05 16:04:12 ho Exp $ */ /* * This code is derived from code with the copyright below. @@ -50,6 +50,7 @@ #include <sys/reboot.h> #include <sys/file.h> #include <sys/ioctl.h> +#include <sys/timeout.h> #include <scsi/scsi_all.h> #include <scsi/scsi_disk.h> #include <scsi/scsi_tape.h> @@ -443,6 +444,8 @@ wdc_atapi_send_cmd(sc_xfer) xfer->c_start = wdc_atapi_start; xfer->c_intr = wdc_atapi_intr; + timeout_set(&xfer->atapi_poll_to, wdc_atapi_timer_handler, xfer); + s = splbio(); if (drvp->atapi_cap & ACAP_DSC) { @@ -738,7 +741,7 @@ wdc_atapi_the_machine(chp, xfer, ctxt) case DONE: if (xfer->c_flags & C_POLL_MACHINE) - untimeout(wdc_atapi_timer_handler, xfer); + timeout_del(&xfer->atapi_poll_to); wdc_free_xfer(chp, xfer); wdcstart(chp); @@ -746,7 +749,7 @@ wdc_atapi_the_machine(chp, xfer, ctxt) return (claim_irq); } - timeout(wdc_atapi_timer_handler, xfer, timeout_delay); + timeout_add(&xfer->atapi_poll_to, timeout_delay); xfer->c_flags |= C_POLL_MACHINE; return (claim_irq); } |