summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2010-07-24 20:15:31 +0000
committermatthew <matthew@openbsd.org>2010-07-24 20:15:31 +0000
commit1b1a1ad0c9778464996c6203b8251798eae30fb9 (patch)
tree351463996596e9ab5304d90cd8d9a538f73dbdf5
parentWhen changing so that the client passes its stdout and stderr as well as (diff)
downloadwireguard-openbsd-1b1a1ad0c9778464996c6203b8251798eae30fb9.tar.xz
wireguard-openbsd-1b1a1ad0c9778464996c6203b8251798eae30fb9.zip
Restore a needed 'return' removed in the last commit, and stylistic
tweak to eliminate an 'else' clause.
-rw-r--r--sys/dev/vscsi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index fc0d89b536e..aac21711193 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.16 2010/07/24 11:53:44 dlg Exp $ */
+/* $OpenBSD: vscsi.c,v 1.17 2010/07/24 20:15:31 matthew Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -167,22 +167,23 @@ vscsi_cmd(struct scsi_xfer *xs)
struct vscsi_softc *sc = link->adapter_softc;
struct vscsi_ccb *ccb = xs->io;
int polled = ISSET(xs->flags, SCSI_POLL);
- int running = 1;
+ int running = 0;
if (ISSET(xs->flags, SCSI_POLL) && ISSET(xs->flags, SCSI_NOSLEEP)) {
printf("%s: POLL && NOSLEEP for 0x%02x\n", DEVNAME(sc),
xs->cmd->opcode);
xs->error = XS_DRIVER_STUFFUP;
scsi_done(xs);
+ return;
}
ccb->ccb_xs = xs;
mtx_enter(&sc->sc_state_mtx);
- if (sc->sc_state == VSCSI_S_RUNNING)
+ if (sc->sc_state == VSCSI_S_RUNNING) {
+ running = 1;
TAILQ_INSERT_TAIL(&sc->sc_ccb_i2t, ccb, ccb_entry);
- else
- running = 0;
+ }
mtx_leave(&sc->sc_state_mtx);
if (!running) {