summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-26 22:14:51 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-26 22:14:51 +0000
commit7de31b945c20e0ab4a6bdd7d054c414142d4d7a5 (patch)
tree6d883e2df5b2d5f9c94c4416ad4f6b28447d3f2d /sys
parentea0c7079b1ef0bc2f630997ff0a02f7afbc391cd (diff)
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')
-rw-r--r--sys/dev/pci/autri.c11
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) {