summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-07-02 18:17:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-07-02 18:17:44 +0000
commit31486fa63b56224ec40b85e8044d7db9c6da66d0 (patch)
tree99d8b6484091a10f6d6caa5b3e52a5ef2934bfb4 /sys/dev/ic
parent044f9f39df2f6c8c6ccf5826c21299d22858f5fa (diff)
Backout premature optimization and actually commit the diff which had been
tested to boot multiuser.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wd33c93.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c
index e5740889ca3..65fbf56705f 100644
--- a/sys/dev/ic/wd33c93.c
+++ b/sys/dev/ic/wd33c93.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd33c93.c,v 1.3 2012/07/02 17:54:57 miod Exp $ */
+/* $OpenBSD: wd33c93.c,v 1.4 2012/07/02 18:17:43 miod Exp $ */
/* $NetBSD: wd33c93.c,v 1.24 2010/11/13 13:52:02 uebayasi Exp $ */
/*
@@ -1367,11 +1367,17 @@ wd33c93_go(struct wd33c93_softc *sc, struct wd33c93_acb *acb)
i = wd33c93_loop(sc, asr, csr);
QPRINTF(("> done i=%d stat=%02x\n", i, sc->sc_status));
- if (i == SBIC_STATE_DONE) {
+ switch (i) {
+ case SBIC_STATE_DONE:
if (sc->sc_status == STATUS_UNKNOWN) {
printf("wd33c93_go: done & stat == UNKNOWN\n");
return 1; /* Did we really finish that fast? */
}
+ break;
+ case SBIC_STATE_DISCONNECT:
+ xs->error = XS_SELTIMEOUT;
+ /* wd33c93_sched() will invoke wd33c93_scsidone() for us */
+ break;
}
return 0;
}
@@ -2032,7 +2038,6 @@ wd33c93_nextstate(struct wd33c93_softc *sc, struct wd33c93_acb *acb, u_char csr,
++sc->sc_tinfo[sc->target].dconns;
++sc->sc_disc;
- acb->xs->error = XS_SELTIMEOUT;
if (acb->xs->flags & SCSI_POLL || wd33c93_nodisc)
return SBIC_STATE_DISCONNECT;