diff options
author | scottl <scottl@FreeBSD.org> | 2008-07-20 16:50:14 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2008-07-20 16:50:14 +0000 |
commit | 00653a63b3d7b26afb7e99a88041d111fba5048f (patch) | |
tree | 80f5c2634d74aecef1fb7095ed83556383185e72 /sys/dev | |
parent | 65211db2c166fabd2d0d3b908cd58cadcc5b098a (diff) | |
download | FreeBSD-src-00653a63b3d7b26afb7e99a88041d111fba5048f.zip FreeBSD-src-00653a63b3d7b26afb7e99a88041d111fba5048f.tar.gz |
While spin-waiting for the mailbox semaphore to update, do flushing reads of
PCI bus so that we don't have to wait more than needed.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/amr/amr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index b394950..d586a36 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -2082,8 +2082,11 @@ amr_quartz_submit_command(struct amr_command *ac) int i = 0; mtx_lock(&sc->amr_hw_lock); - while (sc->amr_mailbox->mb_busy && (i++ < 10)) + while (sc->amr_mailbox->mb_busy && (i++ < 10)) { DELAY(1); + /* This is a no-op read that flushes pending mailbox updates */ + AMR_QGET_ODB(sc); + } if (sc->amr_mailbox->mb_busy) { mtx_unlock(&sc->amr_hw_lock); if (ac->ac_retries++ > 1000) { |