summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ami.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-04-06 10:16:46 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-04-06 10:16:46 +0000
commitf147c46c3ca2c595bdea9002e527d32344e199c3 (patch)
tree0226077b1e1fdba44ddd7dca5d91d6f4df319999 /sys/dev/ic/ami.c
parent5d722e5898015f84dc332c7d1595c8b797b3cd1c (diff)
the synchronise cache path is unique in ami in that it uses two megaraid
commands to emulated one scsi command. i reuse the ccb and pushed it along the scsi setup path twice. when we do this for asynchronous cache syncs this happens with the timeout: timeout_set, timeout_add, timeout_set, timeout_del. from the looks of the timeout code the repeat of the timeout_set/add part can do really interesting things with the linked list holding all the timeouts. this adds a timeout_del in the middle of the two set/adds so the lists are kept sane.
Diffstat (limited to 'sys/dev/ic/ami.c')
-rw-r--r--sys/dev/ic/ami.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index d008c5e799e..a5527e6d537 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.142 2006/04/06 04:16:35 dlg Exp $ */
+/* $OpenBSD: ami.c,v 1.143 2006/04/06 10:16:45 dlg Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1235,8 +1235,8 @@ ami_done_flush(struct ami_softc *sc, struct ami_ccb *ccb)
struct ami_iocmd *cmd = &ccb->ccb_cmd;
int s;
+ timeout_del(&xs->stimeout);
if (ccb->ccb_flags & AMI_CCB_F_ERR) {
- timeout_del(&xs->stimeout);
xs->error = XS_DRIVER_STUFFUP;
xs->resid = 0;
xs->flags |= ITSDONE;