diff options
| author | Mike Smith <msmith@FreeBSD.org> | 2000-03-23 18:33:19 +0000 |
|---|---|---|
| committer | Mike Smith <msmith@FreeBSD.org> | 2000-03-23 18:33:19 +0000 |
| commit | 9992d96f25e7ed4a3ab8c2d391732081179a15cf (patch) | |
| tree | a6d3ba31d9da4d0339809a3a85ced1f6308e3730 /sys | |
| parent | 9ed4e87cad6ce8f1e8faf39636d7580bbc769fbd (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/amr/amr.c | 9 | ||||
| -rw-r--r-- | sys/dev/amr/amrvar.h | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 6d7524dc3679..3145e082e958 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -1126,7 +1126,7 @@ amr_start(struct amr_command *ac) /* spin waiting for the mailbox */ debug("wait for mailbox"); - for (i = 100000, done = 0, worked = 0; (i > 0) && !done; i--) { + for (i = 10000, done = 0, worked = 0; (i > 0) && !done; i--) { s = splbio(); /* is the mailbox free? */ @@ -1142,7 +1142,12 @@ amr_start(struct amr_command *ac) /* not free, try to clean up while we wait */ } else { debug("busy flag %x\n", sc->amr_mailbox->mb_busy); - worked = amr_done(sc); + /* try to kill some time being useful */ + if (amr_done(sc)) { + worked = 1; + } else { + DELAY(100); + } } splx(s); } diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h index f3955a6e41f8..13e0f46e7036 100644 --- a/sys/dev/amr/amrvar.h +++ b/sys/dev/amr/amrvar.h @@ -106,8 +106,8 @@ struct amr_softc void *amr_intr; /* mailbox */ - struct amr_mailbox *amr_mailbox; - struct amr_mailbox64 *amr_mailbox64; + volatile struct amr_mailbox *amr_mailbox; + volatile struct amr_mailbox64 *amr_mailbox64; u_int32_t amr_mailboxphys; bus_dma_tag_t amr_mailbox_dmat; bus_dmamap_t amr_mailbox_dmamap; |
