aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2004-06-01 15:50:11 +0000
committerScott Long <scottl@FreeBSD.org>2004-06-01 15:50:11 +0000
commit614c22b2a2577f08d96256cf13655064739d5f19 (patch)
tree067a1ee070c03e349de15f5a686d99b7e93287e3 /sys/dev/aac
parent138fbf675a8d3c305b3d759c28ee54d566e29721 (diff)
Notes
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 8181651288bc..73802e8311d8 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -700,7 +700,7 @@ aac_startio(struct aac_softc *sc)
debug(1, "freezing queue\n");
sc->flags |= AAC_QUEUE_FRZN;
error = 0;
- } else
+ } else if (error != 0)
panic("aac_startio: unexpected error %d from "
"busdma\n", error);
} else
@@ -1815,6 +1815,12 @@ aac_enqueue_fib(struct aac_softc *sc, int queue, struct aac_command *cm)
goto out;
}
+ /*
+ * To avoid a race with its completion interrupt, place this command on
+ * the busy queue prior to advertising it to the controller.
+ */
+ aac_enqueue_busy(cm);
+
/* populate queue entry */
(sc->aac_qentries[queue] + pi)->aq_fib_size = fib_size;
(sc->aac_qentries[queue] + pi)->aq_fib_addr = fib_addr;
@@ -1822,12 +1828,6 @@ aac_enqueue_fib(struct aac_softc *sc, int queue, struct aac_command *cm)
/* update producer index */
sc->aac_queues->qt_qindex[queue][AAC_PRODUCER_INDEX] = pi + 1;
- /*
- * To avoid a race with its completion interrupt, place this command on
- * the busy queue prior to advertising it to the controller.
- */
- aac_enqueue_busy(cm);
-
/* notify the adapter if we know how */
if (aac_qinfo[queue].notify != 0)
AAC_QNOTIFY(sc, aac_qinfo[queue].notify);