From 31486fa63b56224ec40b85e8044d7db9c6da66d0 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 2 Jul 2012 18:17:44 +0000 Subject: Backout premature optimization and actually commit the diff which had been tested to boot multiuser. --- sys/dev/ic/wd33c93.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sys/dev/ic') 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; -- cgit v1.2.3