diff options
author | scottl <scottl@FreeBSD.org> | 2004-06-01 15:50:11 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-06-01 15:50:11 +0000 |
commit | 0fae2f30f5450deba7752c8e977a304491a5385e (patch) | |
tree | 067a1ee070c03e349de15f5a686d99b7e93287e3 /sys/dev/aac/aac.c | |
parent | 83ae77becd632897687db152538a6e5bb5e92eb1 (diff) | |
download | FreeBSD-src-0fae2f30f5450deba7752c8e977a304491a5385e.zip FreeBSD-src-0fae2f30f5450deba7752c8e977a304491a5385e.tar.gz |
Commit the correct version of the patch from last night. This fixes an
immediate panic when doing any i/o, and it closes a completion race.
Diffstat (limited to 'sys/dev/aac/aac.c')
-rw-r--r-- | sys/dev/aac/aac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 8181651..73802e8 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); |