summaryrefslogtreecommitdiff
path: root/sys/dev/pci/autri.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/autri.c')
-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) {