From 72065703e8247a211550c6430814ff3553b7a7ec Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Thu, 3 Sep 2009 10:58:39 +0000 Subject: must call scsi_done before returning complete. --- sys/dev/ic/twe.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3