diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-05-01 01:07:52 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-05-01 01:07:52 +0000 |
commit | 2da345fe092d8da598fe4bf83b8cc063f13e8e21 (patch) | |
tree | 9b9fdc92ceb2ccbe97399ec6a6d65d1959271e20 /sys/dev/tc | |
parent | 73d5699ea92aac56dc0585765d07fde464070c29 (diff) |
Convert to new timeouts.
Diffstat (limited to 'sys/dev/tc')
-rw-r--r-- | sys/dev/tc/asc.c | 10 | ||||
-rw-r--r-- | sys/dev/tc/ascvar.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/tc/asc.c b/sys/dev/tc/asc.c index 03d633ad262..5f9a2a0bee4 100644 --- a/sys/dev/tc/asc.c +++ b/sys/dev/tc/asc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asc.c,v 1.16 2001/01/25 03:50:52 todd Exp $ */ +/* $OpenBSD: asc.c,v 1.17 2001/05/01 01:07:50 aaron Exp $ */ /* $NetBSD: asc.c,v 1.46 1998/05/08 15:39:01 mhitch Exp $ */ /*- @@ -125,6 +125,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/timeout.h> #include <sys/dkstat.h> #include <sys/buf.h> #include <sys/conf.h> @@ -523,6 +524,8 @@ ascattach(asc, bus_speed) /* Hack for old-sytle SCSI-device probe */ (void) pmax_add_scsi(&ascdriver, unit); + timeout_set(&asc->asc_timo, asc_timeout, scsicmd); + printf(": target %d\n", id); @@ -587,8 +590,7 @@ asc_start(scsicmd) * Kludge: use a 60 second timeout if data is being transferred, * otherwise use a 30 minute timeout. */ - timeout(asc_timeout, scsicmd, hz * (scsicmd->buflen == 0 ? - 1800 : 60)); + timeout_add(&asc->asc_timo, hz * (scsicmd->buflen == 0 ? 1800 : 60)); asc_startcmd(asc, sdp->sd_drive); splx(s); } @@ -1378,7 +1380,7 @@ asc_end(asc, status, ss, ir) scsicmd = asc->cmd[target]; asc->cmd[target] = (ScsiCmd *)0; state = &asc->st[target]; - untimeout(asc_timeout, scsicmd); + timeout_del(&asc->asc_timo); #ifdef DEBUG if (asc_debug > 1) { diff --git a/sys/dev/tc/ascvar.h b/sys/dev/tc/ascvar.h index 2321001085f..02327cac7a8 100644 --- a/sys/dev/tc/ascvar.h +++ b/sys/dev/tc/ascvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ascvar.h,v 1.4 2001/01/25 03:50:52 todd Exp $ */ +/* $OpenBSD: ascvar.h,v 1.5 2001/05/01 01:07:51 aaron Exp $ */ /* $NetBSD: ascvar.h,v 1.4 1997/11/28 18:23:40 mhitch Exp $ */ @@ -67,6 +67,7 @@ struct asc_softc { int ccf; /* CCF, whatever that really is? */ int timeout_250; /* 250ms timeout */ int tb_ticks; /* 4ns. ticks/tb channel ticks */ + struct timeout asc_timo; #ifdef USE_NEW_SCSI struct scsi_link sc_link; /* scsipi link struct */ #endif |