Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300138
b: refs/heads/master
c: 32cf402
h: refs/heads/master
v: v3
  • Loading branch information
David Henningsson authored and Takashi Iwai committed May 9, 2012
1 parent 986a63b commit e8d5856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 619a341b78f17fb86d92e89c04612676cd05e26f
refs/heads/master: 32cf4023e689ad5b3a81a749d8cc99d7f184cb99
6 changes: 4 additions & 2 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,11 +783,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
{
struct azx *chip = bus->private_data;
unsigned long timeout;
unsigned long loopcounter;
int do_poll = 0;

again:
timeout = jiffies + msecs_to_jiffies(1000);
for (;;) {

for (loopcounter = 0;; loopcounter++) {
if (chip->polling_mode || do_poll) {
spin_lock_irq(&chip->reg_lock);
azx_update_rirb(chip);
Expand All @@ -803,7 +805,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
}
if (time_after(jiffies, timeout))
break;
if (bus->needs_damn_long_delay)
if (bus->needs_damn_long_delay || loopcounter > 3000)
msleep(2); /* temporary workaround */
else {
udelay(10);
Expand Down

0 comments on commit e8d5856

Please sign in to comment.