summaryrefslogtreecommitdiff
path: root/sys/dev/ic/twe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/twe.c')
-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);
}