summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-15 06:58:49 (GMT)
committerTakashi Iwai <tiwai@suse.de>2012-05-15 06:58:49 (GMT)
commitf153c6af87401fdae3bb2dfbfc6284eb0d537a05 (patch)
treec0a8297706f86f949ad4aba194f46f52ab53de21 /sound/pci/hda/hda_intel.c
parent7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0 (diff)
parentb0791dda813c179e539b0fc1ecd3f5f30f2571e2 (diff)
downloadlinux-fsl-qoriq-f153c6af87401fdae3bb2dfbfc6284eb0d537a05.tar.xz
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a70d7e5..7ee46ab 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -789,11 +789,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);
@@ -809,7 +811,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);