diff options
| author | 2002-09-26 22:14:50 +0000 | |
|---|---|---|
| committer | 2002-09-26 22:14:50 +0000 | |
| commit | 80add9fd93c2a6d60f9e5713f778d64c8b4f8905 (patch) | |
| tree | ad1e74f2058d48bddd33cac0bc9692a6045e6d54 /sys/dev/pci/autri.c | |
| parent | Add a few supposedly useful xrefs, some from mickey@ (diff) | |
| download | wireguard-openbsd-80add9fd93c2a6d60f9e5713f778d64c8b4f8905.tar.xz wireguard-openbsd-80add9fd93c2a6d60f9e5713f778d64c8b4f8905.zip | |
time-bind the codec r/w loops, still does not solve problems on transmeta; tested by jason@ on sparc64; deraadt@ ok
Diffstat (limited to 'sys/dev/pci/autri.c')
| -rw-r--r-- | sys/dev/pci/autri.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c index 7d2d8007ab3..54feb70c6e2 100644 --- a/sys/dev/pci/autri.c +++ b/sys/dev/pci/autri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autri.c,v 1.7 2002/03/14 03:16:06 millert Exp $ */ +/* $OpenBSD: autri.c,v 1.8 2002/09/26 22:14:50 mickey Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -292,9 +292,10 @@ autri_read_codec(sc_, index, data) } /* wait for 'Ready to Read' */ - for (count=0; count<0xffff; count++) { + for (count=0; count < 0xffff; count++) { if ((TREAD4(sc, addr) & busy) == 0) break; + DELAY(1); } if (count == 0xffff) { @@ -307,10 +308,11 @@ autri_read_codec(sc_, index, data) TWRITE4(sc, addr, (index & 0x7f) | cmd); /* wait for 'Returned data is avalable' */ - for (count=0; count<0xffff; count++) { + for (count=0; count < 0xffff; count++) { status = TREAD4(sc, addr); if ((status & busy) == 0) break; + DELAY(1); } if (count == 0xffff) { @@ -367,9 +369,10 @@ autri_write_codec(sc_, index, data) } /* wait for 'Ready to Write' */ - for (count=0; count<0xffff; count++) { + for (count=0; count < 0xffff; count++) { if ((TREAD4(sc, addr) & busy) == 0) break; + DELAY(1); } if (count == 0xffff) { |
