diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata.c | 4 | ||||
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 12 | ||||
-rw-r--r-- | sys/dev/ic/wdc.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 03f4994246e..b9ce6f180b8 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ata.c,v 1.8 2000/10/29 18:42:49 deraadt Exp $ */ +/* $OpenBSD: ata.c,v 1.9 2001/01/29 02:18:33 niklas Exp $ */ /* $NetBSD: ata.c,v 1.9 1999/04/15 09:41:09 bouyer Exp $ */ /* * Copyright (c) 1998 Manuel Bouyer. All rights reserved. @@ -45,8 +45,6 @@ #include <dev/ic/wdcreg.h> #include <dev/ic/wdcvar.h> -#define WDCDEBUG - #define DEBUG_FUNCS 0x08 #define DEBUG_PROBE 0x10 #ifdef WDCDEBUG diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 348a6413df0..802cfa3fbc3 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.34 2000/12/19 05:10:06 csapuntz Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.35 2001/01/29 02:18:33 niklas Exp $ */ /* * This code is derived from code with the copyright below. @@ -78,8 +78,6 @@ #define READY 6 -#define WDCDEBUG - #define DEBUG_INTR 0x01 #define DEBUG_XFERS 0x02 #define DEBUG_STATUS 0x04 @@ -607,6 +605,7 @@ wdc_atapi_timer_handler(arg) /* There is a race here between us and the interrupt */ s = splbio(); + chp->ch_flags &= ~WDCF_IRQ_WAIT; wdc_atapi_the_machine(chp, xfer, ctxt_timer); splx(s); } @@ -706,7 +705,12 @@ wdc_atapi_the_machine(chp, xfer, ctxt) xfer->endticks && (ticks - xfer->endticks >= 0)); if (xfer->timeout != -1) - xfer->endticks = max((xfer->timeout * hz) / 1000, 1) + ticks; + /* + * Add 1 tick to compensate for the fact that we can be just + * microseconds before the tick changes. + */ + xfer->endticks = + max((xfer->timeout * hz) / 1000, 1) + 1 + ticks; if (xfer->claim_irq) claim_irq = xfer->claim_irq; diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index ce069a07dfb..e8ebd216814 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.25 2001/01/29 00:20:16 csapuntz Exp $ */ +/* $OpenBSD: wdc.c,v 1.26 2001/01/29 02:18:33 niklas Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -94,8 +94,6 @@ #include "atapiscsi.h" -#define WDCDEBUG - #define WDCDELAY 100 /* 100 microseconds */ #define WDCNDELAY_RST (WDC_RESET_WAIT * 1000 / WDCDELAY) #if 0 |