avoid an infinite loop with the variable loop i
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39062 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
868d2a2ed5
commit
a845ef7bcd
@ -195,18 +195,19 @@ auich_stream_commit_parms(auich_stream *stream)
|
||||
auich_reg_write_8(&stream->card->config, stream->base + AUICH_REG_X_CR, 0);
|
||||
snooze(10000); // 10 ms
|
||||
|
||||
auich_reg_write_8(&stream->card->config, stream->base + AUICH_REG_X_CR, CR_RR);
|
||||
for (i = 10000; i>=0; i--) {
|
||||
if (0 == auich_reg_read_8(&stream->card->config, stream->base + AUICH_REG_X_CR)) {
|
||||
auich_reg_write_8(&stream->card->config,
|
||||
stream->base + AUICH_REG_X_CR, CR_RR);
|
||||
for (i = 10000; i > 0; i--) {
|
||||
if (0 == auich_reg_read_8(&stream->card->config,
|
||||
stream->base + AUICH_REG_X_CR)) {
|
||||
LOG(("channel reset finished, %x, %d\n", stream->base, i));
|
||||
break;
|
||||
}
|
||||
spin(1);
|
||||
}
|
||||
|
||||
if (i < 0) {
|
||||
LOG(("channel reset failed after 10ms\n"));
|
||||
}
|
||||
if (i == 0)
|
||||
PRINT(("channel reset failed after 10ms\n"));
|
||||
|
||||
page = stream->dmaops_log_base;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user