summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-09-03 10:58:39 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-09-03 10:58:39 +0000
commit72065703e8247a211550c6430814ff3553b7a7ec (patch)
tree2e4d2afa18dfabea731b403bbc494a835e8a0b7a /sys/dev/ic
parent5481162de6431180299147cb307fb08fe2b21b46 (diff)
must call scsi_done before returning complete.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/twe.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index f3f9700364f..b3b2b551a29 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.30 2009/02/16 21:19:07 miod Exp $ */
+/* $OpenBSD: twe.c,v 1.31 2009/09/03 10:58:38 dlg Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -793,6 +793,9 @@ twe_scsi_cmd(xs)
if (target >= TWE_MAX_UNITS || !sc->sc_hdr[target].hd_present ||
link->lun != 0) {
xs->error = XS_DRIVER_STUFFUP;
+ lock = TWE_LOCK(sc);
+ scsi_done(xs);
+ TWE_UNLOCK(sc, lock);
return (COMPLETE);
}
@@ -849,6 +852,9 @@ twe_scsi_cmd(xs)
case PREVENT_ALLOW:
TWE_DPRINTF(TWE_D_CMD, ("PREVENT/ALLOW "));
+ lock = TWE_LOCK(sc);
+ scsi_done(xs);
+ TWE_UNLOCK(sc, lock);
return (COMPLETE);
case READ_COMMAND:
@@ -944,6 +950,10 @@ twe_scsi_cmd(xs)
xs->error = XS_DRIVER_STUFFUP;
}
+ lock = TWE_LOCK(sc);
+ scsi_done(xs);
+ TWE_UNLOCK(sc, lock);
+
return (COMPLETE);
}