summaryrefslogtreecommitdiff
path: root/sys/dev/vscsi.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-24 20:15:32 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-24 20:15:32 +0000
commit7a531e8e4bd3df0e6adb7d7cfa788418b95f4e7b (patch)
tree47afc014646f45f72ce3b71e7222060e8a2f7232 /sys/dev/vscsi.c
parent4f6f26bb5c2b9336c35d1634d32aa7f8a409cfbf (diff)
Restore a needed 'return' removed in the last commit, and stylistic
tweak to eliminate an 'else' clause.
Diffstat (limited to 'sys/dev/vscsi.c')
-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) {