diff options
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 6f561d7e346..41afc95e3cc 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.79 2007/11/06 01:05:35 krw Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.80 2008/05/22 20:11:03 drahn Exp $ */ /* * This code is derived from code with the copyright below. @@ -684,8 +684,12 @@ wdc_atapi_the_machine(chp, xfer, ctxt) } if (retargs.expect_irq) { + int timeout_period; chp->ch_flags |= WDCF_IRQ_WAIT; - timeout_add(&chp->ch_timo, xfer->endticks - ticks); + timeout_period = xfer->endticks - ticks; + if (timeout_period < 1) + timeout_period = 1; + timeout_add(&chp->ch_timo, timeout_period); return; } |